Skip to content

A regressor forecast by its own model ​

match ← All linear growth benchmarks

256 daily rows and four regressors, one forecast by its own default model. That model is fit by optimizing in both libraries, as mcmc_samples doesn't reach it in Python, and each of the 1,200 futures takes the next of its 1,000 draws in turn. Python doesn't save regressor models, so there are no save and load timings.

Input ​

benchmark/inputs/v1/map-regressors-medium.json: 256 history rows and 64 forecast rows.

Output ​

Largest difference: 0.018 (0.019% of the input's range).

Every forecast row from both libraries.

DateEffect ProphetPython ProphetDifference
2020-09-13107.1988107.19470.0041
2020-09-14107.6487107.64330.0054
2020-09-15108.0970108.09040.0066
2020-09-16108.5453108.53740.0079
2020-09-17107.9487107.94110.0076
2020-09-18110.1974110.18950.0079
2020-09-19110.6471110.63800.0091
2020-09-20111.0968111.08650.010
2020-09-21110.1079110.09770.010
2020-09-22110.5647110.55320.011
2020-09-23111.0258111.01320.013
2020-09-24111.4912111.47740.014
2020-09-25112.3190112.30640.013
2020-09-26112.7944112.78070.014
2020-09-27115.0738115.06000.014
2020-09-28115.5605115.54580.015
2020-09-29116.4115116.39800.013
2020-09-30113.7098113.69370.016
2020-10-01114.2174114.20050.017
2020-10-02114.7323114.71450.018
2020-10-03115.6121115.59580.016
2020-10-04116.1397116.12260.017
2020-10-05116.6760116.65830.018
2020-10-06119.0198119.00240.017
2020-10-07119.9291119.91340.016
2020-10-08120.4876120.47130.016
2020-10-09119.2526119.23490.018
2020-10-10119.8242119.80600.018
2020-10-11120.7578120.74130.016
2020-10-12121.3407121.32390.017
2020-10-13120.5265120.50860.018
2020-10-14121.1202121.10200.018
2020-10-15123.8759123.86060.015
2020-10-16124.4774124.46180.016
2020-10-17125.0819125.06600.016
2020-10-18123.8868123.86970.017
2020-10-19124.8528124.83770.015
2020-10-20125.4622125.44690.015
2020-10-21126.0729126.05730.016
2020-10-22126.6832126.66750.016
2020-10-23127.6504127.63670.014
2020-10-24130.0585130.04550.013
2020-10-25130.6623130.64910.013
2020-10-26129.8624129.84820.014
2020-10-27129.0191129.00580.013
2020-10-28129.6148129.60130.014
2020-10-29130.2060130.19210.014
2020-10-30130.7921130.77780.014
2020-10-31131.7303131.71780.012
2020-11-01132.3030132.29000.013
2020-11-02134.6709134.65840.012
2020-11-03135.2320135.21900.013
2020-11-04136.1446136.13330.011
2020-11-05134.8922134.87930.013
2020-11-06135.4327135.41910.014
2020-11-07135.9657135.95140.014
2020-11-08135.4447135.43120.014
2020-11-09135.9625135.94820.014
2020-11-10136.4730136.45780.015
2020-11-11138.7772138.76210.015
2020-11-12139.6320139.61820.014
2020-11-13140.1224140.10770.015
2020-11-14138.8063138.78950.017
2020-11-15139.2825139.26470.018

Timing ​

Median of all measured repetitions.

StepEffect ProphetPython ProphetEffect Prophet is
Fit4.67 s4.13 s1.1× slower
Predict1.10 ms17.6 msNot compared: different work
Simulate uncertainty16.1 ms306 msNot 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: 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": [],
    "events": [],
    "regressors": [
      {
        "name": "binary-auto",
        "priorScale": 10,
        "standardization": "auto"
      },
      {
        "name": "numeric-auto",
        "priorScale": 10,
        "standardization": "auto",
        "predictor": true
      },
      {
        "name": "numeric-always",
        "priorScale": 7,
        "standardization": "always"
      },
      {
        "name": "numeric-never",
        "priorScale": 5,
        "standardization": "never"
      }
    ]
  },
  "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.