automl_leaderboard: H2O AutoML Leaderboard Utilities

Description Usage Arguments Value Examples

View source: R/core-leaderboard.R

Description

The H2O AutoML Leaderboard lists any models that have been created during the automl_reg() training process.

Usage

1
2
3
automl_leaderboard(object)

automl_update_model(object, model_id)

Arguments

object

An object created by automl_reg() and trained (fitted).

model_id

An H2O Model ID (shown in the AutoML Leaderboard). Alternatively, the user can provide an H2O model.

Value

Examples

 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)
  

modeltime.h2o documentation built on April 5, 2021, 5:07 p.m.