---
url: >-
  https://jer-k.github.io/effect-prophet/benchmarks/linear/map-training-ordered-auto.md
---

# Sorted rows, automatic changepoints

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

96 daily rows with a slope change. Effect and Python fit the same rows; prediction covers 8 days.

## Input

[`benchmark/inputs/v1/training-ordered.json`](https://github.com/jer-k/effect-prophet/blob/main/benchmark/inputs/v1/training-ordered.json): 96 history rows and 8 forecast rows.

## Output

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

Every forecast row from both libraries.

| Date | Effect Prophet | Python Prophet | Difference |
| --- | ---: | ---: | ---: |
| 2020-04-06 | 32.8119 | 32.8119 | 8.9e-10 |
| 2020-04-07 | 33.0424 | 33.0424 | 9.9e-10 |
| 2020-04-08 | 33.2730 | 33.2730 | 1.1e-9 |
| 2020-04-09 | 33.5036 | 33.5036 | 1.2e-9 |
| 2020-04-10 | 33.7341 | 33.7341 | 1.3e-9 |
| 2020-04-11 | 33.9647 | 33.9647 | 1.4e-9 |
| 2020-04-12 | 34.1953 | 34.1953 | 1.5e-9 |
| 2020-04-13 | 34.4258 | 34.4258 | 1.6e-9 |

## Timing

Median of all measured repetitions.

| Step | Effect Prophet | Python Prophet | Effect Prophet is |
| --- | ---: | ---: | --- |
| Fit | 30.9 ms | 108 ms | 3.5× faster |
| Predict | 251 µs | 2.81 ms | 11× faster |
| Save model to JSON | 31 µs | 435 µs | 14× faster |
| Load model from JSON | 256 µs | 2.16 ms | 8.4× faster |
| Load and predict in a new process | 169 ms | 1.45 s | 8.6× 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": "auto",
      "count": 25,
      "range": 0.8
    },
    "changepointPriorScale": 0.05,
    "seasonalities": [],
    "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
  }
}
```
