Skip to content

DOC: fixup formula for exponentially weighted mean with input vector of times? #40327

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

Closed
MarcoGorelli opened this issue Mar 9, 2021 · 2 comments · Fixed by #40343
Closed
Assignees
Labels
Docs good first issue Window rolling, ewma, expanding

Comments

@MarcoGorelli
Copy link
Member

MarcoGorelli commented Mar 9, 2021

Location of the documentation

https://pandas.pydata.org/docs/user_guide/window.html#exponentially-weighted-window

Documentation problem

Currently, it reads

image

However, I don't understand why the denominator doesn't also sum over time, as is shown in the general formula at the beginning of the section:

image

Suggested fix for documentation

image


I haven't done much windowing at all, so this may very well be me misunderstanding something

cc @mroeschke in #40099 , then if the timedelta is zero, then I think the current formula would give an expanding sum rather than an expanding mean

@MarcoGorelli MarcoGorelli added Docs good first issue Needs Triage Issue that has not been reviewed by a pandas team member labels Mar 9, 2021
@mroeschke
Copy link
Member

Thanks for the catch @MarcoGorelli! You are correct; there should be a summation in the denominator as well.

@mroeschke mroeschke added Window rolling, ewma, expanding and removed Needs Triage Issue that has not been reviewed by a pandas team member labels Mar 9, 2021
@mschmookler
Copy link
Contributor

take

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Docs good first issue Window rolling, ewma, expanding
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants