---
url: >-
  https://jer-k.github.io/effect-prophet/benchmarks/flat/flat-prefix-70-minmax.md
---

# First 70 days, minmax scaling

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

The 96-day mixed-feature history cut to its first 70 days: the training window of one cross-validation fold.

## Input

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

## Output

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

Every forecast row from both libraries.

| Date | Effect Prophet | Python Prophet | Difference |
| --- | ---: | ---: | ---: |
| 2020-03-11 | 35.0021 | 35.0021 | 1.4e-7 |
| 2020-03-12 | 62.8710 | 62.8710 | 4.1e-7 |
| 2020-03-13 | 69.8466 | 69.8466 | 2.8e-7 |
| 2020-03-14 | 50.4778 | 50.4778 | 4.9e-8 |
| 2020-03-15 | 20.6352 | 20.6352 | 1.1e-7 |
| 2020-03-16 | 35.0021 | 35.0021 | 1.4e-7 |
| 2020-03-17 | 7.1718 | 7.1718 | 1.0e-7 |

## Timing

Median of all measured repetitions.

| Step | Effect Prophet | Python Prophet | Effect Prophet is |
| --- | ---: | ---: | --- |
| Fit | 1.72 ms | 7.54 ms | 4.4× faster |
| Predict | 212 µs | 4.73 ms | 22× faster |
| Save model to JSON | 20 µs | 651 µs | 33× faster |
| Load model from JSON | 220 µs | 3.62 ms | 16× faster |
| Load and predict in a new process | 160 ms | 1.43 s | 8.9× faster |

## Settings

The case declaration both libraries ran.

```json
{
  "kind": "map",
  "comparison": {
    "kind": "equivalent-objective",
    "evidenceId": "flat-growth-mixed-scaling-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
  }
}
```
