Skip to content

Fix liblinear ConvergenceWarning in examples#14166

Merged
glemaitre merged 2 commits intoscikit-learn:masterfrom
GideonSonoiya1:gideon_sonoiya-scikitlearn
Jul 1, 2019
Merged

Fix liblinear ConvergenceWarning in examples#14166
glemaitre merged 2 commits intoscikit-learn:masterfrom
GideonSonoiya1:gideon_sonoiya-scikitlearn

Conversation

@GideonSonoiya1
Copy link
Copy Markdown
Contributor

Reference Issues/PRs

Fix warnings in examples #14117
ConvergenceWarning: Liblinear failed to converge, increase the number of iterations.
"the number of iterations.", ConvergenceWarning)

What does this implement/fix? Explain your changes.

Fixed convergence warning by altering dual=False parameter in LinearSVC (ln 119).

dual=False is preferred when n_samples > n_features.

Any other comments?

Reference : https://scikit-learn.org/stable/modules/generated/sklearn.svm.LinearSVC.html

…meter passed in

linearSVC dual=False when n_samples > n_features. This remove
convergence warning
@jnothman
Copy link
Copy Markdown
Member

This is modifying a file in the scikit-learn directory which does not exist in this repository

@rth rth changed the title #WiMLDS Fix warnings in examples #14117 : ConvergenceWarning: Liblinear failed to converge, increase the number of iterations. "the number of iterations.", ConvergenceWarning) Fix liblinear ConvergenceWarning in lexamples Jun 23, 2019
@rth rth changed the title Fix liblinear ConvergenceWarning in lexamples Fix liblinear ConvergenceWarning in examples Jun 23, 2019
@rth rth added the Sprint label Jun 23, 2019
@glemaitre
Copy link
Copy Markdown
Member

@GideonSonoiya1 you need to commit only the changes that you have on the example file.

@glemaitre glemaitre self-assigned this Jul 1, 2019
@glemaitre glemaitre merged commit c97727e into scikit-learn:master Jul 1, 2019
@glemaitre
Copy link
Copy Markdown
Member

@GideonSonoiya1 I apply your changes in the right file and merge it.
Thanks for your contribution.

@GideonSonoiya1
Copy link
Copy Markdown
Contributor Author

Thanks @glemaitre

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants