com.atlassian.confluence.content.render.xhtml.migration.exceptions.UnknownMacroMigrationException: The macro 'next_previous_link3' is unknown.
Predicting a Model via REST API
Overview
Description | Predicting a model |
Resource Path |
|
HTTP Method | POST |
Request/Response Format | application/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. |