tw.endpoints.forecast.predict
tw.endpoints.forecast.predict(configuration=dict,dataset=pandas.DataFrame,model=dict)
Submit a predict job.
POST ``/forecast/predict``
Parameters
configuration : dict
Prediction configuration payload.
dataset : pandas.DataFrame
Data covering the prediction horizon.
model: dict
A trained forecast model.
Returns
dict
API response containing at least ``"id"`` (the new job identifier).
Example Configuration
forecast_predict_configuration = {
'prediction_from': {
'base_unit': 'sample',
'value': 1
},
'prediction_to': {
'base_unit': 'sample',
'value': 1
},
'prediction_boundaries': {
'type': 'explicit',
'max_value': 100,
'min_value': 0
},
'data_alignment': [
{
'column_name': 'string',
'timestamp': 'yyyy-mm-dd hh:mm:ssZ'
}
],
}
Example Usage
forecast_predict_response = tw.endpoints.forecast.predict(
configuration = forecast_predict_configuration,
dataset = dataset,
model = model
)
Example Output
forecast_predict_id = forecast_predict_response['id']