In binary classification problems, how to know which class the leaf nodes belong to in the images output by plot_tree()?
In binary classification problems, how to know which class the leaf nodes belong to in the images output by plot_tree()?
"val" cannot help me confirm the specific class.
Values in the leaves do not directly predict classes due to the nature of the gradient boosting (unless your model consists only of a single tree), individual trees are so called "weak learners" that gradually improve our model function.
See https://en.wikipedia.org/wiki/Gradient_boosting#Gradient_tree_boosting.
Rather the sum of values of all leaves that are selected for a particular input feature values for all trees is used as an argument to the sigmoid function that will estimate the positive class probability.
My model consists only of a single tree; I just want to use the model's visualization feature to analyze whether there are business problems after feature crossing, so I only used one tree. How should I judge the classification of leaf nodes according to the visualization output picture? @andrey-khropov Can the indicator "val" be used as a judgment basis?