gramex
gramex copied to clipboard
GRAMEX-205 ⁃ ENH: MLHandler supports FBProphet for forecasting
trafficstars
"Prophet" is available as a valid model class in MLHandler now.
Usage
Use the following spec:
mlhandler/prophet:
pattern: /prophet
handler: MLHandler
kwargs:
model:
class: Prophet
xsrf_cookies: false
Download a sample dataset here
- Training:
curl -X POST "/prophet?_action=train&target_col=y" -d @train.json -H "Content-Type: application/json"
# {score: 0.33} Returns the MAE score
- Getting predictions against timestamps
curl -X POST "/prophet?_action=predict&target_col=y" -d @test.json -H "Content-Type: application/json"
# The timestamp column MUST be called "ds"
- Getting forecasts for
nperiods in the future
# Get a month's forecast, assuming daily data
curl -X GET "/prophet?_action=predict&n_perids=30"
To be merged after #547