get_correlation_matrix

get_correlation_matrix(ts: TSDataset, columns: Optional[List[str]] = None, segments: Optional[List[str]] = None, method: str = 'pearson') numpy.ndarray[source]

Compute pairwise correlation of timeseries for selected segments.

Parameters
  • ts (TSDataset) – TSDataset with timeseries data

  • columns (Optional[List[str]]) – Columns to use, if None use all columns

  • segments (Optional[List[str]]) – Segments to use

  • method (str) –

    Method of correlation:

    • pearson: standard correlation coefficient

    • kendall: Kendall Tau correlation coefficient

    • spearman: Spearman rank correlation

Returns

Correlation matrix

Return type

np.ndarray