-
-
Notifications
You must be signed in to change notification settings - Fork 25.9k
DOC remove redundant example multiclass logistic regression #29966
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 remove redundant example multiclass logistic regression #29966
Conversation
# | ||
# The difference in hyperplanes, especially for class 1, highlights how these methods | ||
# can produce different decision boundaries despite similar overall accuracy. The choice | ||
# between one-vs-rest and multinomial logistic regression can depend on the specific |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I disagree. We should generally recommend the multinomial version of LogReg.
In the rare case that ovr is better in some relevant metric, it is either random (bad) luck or a bad metric.
For predicting probabilities, multinomial is the crystal clear choice.
Therefore, I would appreciate a statement at the beginning that for educational purposes we compare with ovr.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed. I was not sure how to conclude the example here.
Now that you raise this point, I changed it to emphasize that the decision planes are just arbitrary position in the OvR while I assume that you can better craft a utility function that use the probabilities estimated from the multinomial LR and thus lead optimize the real problem that you have at hand.
If you think that we should not mention it (or that I overlooked something), I'm happy to only mentioned that you should use the multinomial case.
In general, good to merge those 2. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The overall multi-normal vs ovr example largely feels like an academic exportation. In practice, I would just go with multinomial.
In any case, I'm okay with merging the example and if we are keeping the multinomial vs ovr example, I think this PR improves on it.
Partially addressing #27151
This PR removes one of the example of multiclass logistic regression.
In addition, it improves the example that we keep and discuss in more details the difference between one-vs-rest and multinomial logistic regression.