Get best model of a given family/algorithm for a given criterion from an AutoML object.
h2o.get_best_model( object, algorithm = c("any", "basemodel", "deeplearning", "drf", "gbm", "glm", "stackedensemble", "xgboost"), criterion = c("AUTO", "AUC", "AUCPR", "logloss", "MAE", "mean_per_class_error", "deviance", "MSE", "predict_time_per_row_ms", "RMSE", "RMSLE", "training_time_ms") )
object
: H2OAutoML object
algorithm
: One of "any", "basemodel", "deeplearning", "drf", "gbm", "glm", "stackedensemble", "xgboost"
criterion
: Criterion can be one of the metrics reported in the leaderboard. If set to NULL, the same ordering as in the leaderboard will be used. Avaliable criteria:
The following additional leaderboard information can be also used as a criterion:
An H2OModel or NULL if no model of a given family is present
## Not run: library(h2o) h2o.init() prostate_path <- system.file("extdata", "prostate.csv", package = "h2o") prostate <- h2o.importFile(path = prostate_path, header = TRUE) y <- "CAPSULE" prostate[,y] <- as.factor(prostate[,y]) #convert to factor for classification aml <- h2o.automl(y = y, training_frame = prostate, max_runtime_secs = 30) gbm <- h2o.get_best_model(aml, "gbm") ## End(Not run)