8000 [MRG] Updated partial_fit documentation by samwaterbury · Pull Request #12618 · scikit-learn/scikit-learn · GitHub
[go: up one dir, main page]

Skip to content

[MRG] Updated partial_fit documentation #12618

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 3 commits into from
Nov 25, 2018
Merged

[MRG] Updated partial_fit documentation #12618

merged 3 commits into from
Nov 25, 2018

Conversation

samwaterbury
Copy link
Contributor

Reference Issues/PRs

Addresses #12505 documentation

What does this implement/fix? Explain your changes.

Updates the documentation to make the behavior of partial_fit more clear. I think this is the last change from #12505 to be made.

"""Fit the model to data matrix X and target y.
"""Fit the model to data matrix X and target y for a single iteration.

Reuses the previously fitted solution as initialization if is exists.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think using initialization is confusing here. That would be warm-start.
Maybe "do a single optimization iteration over the data, starting from the previous state"?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's fine with me, this new commit uses that language. (Although under-the-hood they technically work the same)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They do not, see the glossary. partial_fit does a single iteration, warmstart solves till the optimum.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes I understand. I just meant that in the context of the MLP classes, the way partial_fit and warm_start pick up from the previous stopping point is the same. But I agree using the word "initialization" is more appropriate for warm start than partial.

@@ -619,7 +619,8 @@ def fit(self, X, y):

@property
def partial_fit(self):
"""Fit the model to data matrix X and target y.
"""Fit the model to data matrix X and target y for a single
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about "update the model with a single iteration over the given data"
This would also satisfy pep257's request that we keep this summary to a single line

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like it, done.

@jnothman jnothman merged commit 32c676e into scikit-learn:master Nov 25, 2018
amueller pushed a commit to amueller/scikit-learn that referenced this pull request Dec 14, 2018
amueller pushed a commit to amueller/scikit-learn that referenced this pull request Dec 17, 2018
xhluca pushed a commit to xhluca/scikit-learn that referenced this pull request Apr 28, 2019
xhluca pushed a commit to xhluca/scikit-learn that referenced this pull request Apr 28, 2019
xhluca pushed a commit to xhluca/scikit-learn that referenced this pull request Apr 28, 2019
koenvandevelde pushed a commit to koenvandevelde/scikit-learn that referenced this pull request Jul 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0