staircase.corr#
- staircase.corr(collection, where=(<staircase.constants.NegInf object>, <staircase.constants.Inf object>))#
Calculates the correlation matrix for a collection of
Stairs
instances- Parameters
- collectionarray-like, dictionary or pandas.Series
The Stairs instances at which to evaluate
- 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
See also
Examples
>>> import staircase as sc >>> stairs = [s1, s2, s1+s2] >>> sc.corr(stairs) 0 1 2 0 1.000000 0.246878 0.700249 1 0.246878 1.000000 0.792407 2 0.700249 0.792407 1.000000
>>> stairs = {"s1":s1, "s2":s2, "s1+s2":s1+s2} >>> sc.corr(stairs, [2,3,4])) s1 s2 s1+s2 s1 1.000000 0.246878 0.700249 s2 0.246878 1.000000 0.792407 s1+ s2 0.700249 0.792407 1.000000