-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
LinearDiscriminantAnalysis predict_proba should use softmax #5149
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
Comments
AFAIK there are several variants of LDA in the multiclass case. @cle1109 @kazemakase Which one do we implement? |
We actually didn't change anything in Anyway, the code is identical to the one in logistic regression, so I guess we're doing the same thing here. Since @MechCoder is working on a fix, we could use it in LDA as well. |
The way to compute predict_proba may depend on the variant of multiclass LDA we're using. Since there are several variants, the code may be wrong or it may be correct. @amueller What makes you think softmax is the right way to compute predict_proba here? Any reference? |
I see. I would have used Regarding the LDA variant, we're computing discriminant functions for each class. The class with the highest value will be selected for a particular sample (this is inherited from |
The point is to save a memory allocation by doing the operation in place but I agree this is not big deal.
From C. Bishop's book: "There are now many possible choices of criterion (Fukunaga, 1990)"
This sounds to me like the current code (compute each proba then normalize) is correct then. |
I don't have my bishop here, we should check the reference. |
It uses an OVR normalization for multi-class for some unknown (to me) reason.
See #5134.
The text was updated successfully, but these errors were encountered: