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

# Repeated timestamps, automatic changepoints

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

Repeated dates also repeat the automatic changepoint candidates, as in Prophet.

## Input

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

## Output

Largest difference: **5.4e-5** (0.0013% of the input's range).

Every forecast row from both libraries.

| Date | Effect Prophet | Python Prophet | Difference |
| --- | ---: | ---: | ---: |
| 2020-01-25 | 16.2605 | 16.2604 | 5.4e-5 |
| 2020-01-26 | 16.4952 | 16.4952 | 5.2e-5 |
| 2020-01-27 | 16.7300 | 16.7300 | 4.9e-5 |
| 2020-01-28 | 16.9648 | 16.9648 | 4.7e-5 |
| 2020-01-29 | 17.1996 | 17.1995 | 4.4e-5 |
| 2020-01-30 | 17.4344 | 17.4343 | 4.2e-5 |
| 2020-01-31 | 17.6691 | 17.6691 | 4.0e-5 |
| 2020-02-01 | 17.9039 | 17.9039 | 3.7e-5 |

## Timing

Median of all measured repetitions.

| Step | Effect Prophet | Python Prophet | Effect Prophet is |
| --- | ---: | ---: | --- |
| Fit | 26.4 ms | 84.9 ms | 3.2× faster |
| Predict | 185 µs | 2.77 ms | 15× faster |
| Save model to JSON | 22 µs | 403 µs | 18× faster |
| Load model from JSON | 188 µs | 2.04 ms | 11× faster |
| Load and predict in a new process | 165 ms | 1.42 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
  }
}
```
