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

# First 232 days, absmax scaling

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

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

## Input

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

## Output

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

Every forecast row from both libraries.

| Date | Effect Prophet | Python Prophet | Difference |
| --- | ---: | ---: | ---: |
| 2020-08-20 | 45.9534 | 45.9534 | 4.3e-8 |
| 2020-08-21 | 48.6567 | 48.6567 | 9.5e-9 |
| 2020-08-22 | 41.0671 | 41.0671 | 9.2e-8 |
| 2020-08-23 | 35.0009 | 35.0009 | 4.9e-8 |
| 2020-08-24 | 22.5599 | 22.5599 | 1.2e-7 |
| 2020-08-25 | 24.0527 | 24.0527 | 4.7e-8 |
| 2020-08-26 | 34.9930 | 34.9930 | 2.7e-8 |

## Timing

Median of all measured repetitions.

| Step | Effect Prophet | Python Prophet | Effect Prophet is |
| --- | ---: | ---: | --- |
| Fit | 2.60 ms | 8.74 ms | 3.4× faster |
| Predict | 152 µs | 4.68 ms | 31× faster |
| Save model to JSON | 20 µs | 792 µs | 40× faster |
| Load model from JSON | 200 µs | 3.79 ms | 19× faster |
| Load and predict in a new process | 162 ms | 1.42 s | 8.7× 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": "absmax",
    "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
  }
}
```
