I've got a number of h2o model objects of class H2ORegressionModel and I want to get the number of observations (train, test or total) used to produce every model. Is it possible to get this info programmatically from the model object itself?
I've seen this information listed by "nobs" parameter inside the H2O Flow web interface report in "Output training metrics" and by nobs() function in H2O Python API, but couldn't find it anywhere in R.
Any help/hint would be appreciated. Thanks
Full example in R:
library(h2o)
h2o.init()
gbm <- h2o.gbm(y = "Species", training_frame = as.h2o(iris), seed = 1)
gbm@model$training_metrics@metrics$nobs
# [1] 150
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.