I am writing a survival analysis script, using python and xgboost with objective
suvival:aft. So far I was following the tutorial and documentation. Everything seems to be working but I would like to present the effect of my work as a tree graph. I am using the
plot_tree(model, num_trees) function.
My question is: what are the values plotted in the leaves? I understand, that the whole tree works like a decision tree with decisions based on particular features. In the leaves I have numeric labels, but they don’t seem to be the predictions themselves (I’ve found some negative values in the leaves, which isn’t likely in survival analysis and prediction, right?) - are these some kind of scores or values to be calculated in some way to get the predictions like with the Cox regression?
My second question has to do with the trained trees: I have, for example, 1000 trees. I input some data and get the predictions. Which trees are used by the model for the prediction? Is the predicted value coming from any particular tree or trees (p.e. the last one as it is the best trained or something) or is the prediction a product of all of the model’s trees? Is there a way to present how is the prediction given, based on the plotted trees?