Stairs.
corr
(other, lower=-inf, upper=inf)¶Calculates the correlation between two step functions described by self and other.
Parameters: |
|
---|---|
Returns: | The correlation between self and other |
Return type: | float |
See also
Examples
>>> fig, axes = plt.subplots(nrows=1, ncols=2, figsize=(12,5), sharey=True, sharex=True)
>>> for ax, title, stair_instance in zip(axes, ("s1", "s2"), (s1, s2)):
... stair_instance.plot(ax, label=title)
... ax.set_title(title)
>>> s1.corr(s2)
0.24687803791136045
>>> s2.corr(s1)
0.24687803791136045
>>> s1.corr(s2, lower=0, upper=6)
0.27500954910846337