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

# Additive effects, minmax scaling

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

The mixed-effects rows with every effect additive: a switchable weekly pattern, an event and a regressor.

## Input

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

## Output

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

Every forecast row from both libraries.

| Date | Effect Prophet | Python Prophet | Difference |
| --- | ---: | ---: | ---: |
| 2020-04-06 | 21.3492 | 21.3492 | 8.6e-12 |
| 2020-04-07 | 24.0640 | 24.0640 | 2.0e-11 |
| 2020-04-08 | 36.2142 | 36.2142 | 2.1e-11 |
| 2020-04-09 | 45.9466 | 45.9466 | 1.4e-11 |
| 2020-04-10 | 35.0026 | 35.0026 | 7.7e-12 |
| 2020-04-11 | 41.0756 | 41.0756 | 7.6e-12 |
| 2020-04-12 | 28.9242 | 28.9242 | 3.7e-12 |
| 2020-04-13 | 21.3492 | 21.3492 | 8.6e-12 |
| 2020-04-14 | 25.2655 | 25.2655 | 1.9e-11 |
| 2020-04-15 | 35.0026 | 35.0026 | 7.7e-12 |
| 2020-04-16 | 45.9466 | 45.9466 | 1.4e-11 |
| 2020-04-17 | 48.6457 | 48.6457 | 4.3e-14 |
| 2020-04-18 | 41.0756 | 41.0756 | 7.6e-12 |
| 2020-04-19 | 28.9242 | 28.9242 | 3.7e-12 |
| 2020-04-20 | 36.2040 | 36.2040 | 6.4e-12 |
| 2020-04-21 | 24.0640 | 24.0640 | 2.0e-11 |
| 2020-04-22 | 35.0127 | 35.0127 | 2.3e-11 |
| 2020-04-23 | 45.9466 | 45.9466 | 1.4e-11 |
| 2020-04-24 | 48.6457 | 48.6457 | 5.0e-14 |
| 2020-04-25 | 35.0026 | 35.0026 | 7.7e-12 |
| 2020-04-26 | 30.1256 | 30.1256 | 5.0e-12 |
| 2020-04-27 | 21.3492 | 21.3492 | 8.6e-12 |
| 2020-04-28 | 24.0640 | 24.0640 | 2.0e-11 |
| 2020-04-29 | 35.0127 | 35.0127 | 2.3e-11 |

## Timing

Median of all measured repetitions.

| Step | Effect Prophet | Python Prophet | Effect Prophet is |
| --- | ---: | ---: | --- |
| Convert input rows | 58 µs | 518 µs | 9.0× faster |
| Fit | 5.48 ms | 22.3 ms | 4.1× faster |
| Predict | 309 µs | 4.64 ms | 15× faster |
| Fit and predict | 4.82 ms | 27.5 ms | 5.7× faster |
| Convert, fit and predict | 4.52 ms | 28.5 ms | 6.3× faster |
| First forecast in a new process | 177 ms | 1.46 s | 8.3× faster |
| Save model to JSON | 35 µs | 738 µs | 21× faster |
| Load model from JSON | 130 µs | 3.83 ms | 29× faster |
| Load and predict in a new process | 159 ms | 1.47 s | 9.2× faster |

## Settings

The case declaration both libraries ran.

```json
{
  "kind": "map",
  "comparison": {
    "kind": "equivalent-objective",
    "evidenceId": "flat-map-additive-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"
      }
    ],
    "events": [
      {
        "name": "campaign",
        "date": "2020-01-22",
        "lowerWindowDays": 0,
        "upperWindowDays": 0,
        "priorScale": 10
      }
    ],
    "regressors": [
      {
        "name": "promotion",
        "priorScale": 10,
        "standardization": "never"
      }
    ]
  },
  "pythonOptimizer": {
    "algorithm": "Auto",
    "maxIterations": 10000,
    "newtonFallback": true,
    "sigFigs": 12
  }
}
```
