title: How to get different Variable Importance for each class in a binary h2o GBM in R?
body: <p>I'm trying to explore the use of a GBM with <code>h2o</code> for a classification issue to replace a logistic regression (GLM). The non-linearity and interactions in my data make me think a GBM is more suitable.</p>
  
  <p>I've ran a baseline GBM (see below) and compared the AUC against the AUC of the logistic regression. THe GBM performs much better.</p>
  
  <p>In a classic linear logistic regression, one would be able to see the direction and effect of each of the predictors (x) on the outcome variable (y). </p>
  
  <p>Now, I would like to evaluate the variable importance of the estimate GBM in the same way. </p>
  
  <p><strong>How does one obtain the variable importance for each of the (two) classes?</strong></p>
  
  <p>I know that the variable importance is not the same as the estimated coefficient in a logistic regression, but it would help me to understand which predictor impacts what class.  </p>
  
  <p>Others have asked <a href="https://stackoverflow.com/questions/29637145/gbm-r-function-get-variable-importance-separately-for-each-class">similar questions</a>, but the answers provided won't work for the H2O object.</p>
  
  <p>Any help is much appreciated.</p>
  
  <pre><code>example.gbm &lt;- h2o.gbm(
    x = c("list of predictors"), 
    y = "binary response variable", 
    training_frame = data, 
    max_runtime_secs = 1800, 
    nfolds=5,
    stopping_metric = "AUC")
  </code></pre>