---
url: >-
  https://jer-k.github.io/effect-prophet/benchmarks/flat/flat-mixed-components-large.md
---

# Mixed effects, eight months, minmax scaling

&#x20;[← All flat growth benchmarks](/benchmarks/flat)

The same features on 256 daily rows.

## Input

[`benchmark/inputs/v1/flat-mixed-components-large.json`](https://github.com/jer-k/effect-prophet/blob/main/benchmark/inputs/v1/flat-mixed-components-large.json): 256 history rows and 64 forecast rows.

## Output

Largest difference: **4.0e-7** (< 0.0001% of the input's range).

Every forecast row from both libraries.

| Date | Effect Prophet | Python Prophet | Difference |
| --- | ---: | ---: | ---: |
| 2020-09-13 | 19.5305 | 19.5305 | 1.4e-8 |
| 2020-09-14 | 0.2957 | 0.2957 | 1.4e-7 |
| 2020-09-15 | 7.1696 | 7.1696 | 6.3e-8 |
| 2020-09-16 | 34.9807 | 34.9807 | 1.7e-7 |
| 2020-09-17 | 36.2008 | 36.2008 | 1.3e-7 |
| 2020-09-18 | 69.7415 | 69.7415 | 4.0e-7 |
| 2020-09-19 | 50.4458 | 50.4458 | 2.3e-7 |
| 2020-09-20 | 19.5305 | 19.5305 | 1.4e-8 |
| 2020-09-21 | 0.2957 | 0.2957 | 1.4e-7 |
| 2020-09-22 | 35.0006 | 35.0006 | 1.4e-7 |
| 2020-09-23 | 36.1809 | 36.1809 | 1.6e-7 |
| 2020-09-24 | 62.8406 | 62.8406 | 3.7e-7 |
| 2020-09-25 | 69.7415 | 69.7415 | 4.0e-7 |
| 2020-09-26 | 50.4458 | 50.4458 | 2.3e-7 |
| 2020-09-27 | 35.0006 | 35.0006 | 1.4e-7 |
| 2020-09-28 | 0.2957 | 0.2957 | 1.4e-7 |
| 2020-09-29 | 8.3698 | 8.3698 | 7.0e-8 |
| 2020-09-30 | 34.9807 | 34.9807 | 1.7e-7 |
| 2020-10-01 | 62.8406 | 62.8406 | 3.7e-7 |
| 2020-10-02 | 35.0006 | 35.0006 | 1.4e-7 |
| 2020-10-03 | 50.4458 | 50.4458 | 2.3e-7 |
| 2020-10-04 | 19.5305 | 19.5305 | 1.4e-8 |
| 2020-10-05 | 1.4958 | 1.4958 | 1.5e-7 |
| 2020-10-06 | 7.1696 | 7.1696 | 6.3e-8 |
| 2020-10-07 | 35.0006 | 35.0006 | 1.4e-7 |
| 2020-10-08 | 62.8406 | 62.8406 | 3.7e-7 |
| 2020-10-09 | 69.7415 | 69.7415 | 4.0e-7 |
| 2020-10-10 | 50.4458 | 50.4458 | 2.3e-7 |
| 2020-10-11 | 20.7307 | 20.7307 | 2.1e-8 |
| 2020-10-12 | 35.0006 | 35.0006 | 1.4e-7 |
| 2020-10-13 | 7.1696 | 7.1696 | 6.3e-8 |
| 2020-10-14 | 34.9807 | 34.9807 | 1.7e-7 |
| 2020-10-15 | 62.8406 | 62.8406 | 3.7e-7 |
| 2020-10-16 | 69.7415 | 69.7415 | 4.0e-7 |
| 2020-10-17 | 36.2008 | 36.2008 | 1.3e-7 |
| 2020-10-18 | 19.5305 | 19.5305 | 1.4e-8 |
| 2020-10-19 | 0.2957 | 0.2957 | 1.4e-7 |
| 2020-10-20 | 7.1696 | 7.1696 | 6.3e-8 |
| 2020-10-21 | 34.9807 | 34.9807 | 1.7e-7 |
| 2020-10-22 | 35.0006 | 35.0006 | 1.4e-7 |
| 2020-10-23 | 70.9417 | 70.9417 | 3.9e-7 |
| 2020-10-24 | 50.4458 | 50.4458 | 2.3e-7 |
| 2020-10-25 | 19.5305 | 19.5305 | 1.4e-8 |
| 2020-10-26 | 0.2957 | 0.2957 | 1.4e-7 |
| 2020-10-27 | 35.0006 | 35.0006 | 1.4e-7 |
| 2020-10-28 | 34.9807 | 34.9807 | 1.7e-7 |
| 2020-10-29 | 64.0408 | 64.0408 | 3.6e-7 |
| 2020-10-30 | 69.7415 | 69.7415 | 4.0e-7 |
| 2020-10-31 | 50.4458 | 50.4458 | 2.3e-7 |
| 2020-11-01 | 35.0006 | 35.0006 | 1.4e-7 |
| 2020-11-02 | 0.2957 | 0.2957 | 1.4e-7 |
| 2020-11-03 | 7.1696 | 7.1696 | 6.3e-8 |
| 2020-11-04 | 36.1809 | 36.1809 | 1.6e-7 |
| 2020-11-05 | 62.8406 | 62.8406 | 3.7e-7 |
| 2020-11-06 | 35.0006 | 35.0006 | 1.4e-7 |
| 2020-11-07 | 50.4458 | 50.4458 | 2.3e-7 |
| 2020-11-08 | 19.5305 | 19.5305 | 1.4e-8 |
| 2020-11-09 | 0.2957 | 0.2957 | 1.4e-7 |
| 2020-11-10 | 8.3698 | 8.3698 | 7.0e-8 |
| 2020-11-11 | 35.0006 | 35.0006 | 1.4e-7 |
| 2020-11-12 | 62.8406 | 62.8406 | 3.7e-7 |
| 2020-11-13 | 69.7415 | 69.7415 | 4.0e-7 |
| 2020-11-14 | 50.4458 | 50.4458 | 2.3e-7 |
| 2020-11-15 | 19.5305 | 19.5305 | 1.4e-8 |

## Timing

Median of all measured repetitions.

| Step | Effect Prophet | Python Prophet | Effect Prophet is |
| --- | ---: | ---: | --- |
| Convert input rows | 136 µs | 638 µs | 4.7× faster |
| Fit | 2.71 ms | 9.34 ms | 3.4× faster |
| Predict | 486 µs | 4.84 ms | 10× faster |
| Fit and predict | 2.20 ms | 14.3 ms | 6.5× faster |
| Convert, fit and predict | 2.05 ms | 14.9 ms | 7.3× faster |
| First forecast in a new process | 177 ms | 1.49 s | 8.4× faster |
| Save model to JSON | 28 µs | 900 µs | 32× faster |
| Load model from JSON | 162 µs | 4.38 ms | 27× faster |
| Load and predict in a new process | 172 ms | 1.44 s | 8.3× faster |

## Settings

The case declaration both libraries ran.

```json
{
  "kind": "map",
  "comparison": {
    "kind": "equivalent-objective",
    "evidenceId": "flat-map-mixed-v1"
  },
  "configuration": {
    "growth": "flat",
    "scaling": "minmax",
    "seasonalityMode": "additive",
    "holidaysMode": "additive",
    "changepoints": {
      "mode": "auto",
      "count": 25,
      "range": 0.8
    },
    "changepointPriorScale": 0.05,
    "seasonalities": [
      {
        "name": "weekly-custom",
        "periodDays": 7,
        "fourierOrder": 2,
        "priorScale": 10,
        "conditionName": "active",
        "mode": "multiplicative"
      }
    ],
    "events": [
      {
        "name": "campaign",
        "date": "2020-01-22",
        "lowerWindowDays": 0,
        "upperWindowDays": 0,
        "priorScale": 10
      }
    ],
    "regressors": [
      {
        "name": "promotion",
        "priorScale": 10,
        "standardization": "never"
      }
    ]
  },
  "effectOptimizer": {
    "algorithm": "lbfgs",
    "maxIterations": 10000,
    "fallback": "none",
    "lbfgs": {
      "historySize": 5,
      "initAlpha": 0.001,
      "tolObj": 1e-12,
      "tolRelObj": 10000,
      "tolGrad": 1e-8,
      "tolRelGrad": 10000000,
      "tolParam": 1e-8
    }
  },
  "pythonOptimizer": {
    "algorithm": "LBFGS",
    "maxIterations": 10000,
    "newtonFallback": false
  }
}
```
