Events with windows
match ← All linear growth benchmarks96 daily rows with six event dates, including days before and after each one.
Input
benchmark/inputs/v1/map-events-small.json: 96 history rows and 28 forecast rows.
Output
Largest difference: 7.3e-12 (< 0.0001% of the input's range).
Every forecast row from both libraries.
| Date | Effect Prophet | Python Prophet | Difference |
|---|---|---|---|
| 2020-04-06 | 45.3776 | 45.3776 | 7.3e-12 |
| 2020-04-07 | 45.7074 | 45.7074 | 7.3e-12 |
| 2020-04-08 | 46.0372 | 46.0372 | 7.3e-12 |
| 2020-04-09 | 46.3670 | 46.3670 | 7.2e-12 |
| 2020-04-10 | 46.6968 | 46.6968 | 7.2e-12 |
| 2020-04-11 | 47.0266 | 47.0266 | 7.2e-12 |
| 2020-04-12 | 47.3564 | 47.3564 | 7.2e-12 |
| 2020-04-13 | 47.6862 | 47.6862 | 7.2e-12 |
| 2020-04-14 | 48.0160 | 48.0160 | 7.2e-12 |
| 2020-04-15 | 50.9026 | 50.9026 | 5.5e-12 |
| 2020-04-16 | 51.5628 | 51.5628 | 4.8e-12 |
| 2020-04-17 | 51.9025 | 51.9025 | 6.8e-12 |
| 2020-04-18 | 51.7825 | 51.7825 | 6.1e-12 |
| 2020-04-19 | 49.6649 | 49.6649 | 7.1e-12 |
| 2020-04-20 | 49.9947 | 49.9947 | 7.0e-12 |
| 2020-04-21 | 50.3245 | 50.3245 | 7.0e-12 |
| 2020-04-22 | 48.4429 | 48.4429 | 5.7e-12 |
| 2020-04-23 | 48.7026 | 48.7026 | 7.3e-12 |
| 2020-04-24 | 51.3139 | 51.3139 | 7.0e-12 |
| 2020-04-25 | 51.6437 | 51.6437 | 7.0e-12 |
| 2020-04-26 | 51.9735 | 51.9735 | 6.9e-12 |
| 2020-04-27 | 52.3033 | 52.3033 | 6.9e-12 |
| 2020-04-28 | 52.6331 | 52.6331 | 6.9e-12 |
| 2020-04-29 | 52.9629 | 52.9629 | 6.9e-12 |
| 2020-04-30 | 53.2927 | 53.2927 | 6.9e-12 |
| 2020-05-01 | 53.6225 | 53.6225 | 6.8e-12 |
| 2020-05-02 | 53.9523 | 53.9523 | 6.8e-12 |
| 2020-05-03 | 54.2821 | 54.2821 | 6.8e-12 |
Timing
Median of all measured repetitions.
| Step | Effect Prophet | Python Prophet | Effect Prophet is |
|---|---|---|---|
| Convert input rows | 17 µs | 479 µs | 28× faster |
| Fit | 7.18 ms | 28.9 ms | 4.0× faster |
| Predict | 331 µs | 4.21 ms | 13× faster |
| Fit and predict | 6.77 ms | 33.1 ms | 4.9× faster |
| Convert, fit and predict | 6.68 ms | 34.3 ms | 5.1× faster |
| First forecast in a new process | 177 ms | 1.44 s | 8.1× faster |
| Save model to JSON | 26 µs | 632 µs | 24× faster |
| Load model from JSON | 184 µs | 3.41 ms | 19× faster |
| Load and predict in a new process | 158 ms | 1.43 s | 9.0× 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-02-10T00:00:00.000Z"
]
},
"changepointPriorScale": 0.2,
"seasonalities": [],
"events": [
{
"name": "release",
"date": "2020-01-21",
"lowerWindowDays": -1,
"upperWindowDays": 2,
"priorScale": 10
},
{
"name": "release",
"date": "2020-02-20",
"lowerWindowDays": -1,
"upperWindowDays": 2,
"priorScale": 10
},
{
"name": "release",
"date": "2020-04-16",
"lowerWindowDays": -1,
"upperWindowDays": 2,
"priorScale": 10
},
{
"name": "campaign",
"date": "2020-01-22",
"lowerWindowDays": -1,
"upperWindowDays": 0,
"priorScale": 6
},
{
"name": "campaign",
"date": "2020-03-04",
"lowerWindowDays": -1,
"upperWindowDays": 0,
"priorScale": 6
},
{
"name": "campaign",
"date": "2020-04-23",
"lowerWindowDays": -1,
"upperWindowDays": 0,
"priorScale": 6
}
],
"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
}
}