Skip to content

A regressor forecast by its own model ​

match flagged ← All linear growth benchmarks

The same four regressors on Prophet's defaults, with the smooth cyclical one forecast by its own default model, as with regressor_predictor=True.

Input ​

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

Output ​

Largest difference: 0.0039 (0.0040% of the input's range).

Every forecast row from both libraries.

DateEffect ProphetPython ProphetDifference
2020-09-13107.1941107.19510.00099
2020-09-14107.6427107.64390.0012
2020-09-15108.0898108.09130.0014
2020-09-16108.5369108.53860.0017
2020-09-17107.9404107.94200.0016
2020-09-18110.1882110.19000.0018
2020-09-19110.6368110.63880.0020
2020-09-20111.0853111.08750.0022
2020-09-21110.0970110.09910.0021
2020-09-22110.5526110.55490.0023
2020-09-23111.0126111.01510.0025
2020-09-24111.4768111.47960.0028
2020-09-25112.3056112.30820.0026
2020-09-26112.7799112.78270.0028
2020-09-27115.0587115.06160.0029
2020-09-28115.5445115.54760.0031
2020-09-29116.3966116.39950.0029
2020-09-30113.6928113.69600.0032
2020-10-01114.1996114.20300.0034
2020-10-02114.7136114.71710.0035
2020-10-03115.5947115.59800.0033
2020-10-04116.1216116.12500.0034
2020-10-05116.6573116.66080.0035
2020-10-06119.0008119.00440.0036
2020-10-07119.9115119.91480.0034
2020-10-08120.4694120.47280.0035
2020-10-09119.2335119.23710.0036
2020-10-10119.8046119.80830.0037
2020-10-11120.7398120.74320.0034
2020-10-12121.3223121.32580.0035
2020-10-13120.5070120.51060.0036
2020-10-14121.1003121.10400.0037
2020-10-15123.8581123.86140.0033
2020-10-16124.4592124.46270.0034
2020-10-17125.0634125.06690.0035
2020-10-18123.8677123.87130.0035
2020-10-19124.8355124.83870.0032
2020-10-20125.4447125.44790.0033
2020-10-21126.0550126.05830.0033
2020-10-22126.6651126.66850.0034
2020-10-23127.6341127.63710.0030
2020-10-24130.0422130.04530.0031
2020-10-25130.6458130.64890.0031
2020-10-26129.8449129.84810.0032
2020-10-27129.0029129.00580.0029
2020-10-28129.5983129.60130.0030
2020-10-29130.1891130.19210.0031
2020-10-30130.7747130.77790.0032
2020-10-31131.7146131.71740.0029
2020-11-01132.2868132.28970.0029
2020-11-02134.6545134.65750.0030
2020-11-03135.2151135.21820.0031
2020-11-04136.1292136.13210.0028
2020-11-05134.8758134.87880.0030
2020-11-06135.4156135.41870.0031
2020-11-07135.9478135.95110.0033
2020-11-08135.4275135.43060.0031
2020-11-09135.9445135.94770.0032
2020-11-10136.4541136.45750.0034
2020-11-11138.7578138.76130.0035
2020-11-12139.6137139.61710.0033
2020-11-13140.1032140.10670.0035
2020-11-14138.7857138.78940.0037
2020-11-15139.2608139.26480.0039

Internal fit differences ​

The forecasts match, so this case passes. Both libraries search for the best-fitting parameters and stop when they are close enough. On this input they stopped at slightly different points, so these internal numbers differ by more than the threshold where we take a closer look.

CheckEffect ProphetPython ProphetThreshold
Fitting objective (lower is a better fit)-1758.3378-1758.39120.01
Stationarity residual (lower is closer to the best fit)16848.435211056.42390.01

Timing ​

Median of all measured repetitions.

StepEffect ProphetPython ProphetEffect Prophet is
Convert input rows104 µs684 µs6.6× faster
Fit29.8 ms101 ms3.4× faster
Predict659 µs16.8 ms25× faster
Fit and predict28.6 ms119 ms4.2× faster
Convert, fit and predict28.0 ms119 ms4.2× faster
First forecast in a new process212 ms1.62 s7.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": [
      {
        "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"
      }
    ]
  },
  "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
  }
}

Inspired by Prophet from Meta. Not affiliated with Meta.