<p>The interpretation of decision tree ensembles is much harder than interpreting individual trees, as you note. Geometrically you can think about a decision tree ensemble as an approximation of a complex, high dimensional surface. The goal is to find variables that contribute to the approximation, and to visualize their effects.</p>

<p>The basic idea for interpreting an ensemble is not to get an 'average' tree, or to obtain plots of any of the individual trees, but to visualize the 'average' effect of the variable. In the literature, this is the 'partial dependence' of the predictor - it's effect holding the other variables constant. How the "partial dependence" is estimated is a little complicated to describe, but it is the model implied predictions obtained by allowing only predictor <em>j</em> to vary, for observation <em>i</em>. The predictions are then averaged over all <em>i</em> observations. See <a href="http://arxiv.org/pdf/0811.1679.pdf%20%22(Friedman%20&amp;%20Popesdue,%202008)" rel="nofollow noreferrer">Friedman &amp; Popescue (2008)</a> for the gory details. </p>

<p>You can then plot estimated dependence (or what I call refer to as the "model implied") effect of the predictor against the actual values of the predictor. This let's you see the model implied effect of the predictor.</p>

<p>The good news is that such plots can be obtained in <code>dismo</code> pretty easily. See <code>gbm.plot</code> for single predictors, and <code>gbm.perspec</code> for perspective plots involving two predictors. The vignette also provides examples. To further help interpret the model, <code>gbm.interactions</code> provides a way to detect possible 2 or 3-way interactions. See <a href="https://stackoverflow.com/questions/29998014/gbminteract-gbm-vs-dismogbm-interactions/32762708#32762708">this question</a> for more details on that.</p>
(R) Plot dendrograms BRT models from gbm.step
<p>(previously posted <a href="https://stackoverflow.com/questions/27880856/how-to-plot-dendrograms-of-gbm-aka-brt-models-r">here</a>, to the wrong sub, with not enough info, which was closed, I edited, the edits seem to have been deleted, &amp; the post consigned to purgatory, so apologies for re-posting, I don't know whether the previous post can/should be resurrected)</p>

<p>In R, I've run some Boosted Regression Trees, aka Generalized Boosting Models, using <code>dismo</code> which uses <code>gbm</code>. Reproducible example to get people to where I am currently:</p>

<pre><code>library(dismo); data(Anguilla_train)
angaus.tc5.lr01 &lt;- gbm.step(data=Anguilla_train, gbm.x = 3:13, gbm.y = 2, family = "bernoulli", tree.complexity = 5, learning.rate = 0.01, bag.fraction = 0.5)
</code></pre>

<p>(From <a href="http://cran.r-project.org/web/packages/dismo/vignettes/brt.pdf" rel="nofollow noreferrer">here</a>). This leaves you with gbm model object "angaus.tc5.lr01".
I'd like to generate dendrograms of the splits (folds?), i.e. plot the trees, as per De'ath 2007 (see pic, left pane). BUT: De'ath's plot is of a single regression tree, not a boosted regression tree which is the average of potentially thousands of trees each run with a different set of data randomly drawn from the dataset.</p>

<p>User <strong>ckluss</strong> kindly suggested rpart, however that needs the model to be generated by <code>rpart</code> so doesn't work for BRTs/GBMs produced by <code>gbm.step</code>. The same is true of <code>prp</code> from <code>rpart.plot</code>.</p>

<p><code>pretty.gbm.tree</code> in <code>gbm</code> extracts a matrix of info for any one tree selected (try <code>pretty.gbm.tree(angaus.tc5.lr01, i.tree=1)</code> for the first) so I'm wondering if this might be a plausible route to success? E.g. by writing some script which creates an averaged tree matrix using all of the available trees, then converting this into a tree-like object, possibly using some of the methods <a href="https://stats.stackexchange.com/questions/41443/how-to-actually-plot-a-sample-tree-from-randomforestgettree">here</a>.</p>

<p>People have asked varyingly similar questions seemingly with no success elsewhere on the net. BRT models are regularly described as being 'black boxes' so maybe the general opinion is that one shouldn't need/be able/bother to probe into them and display their inner processes.</p>

<p>If anyone knows enough about BRTs / <code>gbm</code> and has any ideas, they'd be gratefully received.
Thanks.</p>

<p><img src="https://i.stack.imgur.com/I6orv.png" alt="De&#39;ath tree diagram"></p>