Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEA] Series autocorr #9635

Closed
beckernick opened this issue Nov 8, 2021 · 0 comments · Fixed by #9833
Closed

[FEA] Series autocorr #9635

beckernick opened this issue Nov 8, 2021 · 0 comments · Fixed by #9833
Assignees
Labels
feature request New feature or request good first issue Good for newcomers Python Affects Python cuDF API.

Comments

@beckernick
Copy link
Member

For pandas API compatibility, we can implement Series.autocorr. autocorr calculates the Pearson correlation between the Series and itself lagged by N steps. Conceptually, this is a combination of shift and corr.

import pandas as pds = pd.Series([0.25, 0.5, 0.2, -0.05])
print(s.autocorr())
print(s.autocorr(lag=2))
0.10355263309024071
-0.9999999999999999
@beckernick beckernick added feature request New feature or request good first issue Good for newcomers Python Affects Python cuDF API. labels Nov 8, 2021
@mayankanand007 mayankanand007 self-assigned this Dec 2, 2021
@rapids-bot rapids-bot bot closed this as completed in #9833 Dec 7, 2021
rapids-bot bot pushed a commit that referenced this issue Dec 7, 2021
Fixes: #9635 

TODO:
- [x] add implementation
- [x] tests
- [x] add to `.rst` files for documentation

Authors:
  - Mayank Anand (https://github.com/mayankanand007)

Approvers:
  - GALI PREM SAGAR (https://github.com/galipremsagar)
  - Michael Wang (https://github.com/isVoid)

URL: #9833
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request good first issue Good for newcomers Python Affects Python cuDF API.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants