Last chance! 50% off unlimited learning
Sale ends in
h2o.hitRatio(prediction, reference, k = 10, seed = 0)
H2OParsedData
object that represents the predicted response values. Must have the same number of rows as reference
.H2OParsedData
object that represents the actual response values. (Must be a single column).H2OParsedData
library(h2o)
localH2O = h2o.init(ip = "localhost", port = 54321, startH2O = TRUE)
irisPath = system.file("extdata", "iris.csv", package = "h2o")
iris.hex = h2o.importFile(localH2O, path = irisPath)
iris.gbm = h2o.gbm(x = 1:4, y = 5, data = iris.hex)
iris.pred = h2o.predict(iris.gbm)
h2o.hitRatio(iris.pred, iris.hex[,5], k = 3)
Run the code above in your browser using DataLab