cudf.Series.autocorr#
- Series.autocorr(lag=1)[source]#
Compute the lag-N autocorrelation. This method computes the Pearson correlation between the Series and its shifted self.
- Parameters:
- lagint, default 1
Number of lags to apply before performing autocorrelation.
- Returns:
- resultfloat
The Pearson correlation between self and self.shift(lag).
Examples
>>> import cudf >>> s = cudf.Series([0.25, 0.5, 0.2, -0.05, 0.17]) >>> s.autocorr() 0.1438853844... >>> s.autocorr(lag=2) -0.9647548490...