This documentation is for Machine Learner 1.1.0. View documentation for the latest release.
||
Skip to end of metadata
Go to start of metadata

Overview

DescriptionPredicting a model
Resource Path

/api/models/{id}/predict?percentile={percentileValue}

HTTP MethodPOST
Request/Response Formatapplication/json
Parameter description
Parameter
Description
{id}ID of the model that you need to predict.
{skipDecoding}If this property is set to true, the predicted value is not decoded. This is an optional parameter.
{percentileValue}The percentile value for the prediction. This should be a double value between 0-100. It is required to specify a percentile value when the ML model uses an algorithm of the Anomaly Detection type. This property is optional for other algorithm types. For more information about algorithms of the Anomaly Detection type, see Machine Learner Algorithms.

If you are using a deep learning model to make predictions without H2O runtime, see Using Deep Learning Models without H2O Runtime.

Example
POST https://localhost:9443/api/models/{id}/predict
[
[6,148,72,35,0,33.6,0.627,50]
]

Sample cURL command

curl -X POST -H "Content-Type: application/json" -H "Authorization: Basic YWRtaW46YWRtaW4=" -v https://localhost:9443/api/models/1/predict -k -v -d @'prediction-test.json'

Sample output

[0.9176214029664149]

REST API response

HTTP status code

200

For descriptions of the HTTP status codes, see HTTP Status Codes.

  • No labels