Skip to content

DOC: Add missing solver in the doc of LogisticRegressionCV #29463

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

Closed
ParsifalXu opened this issue Jul 11, 2024 · 4 comments
Closed

DOC: Add missing solver in the doc of LogisticRegressionCV #29463

ParsifalXu opened this issue Jul 11, 2024 · 4 comments
Labels
Documentation spam spam PR and issues

Comments

@ParsifalXu
Copy link
Contributor

Describe the issue linked to the documentation

Hi,

I found a potential code-doc inconsistency issue in sklearn.linear_model.LogisticRegression and sklearn.linear_model.LogisticRegressionCV.

In the description of multi_class, the document claims that Multinomial is unavailable when solver='liblinear'. However, in the code:

if multi_class == "multinomial" and solver in ("liblinear", "newton-cholesky"):
    raise ValueError("Solver %s does not support a multinomial backend." % solver)

Apparently, multinomial is unavailable not only when solver=liblinear but also when solver='newton-cholesky'.

Suggest a potential alternative/fix

Maybe you can add "newton-cholesky" in the corresponding document.

@ParsifalXu ParsifalXu added Documentation Needs Triage Issue requires triage labels Jul 11, 2024
@glemaitre
Copy link
Member

Indeed, we mentioned in other places the solver that are supported but this is true that we are not enough explicit in the multi_class description. Even though, we are going to remove this parameter soonish, I think we can quickly solve this issue.

@ParsifalXu Do you want to make a PR to improve the documentation in this regard.

@glemaitre glemaitre removed the Needs Triage Issue requires triage label Jul 11, 2024
@ParsifalXu
Copy link
Contributor Author

Indeed, we mentioned in other places the solver that are supported but this is true that we are not enough explicit in the multi_class description. Even though, we are going to remove this parameter soonish, I think we can quickly solve this issue.

@ParsifalXu Do you want to make a PR to improve the documentation in this regard.

@glemaitre Thanks for quick confirm. Sure, I'm glad to make a PR.

@lorentzenchr
Copy link
Member

Please don‘t open a PR and better consider reviewing #28840 which adds multinomial multiclass to newton-cholesky.

@adrinjalali
Copy link
Member

Closing as #28840 should also resolve this, and that this seems AI generated. More context here: #29509

@adrinjalali adrinjalali closed this as not planned Won't fix, can't repro, duplicate, stale Jul 18, 2024
@adrinjalali adrinjalali added the spam spam PR and issues label Jul 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation spam spam PR and issues
Projects
None yet
Development

No branches or pull requests

4 participants