Skip to content
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

predict: add support for -b2 (softmax probs) and -b3 (raw scores) #55

Closed
wants to merge 1 commit into from

Conversation

cheusov
Copy link

@cheusov cheusov commented Aug 7, 2019

Add support for softmax probabilities (-b2) and raw scores (-b3) to "predict" executable.

@cjlin1
Copy link
Owner

cjlin1 commented Aug 8, 2019

Sorry we don't add such things unless experiments have been done to show that in general the prob obtained via this is better than the one currently provided in liblinear. Liblinear uses one vs rest rather than maxent for multiclass, so the theoretically sound way is some settings to combine several binary prob outputs..
See appendix L of
https://www.csie.ntu.edu.tw/~cjlin/papers/liblinear.pdf
Thanks

@cjlin1 cjlin1 closed this Aug 8, 2019
@cheusov
Copy link
Author

cheusov commented Aug 8, 2019

I know how liblinear works internally, but I still don't understand what exactly prevents you from converting raw scores (distances from hyperplane) to probability with a help of softmax. There are a lot of applications where the use of [0..1] probabilities is just more convenient than arbitrary real numbers. IMHO it would be nice to have a command-line option for this.

Any way, what about "-b 3" (or analog) for outputing raw scores?

@cheusov
Copy link
Author

cheusov commented Aug 9, 2019

It seems to me you understood my patch incorrectly. What I proposed is an extension to existing functionality, not replacing the existing one. Also note that "use softmax eq in predict_probability func #20" pull request have nothing in common with what I proposed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants