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

# Sorted rows, hand-picked changepoint

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

Every forecast row from both libraries.

| Date | Effect Prophet | Python Prophet | Difference |
| --- | ---: | ---: | ---: |
| 2020-04-06 | 32.8040 | 32.8040 | 3.3e-12 |
| 2020-04-07 | 33.0341 | 33.0341 | 3.2e-12 |
| 2020-04-08 | 33.2642 | 33.2642 | 3.2e-12 |
| 2020-04-09 | 33.4943 | 33.4943 | 3.2e-12 |
| 2020-04-10 | 33.7243 | 33.7243 | 3.1e-12 |
| 2020-04-11 | 33.9544 | 33.9544 | 3.1e-12 |
| 2020-04-12 | 34.1845 | 34.1845 | 3.0e-12 |
| 2020-04-13 | 34.4145 | 34.4145 | 3.0e-12 |

## Timing

Median of all measured repetitions.

| Step | Effect Prophet | Python Prophet | Effect Prophet is |
| --- | ---: | ---: | --- |
| Fit | 4.34 ms | 20.8 ms | 4.8× faster |
| Predict | 161 µs | 2.72 ms | 17× faster |
| Save model to JSON | 20 µs | 412 µs | 21× faster |
| Load model from JSON | 172 µs | 2.09 ms | 12× faster |
| Load and predict in a new process | 168 ms | 1.46 s | 8.7× 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-01-17T00:00:00.000Z"
      ]
    },
    "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
  }
}
```
