-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
DOC: clarify default window in rolling method #18177
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
Merged
Merged
Changes from 3 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is not correct, the default is in fact
win_type=None
, which means your window is specified by the thewindow
parameters; only if you actually specify awin_type
do you get a specific weighted window.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fundamentally doing a rolling window calculation involves choosing a window, so what window does passing
win_type=None
choose? I thought it was a boxcar?Is it valid to specify both the window parameters and the window type, or can only one be provided?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
most operations are an u weighted window
only if you specify win_type do you get a special weighted window (which also has only sum/mean) methods (this is not very common usage, not using win_type is by far the most common)
i think the docs in computation are pretty clear in this
certainly could add more / better examples in the doc string
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, so if you don't specify win_type you get an un-weighted window, which is a boxcar window, which is what my addition says.
I disagree that the docs are pretty clear, and I think this helps clear them up. (I also think it doesn't confuse anything, and I'm 99% sure what I've written is correct!)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, the current default uniform unweighted window is apparently a boxcar window (which I only learned by looking up what a boxcar window is).
I think that I am not alone in that, therefore I would change the explanation slightly to first explain what the default window is, and then only to say that this is called a boxcar window (people should certainly not need to follow a link to know what the meaning of the default is IMO)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I think I understand the confusion now - I don't have time now, but will try and revise later.