Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

h2o.predict_json

H2O Prediction from R without having H2O running


Description

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

Usage

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"

Value

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)

h2o

R Interface for the 'H2O' Scalable Machine Learning Platform

v3.32.1.2
Apache License (== 2.0)
Authors
Erin LeDell [aut, cre], Navdeep Gill [aut], Spencer Aiello [aut], Anqi Fu [aut], Arno Candel [aut], Cliff Click [aut], Tom Kraljevic [aut], Tomas Nykodym [aut], Patrick Aboyoun [aut], Michal Kurka [aut], Michal Malohlava [aut], Ludi Rehak [ctb], Eric Eckstrand [ctb], Brandon Hill [ctb], Sebastian Vidrio [ctb], Surekha Jadhawani [ctb], Amy Wang [ctb], Raymond Peck [ctb], Wendy Wong [ctb], Jan Gorecki [ctb], Matt Dowle [ctb], Yuan Tang [ctb], Lauren DiPerna [ctb], Tomas Fryda [ctb], H2O.ai [cph, fnd]
Initial release
2021-04-29

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.