Mixed effects, eight months, minmax scaling
match ← All flat growth benchmarksThe same features on 256 daily rows.
Input
benchmark/inputs/v1/flat-mixed-components-large.json: 256 history rows and 64 forecast rows.
Output
Largest difference: 4.0e-7 (< 0.0001% of the input's range).
Every forecast row from both libraries.
| Date | Effect Prophet | Python Prophet | Difference |
|---|---|---|---|
| 2020-09-13 | 19.5305 | 19.5305 | 1.4e-8 |
| 2020-09-14 | 0.2957 | 0.2957 | 1.4e-7 |
| 2020-09-15 | 7.1696 | 7.1696 | 6.3e-8 |
| 2020-09-16 | 34.9807 | 34.9807 | 1.7e-7 |
| 2020-09-17 | 36.2008 | 36.2008 | 1.3e-7 |
| 2020-09-18 | 69.7415 | 69.7415 | 4.0e-7 |
| 2020-09-19 | 50.4458 | 50.4458 | 2.3e-7 |
| 2020-09-20 | 19.5305 | 19.5305 | 1.4e-8 |
| 2020-09-21 | 0.2957 | 0.2957 | 1.4e-7 |
| 2020-09-22 | 35.0006 | 35.0006 | 1.4e-7 |
| 2020-09-23 | 36.1809 | 36.1809 | 1.6e-7 |
| 2020-09-24 | 62.8406 | 62.8406 | 3.7e-7 |
| 2020-09-25 | 69.7415 | 69.7415 | 4.0e-7 |
| 2020-09-26 | 50.4458 | 50.4458 | 2.3e-7 |
| 2020-09-27 | 35.0006 | 35.0006 | 1.4e-7 |
| 2020-09-28 | 0.2957 | 0.2957 | 1.4e-7 |
| 2020-09-29 | 8.3698 | 8.3698 | 7.0e-8 |
| 2020-09-30 | 34.9807 | 34.9807 | 1.7e-7 |
| 2020-10-01 | 62.8406 | 62.8406 | 3.7e-7 |
| 2020-10-02 | 35.0006 | 35.0006 | 1.4e-7 |
| 2020-10-03 | 50.4458 | 50.4458 | 2.3e-7 |
| 2020-10-04 | 19.5305 | 19.5305 | 1.4e-8 |
| 2020-10-05 | 1.4958 | 1.4958 | 1.5e-7 |
| 2020-10-06 | 7.1696 | 7.1696 | 6.3e-8 |
| 2020-10-07 | 35.0006 | 35.0006 | 1.4e-7 |
| 2020-10-08 | 62.8406 | 62.8406 | 3.7e-7 |
| 2020-10-09 | 69.7415 | 69.7415 | 4.0e-7 |
| 2020-10-10 | 50.4458 | 50.4458 | 2.3e-7 |
| 2020-10-11 | 20.7307 | 20.7307 | 2.1e-8 |
| 2020-10-12 | 35.0006 | 35.0006 | 1.4e-7 |
| 2020-10-13 | 7.1696 | 7.1696 | 6.3e-8 |
| 2020-10-14 | 34.9807 | 34.9807 | 1.7e-7 |
| 2020-10-15 | 62.8406 | 62.8406 | 3.7e-7 |
| 2020-10-16 | 69.7415 | 69.7415 | 4.0e-7 |
| 2020-10-17 | 36.2008 | 36.2008 | 1.3e-7 |
| 2020-10-18 | 19.5305 | 19.5305 | 1.4e-8 |
| 2020-10-19 | 0.2957 | 0.2957 | 1.4e-7 |
| 2020-10-20 | 7.1696 | 7.1696 | 6.3e-8 |
| 2020-10-21 | 34.9807 | 34.9807 | 1.7e-7 |
| 2020-10-22 | 35.0006 | 35.0006 | 1.4e-7 |
| 2020-10-23 | 70.9417 | 70.9417 | 3.9e-7 |
| 2020-10-24 | 50.4458 | 50.4458 | 2.3e-7 |
| 2020-10-25 | 19.5305 | 19.5305 | 1.4e-8 |
| 2020-10-26 | 0.2957 | 0.2957 | 1.4e-7 |
| 2020-10-27 | 35.0006 | 35.0006 | 1.4e-7 |
| 2020-10-28 | 34.9807 | 34.9807 | 1.7e-7 |
| 2020-10-29 | 64.0408 | 64.0408 | 3.6e-7 |
| 2020-10-30 | 69.7415 | 69.7415 | 4.0e-7 |
| 2020-10-31 | 50.4458 | 50.4458 | 2.3e-7 |
| 2020-11-01 | 35.0006 | 35.0006 | 1.4e-7 |
| 2020-11-02 | 0.2957 | 0.2957 | 1.4e-7 |
| 2020-11-03 | 7.1696 | 7.1696 | 6.3e-8 |
| 2020-11-04 | 36.1809 | 36.1809 | 1.6e-7 |
| 2020-11-05 | 62.8406 | 62.8406 | 3.7e-7 |
| 2020-11-06 | 35.0006 | 35.0006 | 1.4e-7 |
| 2020-11-07 | 50.4458 | 50.4458 | 2.3e-7 |
| 2020-11-08 | 19.5305 | 19.5305 | 1.4e-8 |
| 2020-11-09 | 0.2957 | 0.2957 | 1.4e-7 |
| 2020-11-10 | 8.3698 | 8.3698 | 7.0e-8 |
| 2020-11-11 | 35.0006 | 35.0006 | 1.4e-7 |
| 2020-11-12 | 62.8406 | 62.8406 | 3.7e-7 |
| 2020-11-13 | 69.7415 | 69.7415 | 4.0e-7 |
| 2020-11-14 | 50.4458 | 50.4458 | 2.3e-7 |
| 2020-11-15 | 19.5305 | 19.5305 | 1.4e-8 |
Timing
Median of all measured repetitions.
| Step | Effect Prophet | Python Prophet | Effect Prophet is |
|---|---|---|---|
| Convert input rows | 67 µs | 638 µs | 9.5× faster |
| Fit | 2.26 ms | 9.13 ms | 4.0× faster |
| Predict | 515 µs | 4.71 ms | 9.2× faster |
| Fit and predict | 2.23 ms | 13.7 ms | 6.2× faster |
| Convert, fit and predict | 2.15 ms | 14.5 ms | 6.7× faster |
| First forecast in a new process | 174 ms | 1.44 s | 8.2× faster |
| Save model to JSON | 35 µs | 819 µs | 24× faster |
| Load model from JSON | 194 µs | 3.87 ms | 20× faster |
| Load and predict in a new process | 164 ms | 1.44 s | 8.8× faster |
Settings
The case declaration both libraries ran.
json
{
"kind": "map",
"comparison": {
"kind": "equivalent-objective",
"evidenceId": "flat-map-mixed-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",
"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
}
}