Additive effects, minmax scaling
match ← All flat growth benchmarksThe mixed-effects rows with every effect additive: a switchable 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.3e-11 (< 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 | 8.6e-12 |
| 2020-04-07 | 24.0640 | 24.0640 | 2.0e-11 |
| 2020-04-08 | 36.2142 | 36.2142 | 2.1e-11 |
| 2020-04-09 | 45.9466 | 45.9466 | 1.4e-11 |
| 2020-04-10 | 35.0026 | 35.0026 | 7.7e-12 |
| 2020-04-11 | 41.0756 | 41.0756 | 7.6e-12 |
| 2020-04-12 | 28.9242 | 28.9242 | 3.7e-12 |
| 2020-04-13 | 21.3492 | 21.3492 | 8.6e-12 |
| 2020-04-14 | 25.2655 | 25.2655 | 1.9e-11 |
| 2020-04-15 | 35.0026 | 35.0026 | 7.7e-12 |
| 2020-04-16 | 45.9466 | 45.9466 | 1.4e-11 |
| 2020-04-17 | 48.6457 | 48.6457 | 4.3e-14 |
| 2020-04-18 | 41.0756 | 41.0756 | 7.6e-12 |
| 2020-04-19 | 28.9242 | 28.9242 | 3.7e-12 |
| 2020-04-20 | 36.2040 | 36.2040 | 6.4e-12 |
| 2020-04-21 | 24.0640 | 24.0640 | 2.0e-11 |
| 2020-04-22 | 35.0127 | 35.0127 | 2.3e-11 |
| 2020-04-23 | 45.9466 | 45.9466 | 1.4e-11 |
| 2020-04-24 | 48.6457 | 48.6457 | 5.0e-14 |
| 2020-04-25 | 35.0026 | 35.0026 | 7.7e-12 |
| 2020-04-26 | 30.1256 | 30.1256 | 5.0e-12 |
| 2020-04-27 | 21.3492 | 21.3492 | 8.6e-12 |
| 2020-04-28 | 24.0640 | 24.0640 | 2.0e-11 |
| 2020-04-29 | 35.0127 | 35.0127 | 2.3e-11 |
Timing
Median of all measured repetitions.
| Step | Effect Prophet | Python Prophet | Effect Prophet is |
|---|---|---|---|
| Convert input rows | 61 µs | 507 µs | 8.3× faster |
| Fit | 5.05 ms | 21.9 ms | 4.3× faster |
| Predict | 378 µs | 4.53 ms | 12× faster |
| Fit and predict | 4.67 ms | 26.9 ms | 5.8× faster |
| Convert, fit and predict | 4.59 ms | 27.4 ms | 6.0× faster |
| First forecast in a new process | 170 ms | 1.42 s | 8.4× faster |
| Save model to JSON | 33 µs | 648 µs | 20× faster |
| Load model from JSON | 126 µs | 3.60 ms | 29× faster |
| Load and predict in a new process | 155 ms | 1.41 s | 9.1× faster |
Settings
The case declaration both libraries ran.
json
{
"kind": "map",
"comparison": {
"kind": "equivalent-objective",
"evidenceId": "flat-map-additive-v1"
},
"configuration": {
"growth": "flat",
"scaling": "minmax",
"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"
}
],
"events": [
{
"name": "campaign",
"date": "2020-01-22",
"lowerWindowDays": 0,
"upperWindowDays": 0,
"priorScale": 10
}
],
"regressors": [
{
"name": "promotion",
"priorScale": 10,
"standardization": "never"
}
]
},
"pythonOptimizer": {
"algorithm": "Auto",
"maxIterations": 10000,
"newtonFallback": true,
"sigFigs": 12
}
}