An inconsistency between the document of LogisticRegression
and code implementation
#29509
Labels
LogisticRegression
and code implementation
#29509
Describe the issue linked to the documentation
Hi,
I may find a potential condition missing in
sklearn.linear_model.LogisticRegression
.As mentioned in the document of parameter
dual
:Corresponding part found in the source code:
Apprarently, the relationship between
dual
andsolver
are checked without the condition of l2penalty
.(
solver == 'liblinear'
&&penalty == 'l1'
&&dual = True
) can still pass the_check_solver
function.Could you check it?
Suggest a potential alternative/fix
Perhaps we can modify the judgment condition.
The text was updated successfully, but these errors were encountered: