h2o.predict_json function

H2O Prediction from R without having H2O running

H2O Prediction from R without having H2O running

Provides the method h2o.predict with which you can predict a MOJO or POJO Jar model from R.

h2o.predict_json(model, json, genmodelpath, labels, classpath, javaoptions)

Arguments

  • model: String with file name of MOJO or POJO Jar
  • json: JSON String with inputs to model
  • genmodelpath: (Optional) path name to h2o-genmodel.jar, if not set defaults to same dir as MOJO
  • labels: (Optional) if TRUE then show output labels in result
  • classpath: (Optional) Extra items for the class path of where to look for Java classes, e.g., h2o-genmodel.jar
  • javaoptions: (Optional) Java options string, default if "-Xmx4g"

Returns

Returns an object with the prediction result

Examples

## Not run: library(h2o) h2o.predict_json('~/GBM_model_python_1473313897851_6.zip', '{"C7":1}') h2o.predict_json('~/GBM_model_python_1473313897851_6.zip', '{"C7":1}', c(".", "lib")) ## End(Not run)
  • Maintainer: Tomas Fryda
  • License: Apache License (== 2.0)
  • Last published: 2024-01-11