Skip to content

25 automatic changepoints ​

match ← All linear growth benchmarks

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: 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.

DateEffect ProphetPython ProphetDifference
2020-09-13107.7963107.79700.00069
2020-09-14107.5643107.56480.00055
2020-09-15108.3430108.34301.1e-6
2020-09-16109.9339109.93370.00026
2020-09-17111.5468111.54630.00047
2020-09-18112.3366112.33600.00066
2020-09-19112.0790112.07918.9e-5
2020-09-20111.3671111.36780.00071
2020-09-21111.1350111.13560.00057
2020-09-22111.9137111.91382.0e-5
2020-09-23113.5047113.50440.00024
2020-09-24115.1175115.11710.00045
2020-09-25115.9074115.90670.00064
2020-09-26115.6498115.64990.00011
2020-09-27114.9378114.93850.00073
2020-09-28114.7058114.70630.00059
2020-09-29115.4845115.48454.1e-5
2020-09-30117.0754117.07520.00021
2020-10-01118.6883118.68790.00042
2020-10-02119.4781119.47750.00062
2020-10-03119.2205119.22060.00013
2020-10-04118.5086118.50930.00075
2020-10-05118.2765118.27710.00061
2020-10-06119.0552119.05536.2e-5
2020-10-07120.6461120.64590.00019
2020-10-08122.2590122.25860.00040
2020-10-09123.0488123.04830.00059
2020-10-10122.7912122.79140.00015
2020-10-11122.0793122.08010.00077
2020-10-12121.8472121.84790.00063
2020-10-13122.6260122.62608.4e-5
2020-10-14124.2169124.21670.00017
2020-10-15125.8298125.82940.00038
2020-10-16126.6196126.61900.00057
2020-10-17126.3620126.36220.00017
2020-10-18125.6500125.65080.00079
2020-10-19125.4180125.41860.00065
2020-10-20126.1967126.19680.00010
2020-10-21127.7876127.78750.00015
2020-10-22129.4005129.40010.00036
2020-10-23130.1903130.18980.00055
2020-10-24129.9327129.93290.00019
2020-10-25129.2208129.22160.00081
2020-10-26128.9887128.98940.00067
2020-10-27129.7674129.76760.00013
2020-10-28131.3584131.35820.00013
2020-10-29132.9712132.97090.00034
2020-10-30133.7611133.76050.00053
2020-10-31133.5035133.50370.00022
2020-11-01132.7915132.79230.00084
2020-11-02132.5595132.56010.00069
2020-11-03133.3382133.33830.00015
2020-11-04134.9291134.92900.00011
2020-11-05136.5420136.54170.00032
2020-11-06137.3318137.33130.00051
2020-11-07137.0742137.07440.00024
2020-11-08136.3622136.36310.00086
2020-11-09136.1302136.13090.00071
2020-11-10136.9089136.90910.00017
2020-11-11138.4998138.49978.8e-5
2020-11-12140.1127140.11240.00030
2020-11-13140.9025140.90210.00049
2020-11-14140.6449140.64520.00026
2020-11-15139.9330139.93390.00088

Timing ​

Median of all measured repetitions.

StepEffect ProphetPython ProphetEffect Prophet is
Fit5.09 s4.30 s1.2× slower
Predict692 µs3.50 msNot compared: different work
Save model to JSON1.08 ms33.8 ms31× faster
Load model from JSON4.42 ms16.5 ms3.7× faster
Simulate uncertainty7.58 ms153 msNot compared: different work
Load and simulate in a new process198 ms1.65 sNot 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
  }
}

Inspired by Prophet from Meta. Not affiliated with Meta.