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

Doc fix early stopping #19818

Merged
merged 7 commits into from
Apr 19, 2021
Merged

Doc fix early stopping #19818

merged 7 commits into from
Apr 19, 2021

Conversation

isaacknjama
Copy link
Contributor

Reference Issues/PRs

Towards #19743

What does this implement/fix? Explain your changes.

Highlights the behaviour of a neural network if early_stopping is activated: in this case, validation score is used to stop the neural network. Otherwise, loss is used.

Copy link
Member

@thomasjpfan thomasjpfan left a comment

Choose a reason for hiding this comment

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

Thank you for the PR @isaack-mungui !

sklearn/neural_network/_multilayer_perceptron.py Outdated Show resolved Hide resolved
@isaacknjama
Copy link
Contributor Author

Thank you for the PR @isaack-mungui !

@thomasjpfan

Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
Copy link
Member

@ogrisel ogrisel left a comment

Choose a reason for hiding this comment

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

I slightly prefer my suggestion from #19818 (comment) but I am also fine with the current state of the PR.

@adrinjalali
Copy link
Member

Thanks for the PR @isaack-mungui , I agree with @ogrisel that his suggestion is more clear to users:

If early_stopping is False, then the training stops when the training loss does not improve by more than tol for n_iter_no_change consecutive passes over the training set.

@adrinjalali adrinjalali merged commit 969ec32 into scikit-learn:main Apr 19, 2021
thomasjpfan added a commit to thomasjpfan/scikit-learn that referenced this pull request Apr 19, 2021
* Maintenance task: Moved PolynomialFeatures to _polynomial.py

* Updated docstring including behaviour of neural network when early stopping is activated

* Revert "Maintenance task: Moved PolynomialFeatures to _polynomial.py"

This reverts commit f76df54.

* reverted failing commit

* Update sklearn/neural_network/_multilayer_perceptron.py

Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>

* Updated doc with proposed changes

* Fixed whitespace error

Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
@glemaitre glemaitre mentioned this pull request Apr 22, 2021
12 tasks
glemaitre pushed a commit to glemaitre/scikit-learn that referenced this pull request Apr 22, 2021
* Maintenance task: Moved PolynomialFeatures to _polynomial.py

* Updated docstring including behaviour of neural network when early stopping is activated

* Revert "Maintenance task: Moved PolynomialFeatures to _polynomial.py"

This reverts commit f76df54.

* reverted failing commit

* Update sklearn/neural_network/_multilayer_perceptron.py

Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>

* Updated doc with proposed changes

* Fixed whitespace error

Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
glemaitre pushed a commit that referenced this pull request Apr 28, 2021
* Maintenance task: Moved PolynomialFeatures to _polynomial.py

* Updated docstring including behaviour of neural network when early stopping is activated

* Revert "Maintenance task: Moved PolynomialFeatures to _polynomial.py"

This reverts commit f76df54.

* reverted failing commit

* Update sklearn/neural_network/_multilayer_perceptron.py

Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>

* Updated doc with proposed changes

* Fixed whitespace error

Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants