Reputation: 41
I'm trying to visualize my xgboost model using python plot_tree method. The first few trees end up with a picture showing leaf = -0.1, while some other the rest seem fine. How do I interpret this? Does this mean I use more trees than needed?
Upvotes: 1
Views: 1913
Reputation: 19957
For a classification tree with 2 classes {0,1}, the value of the leaf node represent the raw score for class 1. It can be converted to a probability score by using the logistic function:
1/(1+np.exp(-1*-0.1))=0.47502081252106
What this means is if a data point ends up being distributed to this leaf, the probability of this data point being class 1 is 0.47502081252106.
Upvotes: 2