Description Usage Arguments Value Examples
View source: R/core-leaderboard.R
The H2O AutoML Leaderboard lists any models that have been created during the automl_reg()
training process.
The training process automatically uses the top model.
The available models can be shown with automl_leaderboard()
The model change the model used using automl_update_model()
.
1 2 3 | automl_leaderboard(object)
automl_update_model(object, model_id)
|
object |
An object created by |
model_id |
An H2O Model ID (shown in the AutoML Leaderboard). Alternatively, the user can provide an H2O model. |
automl_leaderboard()
: A tibble
containing the H2O AutoML Leaderboard
automl_update_model()
: An updated parnsip
or workflow
with the H2O Model updated
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | ## Not run:
library(tidymodels)
library(modeltime.h2o)
library(h2o)
library(tidyverse)
library(timetk)
h2o.init(
nthreads = -1,
ip = 'localhost',
port = 54321
)
# Model Spec
model_spec <- automl_reg(mode = 'regression') %>%
set_engine(
engine = 'h2o',
max_runtime_secs = 5,
max_runtime_secs_per_model = 4,
nfolds = 5,
max_models = 3,
exclude_algos = c("DeepLearning"),
seed = 786
)
# Fit AutoML
model_fit <- model_spec %>%
fit(value ~ ., data = training(m750_splits))
# Inspect the Leaderboard
leaderboard_tbl <- automl_leaderboard(model_fit)
leaderboard_tbl
# Swap an H2O Model Out (Using the 2nd model from the leaderboard)
model_id_2 <- leaderboard_tbl$model_id[[2]]
model_fit_2 <- automl_update_model(model_fit, model_id_2)
model_fit_2
# Shutdown H2O when Finished.
# Make sure to save any work before.
h2o.shutdown(prompt = FALSE)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.