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

multi:softmax : output probabilities #18

Closed
jbregli opened this issue Aug 1, 2014 · 3 comments
Closed

multi:softmax : output probabilities #18

jbregli opened this issue Aug 1, 2014 · 3 comments

Comments

@jbregli
Copy link

jbregli commented Aug 1, 2014

Hi,

I am trying to use your library to tackle a multi-class classification problem.
I may have miss something in the documentation but is it possible to have access to the probabilities of belonging to each class?
If it is not, do you plan on adding an option similar to "binary:logistic" for multi-class problems?

Thanks you.
Jean-Baptiste Regli

@tqchen
Copy link
Member

tqchen commented Aug 1, 2014

This feature was not in the toolkit, but seems to be interesting support. So I have updated the newest version in master branch to support this. Checkout https://github.com/tqchen/xgboost/blob/master/demo/multiclass_classification/train.py

Thanks for using the tool
Tianqi

@jbregli
Copy link
Author

jbregli commented Aug 2, 2014

Thanks a lot for this quick reply for making the option available.

Jean-Baptiste Regli

@wenbo5565
Copy link

For the predicted probability, how do we know the order of class in the output? For example, if I put a pd.Series Y with 3 classes in xgb.DMatrix(..., label = Y) and put it in xgb.train(). When I get the output from final_model.predict(test_data), how can I know which class is in the first column, the second and the last. Thanks.

@lock lock bot locked as resolved and limited conversation to collaborators Oct 26, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants