Everything at once, small
match ← All linear growth benchmarks24 rows with a switchable weekly pattern, a three-day cycle, an event and a regressor.
Input
benchmark/inputs/v1/map-mixed-features-explicit-small.json: 24 history rows and 3 forecast rows.
Output
Largest difference: 1.0e-12 (< 0.0001% of the input's range).
Every forecast row from both libraries.
| Date | Effect Prophet | Python Prophet | Difference |
|---|---|---|---|
| 2020-01-25 | 21.5149 | 21.5149 | 2.9e-13 |
| 2020-01-26 | 21.9165 | 21.9165 | 7.9e-13 |
| 2020-01-27 | 21.2025 | 21.2025 | 1.0e-12 |
Timing
Median of all measured repetitions.
| Step | Effect Prophet | Python Prophet | Effect Prophet is |
|---|---|---|---|
| Convert input rows | 13 µs | 703 µs | 53× faster |
| Fit | 2.02 ms | 13.8 ms | 6.8× faster |
| Predict | 154 µs | 5.12 ms | 33× faster |
| Fit and predict | 1.65 ms | 16.6 ms | 10× faster |
| Convert, fit and predict | 1.68 ms | 16.6 ms | 9.9× faster |
| First forecast in a new process | 189 ms | 1.46 s | 7.8× faster |
| Save model to JSON | 27 µs | 579 µs | 21× faster |
| Load model from JSON | 164 µs | 3.69 ms | 22× faster |
| Load and predict in a new process | 161 ms | 1.42 s | 8.8× faster |
Settings
The case declaration both libraries ran.
json
{
"kind": "linear-map",
"comparison": {
"kind": "equivalent-objective",
"evidenceId": "linear-output-first-v4"
},
"configuration": {
"effectMap": "explicit",
"changepoints": {
"mode": "explicit",
"timestamps": [
"2020-01-11T00:00:00.000Z"
]
},
"changepointPriorScale": 0.2,
"seasonalities": [
{
"name": "weekly-on",
"periodDays": 7,
"fourierOrder": 1,
"priorScale": 10,
"conditionName": "onSeason"
},
{
"name": "three-day",
"periodDays": 3,
"fourierOrder": 1,
"priorScale": 5
}
],
"events": [
{
"name": "launch",
"date": "2020-01-08",
"lowerWindowDays": 0,
"upperWindowDays": 0,
"priorScale": 10
}
],
"regressors": [
{
"name": "promotion",
"priorScale": 10,
"standardization": "never"
}
]
},
"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
}
}