Last chance! 50% off unlimited learning
Sale ends in
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".
h2o.aic(object, train = FALSE, valid = FALSE, xval = FALSE)
An H2OModel or H2OModelMetrics.
Retrieve the training AIC
Retrieve the validation AIC
Retrieve the cross-validation AIC
if (FALSE) {
library(h2o)
h2o.init()
prostate_path <- system.file("extdata", "prostate.csv", package = "h2o")
prostate <- h2o.uploadFile(path = prostate_path)
p_sid <- h2o.runif(prostate)
prostate_train <- prostate[p_sid > .2,]
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 DataLab