2
$\begingroup$

I was wondering if there is literature on or someone could explain how to fit a decision tree to a gradient boosted trees classifier in order to derive more interpretable results.

This is apparently the approach that Turi uses in their explain function which outputs something like this:

Turi's explain function

from their page here.

I know that for random forests you can average the contribution of each feature in every tree as seen in the TreeInterpreter python package, but this seems to be a different method, since it is focused on exact splits and one decision tree.

Does anyone know anything more about this method for interpreting gradient boosted trees? Thanks!

$\endgroup$
3
$\begingroup$

Gradient boosting learns multiple decision or regression trees after each other. The difference with random forests is that the trees correct each other. Each new tree is fitted on the residual produced by the predictions from the earlier trees.

The explain method shows for each prediction (i.e. record) why a particular decision was made. This results in a set of decisions. Each tree makes several decisions. The decisions of all trees are stacked to get the set of rules that justifies a single decision. This information is specific for the gradient boosting model and the specific record.

If you want to know more about the gradient boosting model, you may want to consider feature importance. Feature importance expresses how important the features are. You can use print model.get_feature_importance() for this.

$\endgroup$
  • $\begingroup$ Thanks for the reply! Yeah I was wondering if you could go deeper into the explanation of how the trees are stacked to get the set of rules that justifies every decision. Given each tree has different weights in the final model, different splits, etc., how is this final decision tree generated? $\endgroup$ – jtanman Aug 9 '16 at 1:40
  • $\begingroup$ There is no final decision tree. Gradient boosting is an ensemble. It computes a prediction by computing a weighted sum over the predictions of all the independent decision trees. $\endgroup$ – Pieter Aug 9 '16 at 12:09
  • $\begingroup$ Sorry I phrased the question wrongly, how are the final explanation rules generated from an ensemble of decision trees, all with different splits and weights? $\endgroup$ – jtanman Aug 9 '16 at 20:09
  • $\begingroup$ Basically I am familiar with gbm, I just am not sure how the explain method is calculated, since I can't find any other literature on this issue. $\endgroup$ – jtanman Aug 9 '16 at 20:10
  • $\begingroup$ Judging from the explantion and signature in the documentation I think that it returns a list of list of decisions in each tree. explanation['explanation'][0] from the example refers then to the path that the record takes in the first tree. But I am not familiar with Turi. $\endgroup$ – Pieter Aug 12 '16 at 20:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.