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

# Shuffled rows, automatic changepoints

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

Scrambled order with automatic changepoints, whose positions depend on the sorted rows.

## Input

[`benchmark/inputs/v1/training-unsorted.json`](https://github.com/jer-k/effect-prophet/blob/main/benchmark/inputs/v1/training-unsorted.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 | 32.0 ms | 109 ms | 3.4× faster |
| Predict | 191 µs | 2.79 ms | 15× faster |
| Save model to JSON | 46 µs | 415 µs | 9.1× faster |
| Load model from JSON | 222 µs | 2.07 ms | 9.3× faster |
| Load and predict in a new process | 181 ms | 1.44 s | 7.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": "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
  }
}
```
