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 | 11 µs | 486 µs | 44× faster |
| Fit | 2.04 ms | 12.3 ms | 6.0× faster |
| Predict | 170 µs | 4.99 ms | 29× faster |
| Fit and predict | 1.79 ms | 16.0 ms | 8.9× faster |
| Convert, fit and predict | 1.59 ms | 19.7 ms | 12× faster |
| First forecast in a new process | 182 ms | 1.46 s | 8.1× faster |
| Save model to JSON | 27 µs | 585 µs | 22× faster |
| Load model from JSON | 141 µs | 3.74 ms | 27× faster |
| Load and predict in a new process | 174 ms | 1.47 s | 8.5× 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
}
}