One hand-picked changepoint
match ← All linear growth benchmarks32 daily rows with a changepoint on 13 January and a looser prior scale of 0.2.
Input
benchmark/inputs/v1/linear-small.json: 32 history rows and 16 forecast rows.
Output
Largest difference: 1.0e-11 (< 0.0001% of the input's range).
Every forecast row from both libraries.
| Date | Effect Prophet | Python Prophet | Difference |
|---|---|---|---|
| 2020-02-02 | 23.3806 | 23.3806 | 1.0e-11 |
| 2020-02-03 | 23.7230 | 23.7230 | 1.0e-11 |
| 2020-02-04 | 24.0653 | 24.0653 | 1.0e-11 |
| 2020-02-05 | 24.4076 | 24.4076 | 1.0e-11 |
| 2020-02-06 | 24.7500 | 24.7500 | 1.0e-11 |
| 2020-02-07 | 25.0923 | 25.0923 | 1.0e-11 |
| 2020-02-08 | 25.4346 | 25.4346 | 1.0e-11 |
| 2020-02-09 | 25.7769 | 25.7769 | 1.0e-11 |
| 2020-02-10 | 26.1193 | 26.1193 | 1.0e-11 |
| 2020-02-11 | 26.4616 | 26.4616 | 9.9e-12 |
| 2020-02-12 | 26.8039 | 26.8039 | 9.9e-12 |
| 2020-02-13 | 27.1463 | 27.1463 | 9.9e-12 |
| 2020-02-14 | 27.4886 | 27.4886 | 9.9e-12 |
| 2020-02-15 | 27.8309 | 27.8309 | 9.8e-12 |
| 2020-02-16 | 28.1733 | 28.1733 | 9.8e-12 |
| 2020-02-17 | 28.5156 | 28.5156 | 9.8e-12 |
Timing
Median of all measured repetitions.
| Step | Effect Prophet | Python Prophet | Effect Prophet is |
|---|---|---|---|
| Convert input rows | 6 µs | 453 µs | 78× faster |
| Fit | 1.88 ms | 11.1 ms | 5.9× faster |
| Predict | 191 µs | 2.74 ms | 14× faster |
| Fit and predict | 1.65 ms | 15.0 ms | 9.1× faster |
| Convert, fit and predict | 1.80 ms | 14.8 ms | 8.2× faster |
| First forecast in a new process | 172 ms | 1.48 s | 8.6× faster |
| Save model to JSON | 26 µs | 350 µs | 13× faster |
| Load model from JSON | 113 µs | 2.06 ms | 18× faster |
| Load and predict in a new process | 167 ms | 1.44 s | 8.6× faster |
Settings
The case declaration both libraries ran.
json
{
"kind": "linear-map",
"comparison": {
"kind": "equivalent-objective",
"evidenceId": "linear-output-first-v4"
},
"configuration": {
"effectMap": "explicit",
"changepoints": {
"mode": "explicit",
"timestamps": [
"2020-01-13T00:00:00.000Z"
]
},
"changepointPriorScale": 0.2,
"seasonalities": [],
"events": [],
"regressors": []
},
"effectOptimizer": {
"algorithm": "auto",
"maxIterations": 10000,
"fallback": "newton",
"lbfgs": {
"historySize": 5,
"initAlpha": 0.001,
"tolObj": 1e-12,
"tolRelObj": 10000,
"tolGrad": 1e-8,
"tolRelGrad": 10000000,
"tolParam": 1e-8
}
},
"pythonOptimizer": {
"algorithm": "Auto",
"maxIterations": 10000,
"newtonFallback": true,
"sigFigs": 12
}
}