Last chance! 50% off unlimited learning
Sale ends in
h2o.confusionMatrix(object, ...)## S3 method for class 'H2OModel':
h2o.confusionMatrix(object, newdata, valid = FALSE, ...)
## S3 method for class 'H2OModelMetrics':
h2o.confusionMatrix(object, thresholds = NULL,
metrics = NULL)
predict
function.
If used on an predict
for generating prediction frames,
h2o.performance
for creating
library(h2o)
h2o.init()
prosPath <- system.file("extdata", "prostate.csv", package="h2o")
hex <- h2o.uploadFile(prosPath)
hex[,2] <- as.factor(hex[,2])
model <- h2o.gbm(x = 3:9, y = 2, training_frame = hex, distribution = "bernoulli")
h2o.confusionMatrix(model, hex)
# Generating a ModelMetrics object
perf <- h2o.performance(model, hex)
h2o.confusionMatrix(perf)
Run the code above in your browser using DataLab