Skip to content

Four regressors ​

match ← 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.0031 (0.0032% of the input's range).

Every forecast row from both libraries.

DateEffect ProphetPython ProphetDifference
2020-09-13107.1354107.13420.0012
2020-09-14107.5535107.55220.0012
2020-09-15107.9570107.95580.0013
2020-09-16108.3460108.34470.0013
2020-09-17107.8285107.82720.0014
2020-09-18110.0130110.01150.0015
2020-09-19110.3634110.36190.0015
2020-09-20110.7044110.70290.0015
2020-09-21109.6794109.67790.0015
2020-09-22110.0100110.00850.0015
2020-09-23110.3402110.33870.0015
2020-09-24110.6733110.67180.0015
2020-09-25111.4763111.47480.0015
2020-09-26111.8259111.82440.0015
2020-09-27114.0115114.00990.0016
2020-09-28114.3908114.38910.0017
2020-09-29115.2523115.25070.0017
2020-09-30112.4933112.49170.0017
2020-10-01112.9354112.93370.0017
2020-10-02113.4012113.39950.0017
2020-10-03114.3544114.35270.0018
2020-10-04114.8682114.86640.0018
2020-10-05115.4048115.40300.0018
2020-10-06117.7855117.78360.0020
2020-10-07118.8262118.82430.0020
2020-10-08119.4204119.41840.0020
2020-10-09118.2057118.20380.0020
2020-10-10118.8245118.82250.0020
2020-10-11119.9141119.91200.0020
2020-10-12120.5443120.54220.0021
2020-10-13119.8197119.81750.0022
2020-10-14120.4484120.44620.0022
2020-10-15123.3581123.35570.0023
2020-10-16123.9741123.97180.0024
2020-10-17124.5807124.57830.0024
2020-10-18123.3537123.35140.0023
2020-10-19124.4009124.39860.0023
2020-10-20124.9726124.97020.0024
2020-10-21125.5322125.52980.0024
2020-10-22126.0805126.07810.0024
2020-10-23127.0819127.07950.0024
2020-10-24129.4339129.43150.0025
2020-10-25129.9563129.95380.0025
2020-10-26129.1181129.11550.0026
2020-10-27128.2732128.27070.0025
2020-10-28128.7867128.78420.0025
2020-10-29129.3011129.29860.0025
2020-10-30129.8182129.81570.0025
2020-10-31130.8025130.80000.0025
2020-11-01131.3285131.32590.0025
2020-11-02133.6825133.67990.0026
2020-11-03134.2193134.21660.0027
2020-11-04135.2244135.22170.0027
2020-11-05133.9474133.94480.0026
2020-11-06134.4957134.49310.0027
2020-11-07135.0448135.04210.0027
2020-11-08134.7001134.69730.0028
2020-11-09135.2439135.24100.0029
2020-11-10135.7811135.77820.0029
2020-11-11138.1320138.12900.0030
2020-11-12139.1118139.10870.0031
2020-11-13139.6142139.61110.0031
2020-11-14138.2776138.27450.0031
2020-11-15138.7457138.74260.0031

Timing ​

Median of all measured repetitions.

StepEffect ProphetPython ProphetEffect Prophet is
Convert input rows89 µs660 µs7.4× faster
Fit2.96 ms10.3 ms3.5× faster
Predict473 µs3.52 ms7.4× faster
Fit and predict2.96 ms13.6 ms4.6× faster
Convert, fit and predict2.69 ms15.1 ms5.6× faster
First forecast in a new process170 ms1.43 s8.4× faster
Save model to JSON24 µs718 µs30× faster
Load model from JSON107 µs2.97 ms28× faster
Load and predict in a new process165 ms1.45 s8.8× 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.