Prediction intervals support
To enable support for prediction intervals in H2O MLOps, set requestPredictionIntervals
parameter to true
. Note that if prediction intervals are not supported by the model or not returned for some reason, H2O MLOps will either leave the field empty or return an error response. This mechanism ensures that you are aware when prediction intervals are not available.
Once enabled, the prediction intervals are returned as an array. For each prediction, a lower and upper bound are returned.
Note: Prediction interval support is currently only available for regression models in all MOJO runtimes and the Driverless AI scoring pipeline runtime.
Code example with requestPredictionIntervals
enabled
Input:
# Java MOJO runtime
requests.get(java_mojo_score_url.replace('score','capabilities')).json()
Output:
['SCORE_PREDICTION_INTERVAL',
'SCORE',
'CONTRIBUTION_ORIGINAL',
'CONTRIBUTION_TRANSFORMED']
Input:
requests.post(java_mojo_score_url, json=sample_request).json()
Output:
{'fields': ['score'],
'id': '1b0488b6-ee91-11ed-a05d-4ab989c17db4',
'predictionIntervals': {'fields': ['score.lower',
'score.upper'],
'rows': [['55524.044704861124', '371673.57907986105']]},
'score': [['200005.90798611112']]}
Feedback
- Submit and view feedback for this page
- Send feedback about H2O MLOps to cloud-feedback@h2o.ai