Forecast APIedit

After training is completed, you can request the forecast of future feature values using the forecast API.

POST /models/pricing_model/_forecast?from=now&to=now+1h

On success, it will return a job identifier.

* HTTP 1.0, assume close after body
< HTTP/1.0 200 OK
< Content-Type: application/json
< Content-Length: 39
< Server: Werkzeug/0.12.2 Python/3.4.5
< Date: Fri, 14 Mar 2018 10:00:00 GMT
<
"b67c10d6-3886-4285-a19c-2b908323238a"

You can then query the job result using the Job API:

GET /jobs/b67c10d6-3886-4285-a19c-2b908323238a

The result of the above get operation will contain the forecast result, according to feature names and properties defined in your model.

{
    "id": "b67c10d6-3886-4285-a19c-2b908323238a",
    "state": "done",
    "type": "forecast",
    "result": {
        "predicted": {
            "pricing_feature": [
                1.0200526714324951,
                1.0138707160949707,
                1.0268415212631226,
                1.0200526714324951,
                1.0138707160949707,
                1.0268415212631226
            ]
        },
        "timestamps": [
            1521018000.0,
            1521018600.0,
            1521019200.0,
            1521019800.0,
            1521020400.0,
            1521021000.0
        ]
    }
}