简体   繁体   中英

How to interpret the output of a multiclasses classification using xgboost package in R?

I am new to the package of XGBOOST, I would like to use it for a multi-classes classification problem.

I have 30 classes (or labels) now and I have converted them to integers (0 - 29). Then I run xgboost() method from XGBOOST package on the data set. After building the model, I use predict() method to predict a new test data. Finally, I got a vector of numbers as the final output. BTW, all the numbers are between 0 and 1.

So now how can I interpret the output? Is that the probability? But how can I know which class should be related to?

Thanks

I just got it! The output is a matrix of 100,000*30 values. So every 30 numbers are corresponding to one specific instance, which means each number is the probability of that instance to be the label.

For example:

matrix[1] is the Prob(instance0==label0)

matrix[32] is Prob(instance1==label1)

matrix[33]=Prob(instance1==label3)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM