plot.H2OModel: Plot an H2O Model

Description Usage Arguments Details Value See Also Examples

View source: R/models.R

Description

Plots training set (and validation set if available) scoring history for an H2O Model

Usage

1
2
## S3 method for class 'H2OModel'
plot(x, timestep = "AUTO", metric = "AUTO", ...)

Arguments

x

A fitted H2OModel object for which the scoring history plot is desired.

timestep

A unit of measurement for the x-axis.

metric

A unit of measurement for the y-axis.

...

additional arguments to pass on.

Details

This method dispatches on the type of H2O model to select the correct scoring history. The timestep and metric arguments are restricted to what is available in the scoring history for a particular type of model.

Value

Returns a scoring history plot.

See Also

h2o.deeplearning, h2o.gbm, h2o.glm, h2o.randomForest for model generation in h2o.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
if (requireNamespace("mlbench", quietly=TRUE)) {
    library(h2o)
    h2o.init()
    
    df <- as.h2o(mlbench::mlbench.friedman1(10000,1))
    rng <- h2o.runif(df, seed=1234)
    train <- df[rng<0.8,]
    valid <- df[rng>=0.8,]
    
    gbm <- h2o.gbm(x = 1:10, y = "y", training_frame = train, validation_frame = valid,
                   ntrees=500, learn_rate=0.01, score_each_iteration = TRUE)
    plot(gbm)
    plot(gbm, timestep = "duration", metric = "deviance")
    plot(gbm, timestep = "number_of_trees", metric = "deviance")
    plot(gbm, timestep = "number_of_trees", metric = "rmse")
    plot(gbm, timestep = "number_of_trees", metric = "mae")
}

h2o documentation built on June 17, 2018, 5:03 p.m.