h2o (version 3.2.0.3)

h2o.performance: Model Performance Metrics in H2O

Description

Given a trained h2o model, compute its performance on the given dataset

Usage

h2o.performance(model, data = NULL, valid = FALSE, ...)

Arguments

model
An H2OModel object
data
An H2OFrame. The model will make predictions on this dataset, and subsequently score them. The dataset should match the dataset that was used to train the model, in terms of column names, types, and dimensions. If data is passed
valid
A logical value indicating whether to return the validation metrics (constructed during training).
...
Extra args passed in for use by other functions.

Value

  • Returns an object of the H2OModelMetrics subclass.

Examples

Run this code
library(h2o)
localH2O <- h2o.init()
prosPath <- system.file("extdata", "prostate.csv", package="h2o")
prostate.hex <- h2o.uploadFile(localH2O, path = prosPath)
prostate.hex$CAPSULE <- as.factor(prostate.hex$CAPSULE)
prostate.gbm <- h2o.gbm(3:9, "CAPSULE", prostate.hex)
h2o.performance(model = prostate.gbm, data=prostate.hex)

Run the code above in your browser using DataLab