---
url: >-
  https://jer-k.github.io/effect-prophet/benchmarks/linear/linear-offset-scaling-minmax.md
---

# Values far from zero, minmax scaling

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

The same data scaled to the 0–1 range using its minimum and maximum.

## Input

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

## Output

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

Every forecast row from both libraries.

| Date | Effect Prophet | Python Prophet | Difference |
| --- | ---: | ---: | ---: |
| 2020-04-06 | 110.0815 | 110.0815 | 7.2e-13 |
| 2020-04-07 | 110.2542 | 110.2542 | 4.4e-13 |
| 2020-04-08 | 110.5692 | 110.5692 | 2.8e-13 |
| 2020-04-09 | 110.8822 | 110.8822 | 3.7e-13 |
| 2020-04-10 | 111.0509 | 111.0509 | 6.0e-13 |
| 2020-04-11 | 111.0351 | 111.0351 | 8.2e-13 |
| 2020-04-12 | 110.9358 | 110.9358 | 8.5e-13 |
| 2020-04-13 | 110.9227 | 110.9227 | 6.8e-13 |
| 2020-04-14 | 111.0954 | 111.0954 | 4.1e-13 |
| 2020-04-15 | 111.4104 | 111.4104 | 2.6e-13 |
| 2020-04-16 | 111.7234 | 111.7234 | 3.4e-13 |
| 2020-04-17 | 111.8921 | 111.8921 | 5.4e-13 |
| 2020-04-18 | 111.8763 | 111.8763 | 7.7e-13 |
| 2020-04-19 | 111.7770 | 111.7770 | 8.1e-13 |
| 2020-04-20 | 111.7639 | 111.7639 | 6.3e-13 |
| 2020-04-21 | 111.9366 | 111.9366 | 3.6e-13 |
| 2020-04-22 | 112.2516 | 112.2516 | 2.0e-13 |
| 2020-04-23 | 112.5646 | 112.5646 | 2.7e-13 |
| 2020-04-24 | 112.7333 | 112.7333 | 5.1e-13 |
| 2020-04-25 | 112.7175 | 112.7175 | 7.2e-13 |
| 2020-04-26 | 112.6182 | 112.6182 | 7.5e-13 |
| 2020-04-27 | 112.6051 | 112.6051 | 5.8e-13 |
| 2020-04-28 | 112.7778 | 112.7778 | 3.1e-13 |
| 2020-04-29 | 113.0928 | 113.0928 | 1.8e-13 |

## Timing

Median of all measured repetitions.

| Step | Effect Prophet | Python Prophet | Effect Prophet is |
| --- | ---: | ---: | --- |
| Convert input rows | 13 µs | 475 µs | 37× faster |
| Fit | 5.24 ms | 23.6 ms | 4.5× faster |
| Predict | 240 µs | 3.10 ms | 13× faster |
| Fit and predict | 5.03 ms | 26.9 ms | 5.4× faster |
| Convert, fit and predict | 4.67 ms | 27.4 ms | 5.9× faster |
| First forecast in a new process | 174 ms | 1.48 s | 8.5× faster |
| Save model to JSON | 24 µs | 462 µs | 19× faster |
| Load model from JSON | 136 µs | 2.16 ms | 16× faster |
| Load and predict in a new process | 162 ms | 1.48 s | 9.1× faster |

## Settings

The case declaration both libraries ran.

```json
{
  "kind": "map",
  "comparison": {
    "kind": "equivalent-objective",
    "evidenceId": "linear-output-first-v4"
  },
  "configuration": {
    "growth": "linear",
    "scaling": "minmax",
    "seasonalityMode": "additive",
    "holidaysMode": "additive",
    "changepoints": {
      "mode": "explicit",
      "timestamps": [
        "2020-02-10T00:00:00.000Z"
      ]
    },
    "changepointPriorScale": 0.2,
    "seasonalities": [
      {
        "name": "weekly-custom",
        "periodDays": 7,
        "fourierOrder": 2,
        "priorScale": 10
      }
    ],
    "events": [],
    "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
  }
}
```
