staircase.StairsArray.corr#

StairsArray.corr(where=(<staircase.constants.NegInf object>, <staircase.constants.Inf object>))#

Calculates the correlation matrix for a collection of Stairs instances

Parameters:
lowerint, float or pandas.Timestamp

lower bound of the interval on which to perform the calculation

upperint, float or pandas.Timestamp

upper bound of the interval on which to perform the calculation

Returns:
pandas.DataFrame

The correlation matrix

Examples

>>> import staircase as sc
>>> stairs = sc.StairsArray([s1, s2, s1+s2])
>>> stairs.corr()
          0          1          2
0  1.000000   0.246878   0.700249
1  0.246878   1.000000   0.792407
2  0.700249   0.792407   1.000000