Learn R Programming

h2o (version 2.8.4.4)

h2o.mse: Returns the mean squared error from H2O Classification Predictions

Description

Returns the mean squared error calculated froma column of predicted responses and a column of actual (reference) responses in H2O.

Usage

h2o.mse(data, reference)

Arguments

data
An H2OParsedData object that represents the predicted response values. (Must be a single column).
reference
An H2OParsedData object that represents the actual response values. Must have the same dimensions as data.

Value

  • Returns the mean squared error as a continuous real numeric.

See Also

H2OParsedData

Examples

Run this code
library(h2o)
localH2O = h2o.init()
prosPath = system.file("extdata", "prostate.csv", package="h2o")
prostate.hex = h2o.importFile(localH2O, path = prosPath)
prostate.glm = prostate.glm = h2o.glm(x = c("RACE","PSA","DCAPS"), y = "AGE", 
  data = prostate.hex, family = "gaussian", nfolds = 10, alpha = 0.5)
prostate.pred = h2o.predict(prostate.glm)
h2o.mse(prostate.pred[,1], prostate.hex[,2])

Run the code above in your browser using DataLab