Incremental weighted mean and var#15798
Closed
panpiort8 wants to merge 3 commits intoscikit-learn:masterfrom
Closed
Incremental weighted mean and var#15798panpiort8 wants to merge 3 commits intoscikit-learn:masterfrom
panpiort8 wants to merge 3 commits intoscikit-learn:masterfrom
Conversation
rth
reviewed
Dec 6, 2019
Member
There was a problem hiding this comment.
Thanks! Do you think then that adding sample_weight support to _incremental_mean_and_var would be more difficult to maintain then creating a separate method?
Contributor
Author
|
I see two possibiliites:
I would rather have separate methods, but I'm opened for arguments/propostitions. |
bd4c1d8 to
acd5afb
Compare
a046d24 to
3160df3
Compare
3160df3 to
9d3115f
Compare
Contributor
Author
|
Testing is done and I believe code is ready to be reviewed. |
Member
|
It's really quite inconvenient that you close and reopen this issue. it provides no link between the old and new issues, means that the labels on the previous issue are removed, etc. Please avoid this in the future. |
Contributor
Author
|
True, it was misguided decision, mea culpa. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Reference Issues/PRs
Partially adresses: #15601
What does this implement/fix? Explain your changes.
Method partial_fit in StandardScaler can be used multiple times to incrementally update mean and variance, but there was no proper method to do it with sample_weights. This PR introduce _incremental_weighted_mean_and_var, which does the exact thing we want.
Any other comments?