Skip to content

Four regressors ​

match flagged ← All linear growth benchmarks

256 daily rows with a yes/no regressor and three numeric ones, each standardized differently.

Input ​

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

Output ​

Largest difference: 0.0042 (0.0043% of the input's range).

Every forecast row from both libraries.

DateEffect ProphetPython ProphetDifference
2020-09-13107.1325107.13420.0017
2020-09-14107.5505107.55220.0017
2020-09-15107.9540107.95580.0018
2020-09-16108.3428108.34470.0019
2020-09-17107.8253107.82720.0019
2020-09-18110.0095110.01150.0020
2020-09-19110.3598110.36190.0021
2020-09-20110.7007110.70290.0022
2020-09-21109.6759109.67790.0021
2020-09-22110.0064110.00850.0021
2020-09-23110.3365110.33870.0022
2020-09-24110.6695110.67180.0022
2020-09-25111.4725111.47480.0023
2020-09-26111.8221111.82440.0023
2020-09-27114.0074114.00990.0025
2020-09-28114.3866114.38910.0025
2020-09-29115.2481115.25070.0025
2020-09-30112.4892112.49170.0025
2020-10-01112.9312112.93370.0025
2020-10-02113.3969113.39950.0026
2020-10-03114.3501114.35270.0026
2020-10-04114.8637114.86640.0027
2020-10-05115.4003115.40300.0027
2020-10-06117.7807117.78360.0029
2020-10-07118.8214118.82430.0029
2020-10-08119.4154119.41840.0029
2020-10-09118.2009118.20380.0029
2020-10-10118.8196118.82250.0029
2020-10-11119.9091119.91200.0029
2020-10-12120.5392120.54220.0030
2020-10-13119.8145119.81750.0030
2020-10-14120.4431120.44620.0031
2020-10-15123.3525123.35570.0032
2020-10-16123.9685123.97180.0032
2020-10-17124.5751124.57830.0033
2020-10-18123.3482123.35140.0032
2020-10-19124.3954124.39860.0032
2020-10-20124.9670124.97020.0032
2020-10-21125.5265125.52980.0033
2020-10-22126.0748126.07810.0033
2020-10-23127.0762127.07950.0033
2020-10-24129.4280129.43150.0035
2020-10-25129.9503129.95380.0035
2020-10-26129.1120129.11550.0035
2020-10-27128.2673128.27070.0034
2020-10-28128.7807128.78420.0035
2020-10-29129.2951129.29860.0035
2020-10-30129.8121129.81570.0036
2020-10-31130.7965130.80000.0036
2020-11-01131.3223131.32590.0036
2020-11-02133.6761133.67990.0038
2020-11-03134.2128134.21660.0038
2020-11-04135.2179135.22170.0038
2020-11-05133.9410133.94480.0038
2020-11-06134.4892134.49310.0038
2020-11-07135.0382135.04210.0039
2020-11-08134.6934134.69730.0039
2020-11-09135.2371135.24100.0039
2020-11-10135.7742135.77820.0040
2020-11-11138.1248138.12900.0042
2020-11-12139.1046139.10870.0042
2020-11-13139.6068139.61110.0042
2020-11-14138.2703138.27450.0042
2020-11-15138.7384138.74260.0042

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
Stationarity residual (lower is closer to the best fit)83.918835.24340.01

Timing ​

Median of all measured repetitions.

StepEffect ProphetPython ProphetEffect Prophet is
Convert input rows118 µs689 µs5.8× faster
Fit3.12 ms10.5 ms3.4× faster
Predict506 µs3.60 ms7.1× faster
Fit and predict2.65 ms14.1 ms5.3× faster
Convert, fit and predict3.64 ms14.8 ms4.1× faster
First forecast in a new process179 ms1.46 s8.2× faster
Save model to JSON23 µs737 µs32× faster
Load model from JSON111 µs3.08 ms28× faster
Load and predict in a new process169 ms1.46 s8.6× faster

Settings ​

The case declaration both libraries ran.

json
{
  "kind": "linear-map",
  "comparison": {
    "kind": "equivalent-objective",
    "evidenceId": "linear-output-first-v4"
  },
  "configuration": {
    "effectMap": "explicit",
    "changepoints": {
      "mode": "explicit",
      "timestamps": [
        "2020-03-21T00:00:00.000Z",
        "2020-06-29T00:00:00.000Z"
      ]
    },
    "changepointPriorScale": 0.2,
    "seasonalities": [],
    "events": [],
    "regressors": [
      {
        "name": "binary-auto",
        "priorScale": 10,
        "standardization": "auto"
      },
      {
        "name": "numeric-auto",
        "priorScale": 10,
        "standardization": "auto"
      },
      {
        "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.