Skip to main content
Glama

get_correlation_matrix

Calculate pairwise correlations between numerical columns using Pearson, Spearman, or Kendall methods to identify variable relationships for feature selection and data analysis.

Instructions

Calculate correlation matrix for numerical columns.

Computes pairwise correlations between numerical columns using various correlation methods. Essential for understanding relationships between variables and feature selection in analytical workflows.

Returns: Correlation matrix with pairwise correlation coefficients

Correlation Methods: šŸ“Š Pearson: Linear relationships (default, assumes normality) šŸ“ˆ Spearman: Monotonic relationships (rank-based, non-parametric) šŸ”„ Kendall: Concordant/discordant pairs (robust, small samples)

Examples: # Basic correlation analysis corr = await get_correlation_matrix(ctx)

# Analyze specific columns with Spearman correlation corr = await get_correlation_matrix(ctx, columns=["price", "rating", "sales"], method="spearman") # Filter correlations above threshold corr = await get_correlation_matrix(ctx, min_correlation=0.5)

AI Workflow Integration: 1. Feature selection and dimensionality reduction 2. Multicollinearity detection before modeling 3. Understanding variable relationships 4. Data validation and quality assessment

Input Schema

NameRequiredDescriptionDefault
methodNoCorrelation method: pearson (linear), spearman (rank), kendall (rank)pearson
columnsNoList of columns to include (None = all numeric columns)
min_correlationNoMinimum correlation threshold to include in results

Input Schema (JSON Schema)

{ "properties": { "columns": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of columns to include (None = all numeric columns)" }, "method": { "default": "pearson", "description": "Correlation method: pearson (linear), spearman (rank), kendall (rank)", "enum": [ "pearson", "spearman", "kendall" ], "type": "string" }, "min_correlation": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "Minimum correlation threshold to include in results" } }, "type": "object" }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/jonpspri/databeak'

If you have feedback or need assistance with the MCP directory API, please join our Discord server