Weekly pattern on irregular dates
match ← All linear growth benchmarks192 unevenly spaced rows with a custom weekly seasonality and two changepoints.
Input
benchmark/inputs/v1/map-irregular-medium.json: 192 history rows and 48 forecast rows.
Output
Largest difference: 6.9e-5 (< 0.0001% of the input's range).
Every forecast row from both libraries.
| Date | Effect Prophet | Python Prophet | Difference |
|---|---|---|---|
| 2020-08-17 | 84.4721 | 84.4720 | 3.6e-5 |
| 2020-08-18 | 84.7457 | 84.7457 | 1.9e-5 |
| 2020-08-19 | 85.3132 | 85.3132 | 3.1e-5 |
| 2020-08-20 | 85.8875 | 85.8875 | 4.4e-5 |
| 2020-08-22 | 86.6631 | 86.6631 | 4.8e-5 |
| 2020-08-23 | 87.0718 | 87.0718 | 3.5e-5 |
| 2020-08-24 | 87.4771 | 87.4770 | 4.0e-5 |
| 2020-08-25 | 87.7507 | 87.7507 | 2.2e-5 |
| 2020-08-26 | 88.3182 | 88.3182 | 3.5e-5 |
| 2020-08-27 | 88.8925 | 88.8925 | 4.8e-5 |
| 2020-08-28 | 89.1471 | 89.1470 | 4.6e-5 |
| 2020-08-30 | 90.0768 | 90.0768 | 3.9e-5 |
| 2020-08-31 | 90.4820 | 90.4820 | 4.3e-5 |
| 2020-09-01 | 90.7557 | 90.7556 | 2.6e-5 |
| 2020-09-02 | 91.3232 | 91.3231 | 3.8e-5 |
| 2020-09-03 | 91.8975 | 91.8974 | 5.1e-5 |
| 2020-09-04 | 92.1521 | 92.1520 | 4.9e-5 |
| 2020-09-06 | 93.0818 | 93.0818 | 4.2e-5 |
| 2020-09-08 | 93.7606 | 93.7606 | 2.9e-5 |
| 2020-09-09 | 94.3282 | 94.3281 | 4.2e-5 |
| 2020-09-10 | 94.9025 | 94.9024 | 5.5e-5 |
| 2020-09-11 | 95.1570 | 95.1570 | 5.3e-5 |
| 2020-09-12 | 95.6780 | 95.6780 | 5.8e-5 |
| 2020-09-13 | 96.0868 | 96.0867 | 4.6e-5 |
| 2020-09-14 | 96.4920 | 96.4919 | 5.0e-5 |
| 2020-09-16 | 97.3331 | 97.3331 | 4.5e-5 |
| 2020-09-17 | 97.9074 | 97.9074 | 5.8e-5 |
| 2020-09-18 | 98.1620 | 98.1620 | 5.6e-5 |
| 2020-09-19 | 98.6830 | 98.6829 | 6.2e-5 |
| 2020-09-20 | 99.0917 | 99.0917 | 4.9e-5 |
| 2020-09-21 | 99.4970 | 99.4969 | 5.4e-5 |
| 2020-09-22 | 99.7706 | 99.7706 | 3.6e-5 |
| 2020-09-24 | 100.9124 | 100.9124 | 6.2e-5 |
| 2020-09-25 | 101.1670 | 101.1669 | 6.0e-5 |
| 2020-09-26 | 101.6880 | 101.6879 | 6.5e-5 |
| 2020-09-27 | 102.0967 | 102.0967 | 5.3e-5 |
| 2020-09-29 | 102.7756 | 102.7755 | 4.0e-5 |
| 2020-09-30 | 103.3431 | 103.3430 | 5.2e-5 |
| 2020-10-01 | 103.9174 | 103.9173 | 6.5e-5 |
| 2020-10-03 | 104.6930 | 104.6929 | 6.9e-5 |
| 2020-10-04 | 105.1017 | 105.1016 | 5.6e-5 |
| 2020-10-05 | 105.5069 | 105.5069 | 6.1e-5 |
| 2020-10-06 | 105.7806 | 105.7805 | 4.3e-5 |
| 2020-10-07 | 106.3481 | 106.3480 | 5.6e-5 |
| 2020-10-08 | 106.9224 | 106.9223 | 6.9e-5 |
| 2020-10-09 | 107.1769 | 107.1769 | 6.7e-5 |
| 2020-10-11 | 108.1067 | 108.1066 | 6.0e-5 |
| 2020-10-12 | 108.5119 | 108.5118 | 6.4e-5 |
Timing
Median of all measured repetitions.
| Step | Effect Prophet | Python Prophet | Effect Prophet is |
|---|---|---|---|
| Convert input rows | 30 µs | 533 µs | 17× faster |
| Fit | 2.00 ms | 8.05 ms | 4.0× faster |
| Predict | 399 µs | 3.17 ms | 7.9× faster |
| Fit and predict | 1.49 ms | 11.3 ms | 7.6× faster |
| Convert, fit and predict | 1.57 ms | 11.6 ms | 7.4× faster |
| Save model to JSON | 17 µs | 515 µs | 30× faster |
| Load model from JSON | 95 µs | 2.35 ms | 25× faster |
| Load and predict in a new process | 165 ms | 1.42 s | 8.6× 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-03-26T00:00:00.000Z",
"2020-06-09T00:00:00.000Z"
]
},
"changepointPriorScale": 0.2,
"seasonalities": [
{
"name": "weekly-custom",
"periodDays": 7,
"fourierOrder": 3,
"priorScale": 10
}
],
"events": [],
"regressors": []
},
"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
}
}