Given predicted values (target for regression, class-1 probabilities or binomial or per-class probabilities for multinomial), compute a model metrics object
h2o.make_metrics( predicted, actuals, domain = NULL, distribution = NULL, weights = NULL, auc_type = "NONE" )
predicted | An H2OFrame containing predictions |
---|---|
actuals | An H2OFrame containing actual values |
domain | Vector with response factors for classification. |
distribution | Distribution for regression. |
weights | (optional) An H2OFrame containing observation weights. |
auc_type | (optional) For multinomial classification you have to specify which type of agregated AUC/AUCPR will be used to calculate this metric. |
Returns an object of the H2OModelMetrics subclass.
# NOT RUN { library(h2o) h2o.init() prostate_path <- system.file("extdata", "prostate.csv", package = "h2o") prostate <- h2o.uploadFile(path = prostate_path) prostate$CAPSULE <- as.factor(prostate$CAPSULE) prostate_gbm <- h2o.gbm(3:9, "CAPSULE", prostate) pred <- h2o.predict(prostate_gbm, prostate)[, 3] ## class-1 probability h2o.make_metrics(pred, prostate$CAPSULE) # }