h2o.varimp: Retrieve the variable importance.

h2o.varimpR Documentation

Retrieve the variable importance.

Description

Retrieve the variable importance.

Usage

h2o.varimp(object, ...)

Arguments

object

An H2O object.

...

Additional arguments for specific use-cases.

Examples

## Not run: 
library(h2o)
h2o.init()

f <- "https://s3.amazonaws.com/h2o-public-test-data/smalldata/prostate/prostate_complete.csv.zip"
pros <- h2o.importFile(f)
response <- "GLEASON"
predictors <- c("ID", "AGE", "CAPSULE", "DCAPS", "PSA", "VOL", "DPROS")
aml <- h2o.automl(x = predictors, y = response, training_frame = pros, max_runtime_secs = 60)

h2o.varimp(aml, top_n = 20)  # get variable importance matrix for the top 20 models

h2o.varimp(aml@leader)  # get variable importance for the leader model

## End(Not run)

h2o documentation built on May 29, 2024, 4:26 a.m.