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

# Values far from zero, absmax scaling

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

96 daily rows offset well above zero, with weekly seasonality and one changepoint.

## 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: **1.2e-11** (< 0.0001% of the input's range).

Every forecast row from both libraries.

| Date | Effect Prophet | Python Prophet | Difference |
| --- | ---: | ---: | ---: |
| 2020-04-06 | 110.0819 | 110.0819 | 1.2e-11 |
| 2020-04-07 | 110.2547 | 110.2547 | 1.2e-11 |
| 2020-04-08 | 110.5696 | 110.5696 | 1.2e-11 |
| 2020-04-09 | 110.8826 | 110.8826 | 1.2e-11 |
| 2020-04-10 | 111.0514 | 111.0514 | 1.2e-11 |
| 2020-04-11 | 111.0356 | 111.0356 | 1.2e-11 |
| 2020-04-12 | 110.9363 | 110.9363 | 1.2e-11 |
| 2020-04-13 | 110.9232 | 110.9232 | 1.2e-11 |
| 2020-04-14 | 111.0960 | 111.0960 | 1.2e-11 |
| 2020-04-15 | 111.4109 | 111.4109 | 1.2e-11 |
| 2020-04-16 | 111.7239 | 111.7239 | 1.2e-11 |
| 2020-04-17 | 111.8927 | 111.8927 | 1.2e-11 |
| 2020-04-18 | 111.8768 | 111.8768 | 1.2e-11 |
| 2020-04-19 | 111.7776 | 111.7776 | 1.2e-11 |
| 2020-04-20 | 111.7645 | 111.7645 | 1.2e-11 |
| 2020-04-21 | 111.9372 | 111.9372 | 1.2e-11 |
| 2020-04-22 | 112.2522 | 112.2522 | 1.2e-11 |
| 2020-04-23 | 112.5652 | 112.5652 | 1.2e-11 |
| 2020-04-24 | 112.7340 | 112.7340 | 1.2e-11 |
| 2020-04-25 | 112.7181 | 112.7181 | 1.2e-11 |
| 2020-04-26 | 112.6189 | 112.6189 | 1.2e-11 |
| 2020-04-27 | 112.6058 | 112.6058 | 1.2e-11 |
| 2020-04-28 | 112.7785 | 112.7785 | 1.2e-11 |
| 2020-04-29 | 113.0935 | 113.0935 | 1.2e-11 |

## Timing

Median of all measured repetitions.

| Step | Effect Prophet | Python Prophet | Effect Prophet is |
| --- | ---: | ---: | --- |
| Convert input rows | 21 µs | 474 µs | 23× faster |
| Fit | 5.13 ms | 23.8 ms | 4.6× faster |
| Predict | 252 µs | 3.11 ms | 12× faster |
| Fit and predict | 4.91 ms | 26.7 ms | 5.4× faster |
| Convert, fit and predict | 4.68 ms | 27.2 ms | 5.8× faster |
| First forecast in a new process | 176 ms | 1.45 s | 8.3× faster |
| Save model to JSON | 24 µs | 451 µs | 19× faster |
| Load model from JSON | 115 µs | 2.23 ms | 19× 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": "linear-output-first-v4"
  },
  "configuration": {
    "growth": "linear",
    "scaling": "absmax",
    "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
  }
}
```
