title: GBM R function: get variable importance separately for each class
body: <p>I am using the <a href="http://www.inside-r.org/packages/cran/gbm/docs/gbm" rel="noreferrer">gbm</a> function in R (gbm package) to fit stochastic gradient boosting models for multiclass classification. I am simply trying to obtain the importance of each predictor <strong>separately</strong> for each class, like in this picture from the <a href="https://web.stanford.edu/%7Ehastie/Papers/ESLII.pdf" rel="noreferrer">Hastie book (the Elements of Statistical Learning)</a> (p. 382).</p>
  <p><img src="https://i.stack.imgur.com/0vrCW.png" alt="enter image description here" /></p>
  <p>However, the function <code>summary.gbm</code> only returns the <strong>overall</strong> importance of the predictors (their importance averaged over all classes).</p>
  <p>Does anyone know how to get the relative importance values?</p>