h2o (version 3.20.0.8)

h2o.aic: Retrieve the Akaike information criterion (AIC) value

Description

Retrieves the AIC value. If "train", "valid", and "xval" parameters are FALSE (default), then the training AIC value is returned. If more than one parameter is set to TRUE, then a named vector of AICs are returned, where the names are "train", "valid" or "xval".

Usage

h2o.aic(object, train = FALSE, valid = FALSE, xval = FALSE)

Arguments

object

An '>H2OModel or '>H2OModelMetrics.

train

Retrieve the training AIC

valid

Retrieve the validation AIC

xval

Retrieve the cross-validation AIC

Examples

Run this code
# NOT RUN {
h2o.init()
prosPath <- system.file("extdata", "prostate.csv", package="h2o")
prostate.hex <- h2o.uploadFile(path = prosPath)
p.sid <- h2o.runif(prostate.hex)
prostate.train <- h2o.assign(prostate.hex[p.sid > .2,], "prostate.train")
prostate.glm <- h2o.glm(x=3:7, y=2, training_frame=prostate.train)
aic.basic <- h2o.aic(prostate.glm)
print(aic.basic)
# }

Run the code above in your browser using DataCamp Workspace