h2o (version 3.2.0.3)

h2o.loadModel: Load H2O Model from HDFS or Local Disk

Description

Load a saved H2O model from disk.

Usage

h2o.loadModel(path, conn = h2o.getConnection())

Arguments

path
The path of the H2O Model to be imported. For example, if the `dir` argument in h2o.saveModel was set to "/Users/UserName/Desktop" then the `path` argument in h2o.loadModel should be set to something like "/Users/UserName/Desktop/K-meansModel__a7cebf318ca
conn
an H2OConnection object containing the IP address and port of the server running H2O.

Value

  • Returns a H2OModel object of the class corresponding to the type of model built.

See Also

h2o.saveModel, H2OModel

Examples

Run this code
# library(h2o)
# localH2O = h2o.init()
# prosPath = system.file("extdata", "prostate.csv", package = "h2o")
# prostate.hex = h2o.importFile(localH2O, path = prosPath, destination_frame = "prostate.hex")
# prostate.glm = h2o.glm(y = "CAPSULE", x = c("AGE","RACE","PSA","DCAPS"),
#   training_frame = prostate.hex, family = "binomial", alpha = 0.5)
# glmmodel.path = h2o.saveModel(prostate.glm, dir = "/Users/UserName/Desktop")
# glmmodel.load = h2o.loadModel(localH2O, glmmodel.path)

Run the code above in your browser using DataLab