I'm trying to explore the use of a GBM with h2o
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.
I've ran a baseline GBM (see below) and compared the AUC against the AUC of the logistic regression. THe GBM performs much better.
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).
Now, I would like to evaluate the variable importance of the estimate GBM in the same way.
How does one obtain the variable importance for each of the (two) classes?
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.
Others have asked similar questions, but the answers provided won't work for the H2O object.
Any help is much appreciated.
example.gbm <- h2o.gbm(
x = c("list of predictors"),
y = "binary response variable",
training_frame = data,
max_runtime_secs = 1800,
nfolds=5,
stopping_metric = "AUC")
h2o.varimp(model)
? – missuseh2o.gbm
andh2o.grid
, there appears to be no direct method to achieve it.in fact, had a look at the source code, you can validate thath2o.varimp
returns a single value. – Gangesh Dubey