h2o (version 3.10.3.6)

h2o.make_metrics: Create Model Metrics from predicted and actual values in H2O

Description

Given predicted values (target for regression, class-1 probabilities or binomial or per-class probabilities for multinomial), compute a model metrics object

Usage

h2o.make_metrics(predicted, actuals, domain = NULL, distribution = NULL)

Arguments

predicted
An H2OFrame containing predictions
actuals
An H2OFrame containing actual values
domain
Vector with response factors for classification.
distribution
Distribution for regression.

Value

Returns an object of the subclass.

Examples

Run this code
library(h2o)
h2o.init()
prosPath <- system.file("extdata", "prostate.csv", package="h2o")
prostate.hex <- h2o.uploadFile(path = prosPath)
prostate.hex$CAPSULE <- as.factor(prostate.hex$CAPSULE)
prostate.gbm <- h2o.gbm(3:9, "CAPSULE", prostate.hex)
pred <- h2o.predict(prostate.gbm, prostate.hex)[,3] ## class-1 probability
h2o.make_metrics(pred,prostate.hex$CAPSULE)

Run the code above in your browser using DataLab