Skip to main content

correlation_matrix

Get the correlation matrix of an input dataset.

The correlation matrix provides a view of how different variables in your dataset relate to one another. By quantifying the degree to which variables move in relation to each other, this matrix can help identify patterns, trends, and potential areas for deeper analysis. The correlation score ranges from -1 to 1, with -1 indicating a perfect negative correlation, 0 indicating no correlation, and 1 indicating a perfect positive correlation.

Parameters

data: list[openbb_core.provider.abstract.data.Data]

Input dataset.

Optional: False


method: Literal['pearson', 'kendall', 'spearman']

Method to use for correlation calculation. Default is 'pearson'.

Default: pearson

Optional: True


pearson: standard correlation coefficient

kendall : Kendall Tau correlation coefficient

Optional: False


spearman: Spearman rank correlation

Optional: False


Returns

results: list[Data]

Serializable results.


provider: None

Provider name.


warnings: Optional[list[Warning_]]

list of warnings.


chart: Optional[Chart]

Chart object.


extra: dict[str, Any]

Extra info.


On this page