---
url: >-
  https://jer-k.github.io/effect-prophet/benchmarks/linear/mcmc-linear-default-changepoints.md
---

# 25 automatic changepoints

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

256 daily rows with weekly seasonality and Prophet's 25 automatic changepoints, so the posterior carries real uncertainty about trend changes into 64 future rows. `mcmc_samples=300`.

## Input

[`benchmark/inputs/v1/linear-medium.json`](https://github.com/jer-k/effect-prophet/blob/main/benchmark/inputs/v1/linear-medium.json): 256 history rows and 64 forecast rows.

## Output

Largest difference: **0.00088** (0.00091% of the input's range).

Every forecast row from both libraries.

| Date | Effect Prophet | Python Prophet | Difference |
| --- | ---: | ---: | ---: |
| 2020-09-13 | 107.7963 | 107.7970 | 0.00069 |
| 2020-09-14 | 107.5643 | 107.5648 | 0.00055 |
| 2020-09-15 | 108.3430 | 108.3430 | 1.1e-6 |
| 2020-09-16 | 109.9339 | 109.9337 | 0.00026 |
| 2020-09-17 | 111.5468 | 111.5463 | 0.00047 |
| 2020-09-18 | 112.3366 | 112.3360 | 0.00066 |
| 2020-09-19 | 112.0790 | 112.0791 | 8.9e-5 |
| 2020-09-20 | 111.3671 | 111.3678 | 0.00071 |
| 2020-09-21 | 111.1350 | 111.1356 | 0.00057 |
| 2020-09-22 | 111.9137 | 111.9138 | 2.0e-5 |
| 2020-09-23 | 113.5047 | 113.5044 | 0.00024 |
| 2020-09-24 | 115.1175 | 115.1171 | 0.00045 |
| 2020-09-25 | 115.9074 | 115.9067 | 0.00064 |
| 2020-09-26 | 115.6498 | 115.6499 | 0.00011 |
| 2020-09-27 | 114.9378 | 114.9385 | 0.00073 |
| 2020-09-28 | 114.7058 | 114.7063 | 0.00059 |
| 2020-09-29 | 115.4845 | 115.4845 | 4.1e-5 |
| 2020-09-30 | 117.0754 | 117.0752 | 0.00021 |
| 2020-10-01 | 118.6883 | 118.6879 | 0.00042 |
| 2020-10-02 | 119.4781 | 119.4775 | 0.00062 |
| 2020-10-03 | 119.2205 | 119.2206 | 0.00013 |
| 2020-10-04 | 118.5086 | 118.5093 | 0.00075 |
| 2020-10-05 | 118.2765 | 118.2771 | 0.00061 |
| 2020-10-06 | 119.0552 | 119.0553 | 6.2e-5 |
| 2020-10-07 | 120.6461 | 120.6459 | 0.00019 |
| 2020-10-08 | 122.2590 | 122.2586 | 0.00040 |
| 2020-10-09 | 123.0488 | 123.0483 | 0.00059 |
| 2020-10-10 | 122.7912 | 122.7914 | 0.00015 |
| 2020-10-11 | 122.0793 | 122.0801 | 0.00077 |
| 2020-10-12 | 121.8472 | 121.8479 | 0.00063 |
| 2020-10-13 | 122.6260 | 122.6260 | 8.4e-5 |
| 2020-10-14 | 124.2169 | 124.2167 | 0.00017 |
| 2020-10-15 | 125.8298 | 125.8294 | 0.00038 |
| 2020-10-16 | 126.6196 | 126.6190 | 0.00057 |
| 2020-10-17 | 126.3620 | 126.3622 | 0.00017 |
| 2020-10-18 | 125.6500 | 125.6508 | 0.00079 |
| 2020-10-19 | 125.4180 | 125.4186 | 0.00065 |
| 2020-10-20 | 126.1967 | 126.1968 | 0.00010 |
| 2020-10-21 | 127.7876 | 127.7875 | 0.00015 |
| 2020-10-22 | 129.4005 | 129.4001 | 0.00036 |
| 2020-10-23 | 130.1903 | 130.1898 | 0.00055 |
| 2020-10-24 | 129.9327 | 129.9329 | 0.00019 |
| 2020-10-25 | 129.2208 | 129.2216 | 0.00081 |
| 2020-10-26 | 128.9887 | 128.9894 | 0.00067 |
| 2020-10-27 | 129.7674 | 129.7676 | 0.00013 |
| 2020-10-28 | 131.3584 | 131.3582 | 0.00013 |
| 2020-10-29 | 132.9712 | 132.9709 | 0.00034 |
| 2020-10-30 | 133.7611 | 133.7605 | 0.00053 |
| 2020-10-31 | 133.5035 | 133.5037 | 0.00022 |
| 2020-11-01 | 132.7915 | 132.7923 | 0.00084 |
| 2020-11-02 | 132.5595 | 132.5601 | 0.00069 |
| 2020-11-03 | 133.3382 | 133.3383 | 0.00015 |
| 2020-11-04 | 134.9291 | 134.9290 | 0.00011 |
| 2020-11-05 | 136.5420 | 136.5417 | 0.00032 |
| 2020-11-06 | 137.3318 | 137.3313 | 0.00051 |
| 2020-11-07 | 137.0742 | 137.0744 | 0.00024 |
| 2020-11-08 | 136.3622 | 136.3631 | 0.00086 |
| 2020-11-09 | 136.1302 | 136.1309 | 0.00071 |
| 2020-11-10 | 136.9089 | 136.9091 | 0.00017 |
| 2020-11-11 | 138.4998 | 138.4997 | 8.8e-5 |
| 2020-11-12 | 140.1127 | 140.1124 | 0.00030 |
| 2020-11-13 | 140.9025 | 140.9021 | 0.00049 |
| 2020-11-14 | 140.6449 | 140.6452 | 0.00026 |
| 2020-11-15 | 139.9330 | 139.9339 | 0.00088 |

## Timing

Median of all measured repetitions.

| Step | Effect Prophet | Python Prophet | Effect Prophet is |
| --- | ---: | ---: | --- |
| Fit | 5.09 s | 4.30 s | 1.2× slower |
| Predict | 692 µs | 3.50 ms | Not compared: different work |
| Save model to JSON | 1.08 ms | 33.8 ms | 31× faster |
| Load model from JSON | 4.42 ms | 16.5 ms | 3.7× faster |
| Simulate uncertainty | 7.58 ms | 153 ms | Not compared: different work |
| Load and simulate in a new process | 198 ms | 1.65 s | Not compared: different work |

Some steps aren't compared, because the two libraries' public calls produce different outputs. Their times show what each call costs, not which library is faster.

* **Predict:** Python's `predict` on a posterior also computes every component's range over the draws, while Effect Prophet's `predict` returns point forecasts and leaves ranges to `predictWithIntervals`.
* **Simulate uncertainty, Load and simulate in a new process:** Python's `predict(vectorized=False)` also builds the point forecast and every component, while Effect Prophet's `predictUncertainty` returns only the ranges.

## Settings

The case declaration both libraries ran.

```json
{
  "kind": "map",
  "comparison": {
    "kind": "equivalent-posterior",
    "evidenceId": "posterior-nuts-v1"
  },
  "configuration": {
    "growth": "linear",
    "scaling": "absmax",
    "seasonalityMode": "additive",
    "holidaysMode": "additive",
    "changepoints": {
      "mode": "auto",
      "count": 25,
      "range": 0.8
    },
    "changepointPriorScale": 0.05,
    "seasonalities": [
      {
        "name": "weekly-custom",
        "periodDays": 7,
        "fourierOrder": 3,
        "priorScale": 10
      }
    ],
    "events": [],
    "regressors": []
  },
  "pythonOptimizer": {
    "algorithm": "Auto",
    "maxIterations": 10000,
    "newtonFallback": true,
    "sigFigs": 12
  },
  "uncertainty": {
    "seed": 19,
    "samples": 1000,
    "intervalWidth": 0.8,
    "output": "intervals",
    "algorithm": "scalar-continuous-time",
    "evidence": "docs/validation/uncertainty.md#evidence-classes",
    "samplerMemoryLimitBytes": 67108864
  },
  "mcmc": {
    "samples": 300,
    "seed": 19,
    "pointWidthFraction": 0.15
  }
}
```
