Mixed features, 600 draws
match ← All linear growth benchmarks96 daily rows with switchable multiplicative weekly seasonality, an event, a binary regressor and two automatic changepoints. mcmc_samples=300: 4 chains of 150 draws, and 80% ranges from 1,200 simulated futures, two per draw, on 24 rows.
Input
benchmark/inputs/v1/linear-mixed-components.json: 96 history rows and 24 forecast rows.
Output
Largest difference: 0.0069 (0.019% of the input's range).
Every forecast row from both libraries.
| Date | Effect Prophet | Python Prophet | Difference |
|---|---|---|---|
| 2020-04-06 | 26.0165 | 26.0168 | 0.00028 |
| 2020-04-07 | 29.3869 | 29.3873 | 0.00048 |
| 2020-04-08 | 44.1649 | 44.1664 | 0.0015 |
| 2020-04-09 | 56.3159 | 56.3195 | 0.0036 |
| 2020-04-10 | 42.9831 | 42.9856 | 0.0025 |
| 2020-04-11 | 50.5385 | 50.5423 | 0.0038 |
| 2020-04-12 | 35.6511 | 35.6536 | 0.0025 |
| 2020-04-13 | 26.3563 | 26.3573 | 0.00093 |
| 2020-04-14 | 31.1080 | 31.1084 | 0.00039 |
| 2020-04-15 | 43.3811 | 43.3844 | 0.0033 |
| 2020-04-16 | 57.0473 | 57.0523 | 0.0050 |
| 2020-04-17 | 60.5083 | 60.5138 | 0.0054 |
| 2020-04-18 | 51.1925 | 51.1975 | 0.0050 |
| 2020-04-19 | 36.1115 | 36.1150 | 0.0034 |
| 2020-04-20 | 45.1319 | 45.1352 | 0.0033 |
| 2020-04-21 | 30.1530 | 30.1549 | 0.0019 |
| 2020-04-22 | 43.9564 | 43.9609 | 0.0045 |
| 2020-04-23 | 57.7787 | 57.7851 | 0.0065 |
| 2020-04-24 | 61.2827 | 61.2896 | 0.0069 |
| 2020-04-25 | 44.1771 | 44.1819 | 0.0048 |
| 2020-04-26 | 37.9396 | 37.9431 | 0.0035 |
| 2020-04-27 | 27.0359 | 27.0381 | 0.0022 |
| 2020-04-28 | 30.5361 | 30.5388 | 0.0027 |
| 2020-04-29 | 44.5139 | 44.5194 | 0.0055 |
Timing
Median of all measured repetitions.
| Step | Effect Prophet | Python Prophet | Effect Prophet is |
|---|---|---|---|
| Fit | 139 ms | 186 ms | 1.3× faster |
| Predict | 288 µs | 5.07 ms | Not compared: different work |
| Save model to JSON | 273 µs | 13.0 ms | 48× faster |
| Load model from JSON | 2.62 ms | 9.23 ms | 3.5× faster |
| Simulate uncertainty | 2.95 ms | 164 ms | Not compared: different work |
| Load and simulate in a new process | 187 ms | 1.64 s | Not compared: different work |
Some steps aren't compared, because the two libraries' public calls produce different outputs. Their times show what each call costs, not which library is faster.
- Predict: Python's
predicton a posterior also computes every component's range over the draws, while Effect Prophet'spredictreturns point forecasts and leaves ranges topredictWithIntervals. - Simulate uncertainty, Load and simulate in a new process: Python's
predict(vectorized=False)also builds the point forecast and every component, while Effect Prophet'spredictUncertaintyreturns only the ranges.
Settings
The case declaration both libraries ran.
json
{
"kind": "map",
"comparison": {
"kind": "equivalent-posterior",
"evidenceId": "posterior-nuts-v1"
},
"configuration": {
"growth": "linear",
"scaling": "absmax",
"seasonalityMode": "multiplicative",
"holidaysMode": "additive",
"changepoints": {
"mode": "auto",
"count": 2,
"range": 0.8
},
"changepointPriorScale": 0.2,
"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
},
"uncertainty": {
"seed": 19,
"samples": 1000,
"intervalWidth": 0.8,
"output": "intervals",
"algorithm": "scalar-continuous-time",
"evidence": "docs/validation/uncertainty.md#evidence-classes",
"samplerMemoryLimitBytes": 67108864
},
"mcmc": {
"samples": 300,
"seed": 19,
"pointWidthFraction": 0.15
}
}