Values far from zero, absmax scaling
match ← All linear growth benchmarks96 daily rows offset well above zero, with weekly seasonality and one changepoint.
Input
benchmark/inputs/v1/linear-offset-scaling.json: 96 history rows and 24 forecast rows.
Output
Largest difference: 1.2e-11 (< 0.0001% of the input's range).
Every forecast row from both libraries.
| Date | Effect Prophet | Python Prophet | Difference |
|---|---|---|---|
| 2020-04-06 | 110.0819 | 110.0819 | 1.2e-11 |
| 2020-04-07 | 110.2547 | 110.2547 | 1.2e-11 |
| 2020-04-08 | 110.5696 | 110.5696 | 1.2e-11 |
| 2020-04-09 | 110.8826 | 110.8826 | 1.2e-11 |
| 2020-04-10 | 111.0514 | 111.0514 | 1.2e-11 |
| 2020-04-11 | 111.0356 | 111.0356 | 1.2e-11 |
| 2020-04-12 | 110.9363 | 110.9363 | 1.2e-11 |
| 2020-04-13 | 110.9232 | 110.9232 | 1.2e-11 |
| 2020-04-14 | 111.0960 | 111.0960 | 1.2e-11 |
| 2020-04-15 | 111.4109 | 111.4109 | 1.2e-11 |
| 2020-04-16 | 111.7239 | 111.7239 | 1.2e-11 |
| 2020-04-17 | 111.8927 | 111.8927 | 1.2e-11 |
| 2020-04-18 | 111.8768 | 111.8768 | 1.2e-11 |
| 2020-04-19 | 111.7776 | 111.7776 | 1.2e-11 |
| 2020-04-20 | 111.7645 | 111.7645 | 1.2e-11 |
| 2020-04-21 | 111.9372 | 111.9372 | 1.2e-11 |
| 2020-04-22 | 112.2522 | 112.2522 | 1.2e-11 |
| 2020-04-23 | 112.5652 | 112.5652 | 1.2e-11 |
| 2020-04-24 | 112.7340 | 112.7340 | 1.2e-11 |
| 2020-04-25 | 112.7181 | 112.7181 | 1.2e-11 |
| 2020-04-26 | 112.6189 | 112.6189 | 1.2e-11 |
| 2020-04-27 | 112.6058 | 112.6058 | 1.2e-11 |
| 2020-04-28 | 112.7785 | 112.7785 | 1.2e-11 |
| 2020-04-29 | 113.0935 | 113.0935 | 1.2e-11 |
Timing
Median of all measured repetitions.
| Step | Effect Prophet | Python Prophet | Effect Prophet is |
|---|---|---|---|
| Convert input rows | 15 µs | 459 µs | 30× faster |
| Fit | 5.55 ms | 23.3 ms | 4.2× faster |
| Predict | 177 µs | 3.02 ms | 17× faster |
| Fit and predict | 5.44 ms | 26.1 ms | 4.8× faster |
| Convert, fit and predict | 5.83 ms | 26.8 ms | 4.6× faster |
| First forecast in a new process | 170 ms | 1.45 s | 8.5× faster |
| Save model to JSON | 21 µs | 419 µs | 20× faster |
| Load model from JSON | 106 µs | 2.13 ms | 20× faster |
| Load and predict in a new process | 157 ms | 1.44 s | 9.2× faster |
Settings
The case declaration both libraries ran.
json
{
"kind": "map",
"comparison": {
"kind": "equivalent-objective",
"evidenceId": "linear-output-first-v4"
},
"configuration": {
"growth": "linear",
"scaling": "absmax",
"seasonalityMode": "additive",
"holidaysMode": "additive",
"changepoints": {
"mode": "explicit",
"timestamps": [
"2020-02-10T00:00:00.000Z"
]
},
"changepointPriorScale": 0.2,
"seasonalities": [
{
"name": "weekly-custom",
"periodDays": 7,
"fourierOrder": 2,
"priorScale": 10
}
],
"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
}
}