Mixed effects, absmax scaling
match ← All flat growth benchmarks96 daily rows with a switchable multiplicative weekly pattern, an event and a regressor.
Input
benchmark/inputs/v1/flat-mixed-components.json: 96 history rows and 24 forecast rows.
Output
Largest difference: 2.1e-7 (< 0.0001% of the input's range).
Every forecast row from both libraries.
| Date | Effect Prophet | Python Prophet | Difference |
|---|---|---|---|
| 2020-04-06 | 21.3492 | 21.3492 | 5.6e-8 |
| 2020-04-07 | 24.0640 | 24.0640 | 1.5e-7 |
| 2020-04-08 | 36.2142 | 36.2142 | 2.1e-7 |
| 2020-04-09 | 45.9466 | 45.9466 | 2.0e-7 |
| 2020-04-10 | 35.0026 | 35.0026 | 1.1e-7 |
| 2020-04-11 | 41.0756 | 41.0756 | 3.3e-8 |
| 2020-04-12 | 28.9241 | 28.9241 | 4.4e-9 |
| 2020-04-13 | 21.3492 | 21.3492 | 5.6e-8 |
| 2020-04-14 | 25.2655 | 25.2655 | 1.5e-7 |
| 2020-04-15 | 35.0026 | 35.0026 | 1.1e-7 |
| 2020-04-16 | 45.9466 | 45.9466 | 2.0e-7 |
| 2020-04-17 | 48.6457 | 48.6457 | 1.2e-7 |
| 2020-04-18 | 41.0756 | 41.0756 | 3.3e-8 |
| 2020-04-19 | 28.9241 | 28.9241 | 4.4e-9 |
| 2020-04-20 | 36.2041 | 36.2041 | 1.1e-7 |
| 2020-04-21 | 24.0640 | 24.0640 | 1.5e-7 |
| 2020-04-22 | 35.0127 | 35.0127 | 2.1e-7 |
| 2020-04-23 | 45.9466 | 45.9466 | 2.0e-7 |
| 2020-04-24 | 48.6457 | 48.6457 | 1.2e-7 |
| 2020-04-25 | 35.0026 | 35.0026 | 1.1e-7 |
| 2020-04-26 | 30.1256 | 30.1256 | 1.0e-9 |
| 2020-04-27 | 21.3492 | 21.3492 | 5.6e-8 |
| 2020-04-28 | 24.0640 | 24.0640 | 1.5e-7 |
| 2020-04-29 | 35.0127 | 35.0127 | 2.1e-7 |
Timing
Median of all measured repetitions.
| Step | Effect Prophet | Python Prophet | Effect Prophet is |
|---|---|---|---|
| Fit | 1.58 ms | 7.92 ms | 5.0× faster |
| Predict | 469 µs | 4.67 ms | 10× faster |
| Save model to JSON | 21 µs | 651 µs | 31× faster |
| Load model from JSON | 226 µs | 3.56 ms | 16× faster |
| Load and predict in a new process | 158 ms | 1.41 s | 9.0× faster |
Settings
The case declaration both libraries ran.
json
{
"kind": "map",
"comparison": {
"kind": "equivalent-objective",
"evidenceId": "flat-growth-mixed-scaling-v1"
},
"configuration": {
"growth": "flat",
"scaling": "absmax",
"seasonalityMode": "additive",
"holidaysMode": "additive",
"changepoints": {
"mode": "auto",
"count": 25,
"range": 0.8
},
"changepointPriorScale": 0.05,
"seasonalities": [
{
"name": "weekly-custom",
"periodDays": 7,
"fourierOrder": 2,
"priorScale": 10,
"conditionName": "active",
"mode": "multiplicative"
}
],
"events": [
{
"name": "campaign",
"date": "2020-01-22",
"lowerWindowDays": 0,
"upperWindowDays": 0,
"priorScale": 10
}
],
"regressors": [
{
"name": "promotion",
"priorScale": 10,
"standardization": "never"
}
]
},
"effectOptimizer": {
"algorithm": "lbfgs",
"maxIterations": 10000,
"fallback": "none",
"lbfgs": {
"historySize": 5,
"initAlpha": 0.001,
"tolObj": 1e-12,
"tolRelObj": 10000,
"tolGrad": 1e-8,
"tolRelGrad": 10000000,
"tolParam": 1e-8
}
},
"pythonOptimizer": {
"algorithm": "LBFGS",
"maxIterations": 10000,
"newtonFallback": false
}
}