Skip to content

Twelve folds, sequential and parallel ​

match ← All flat growth benchmarks

Twelve weekly cutoffs on the 256-day history. Python Prophet is also timed with parallel="threads" and parallel="processes", which must give the same forecasts as running sequentially.

Input ​

benchmark/inputs/v1/flat-mixed-components-large.json: 256 history rows and 64 forecast rows.

Output ​

Largest difference: 4.9e-7 (< 0.0001% of the input's range).

Each row is one forecast made during cross-validation, next to the value that actually happened.

DateActualEffect ProphetPython ProphetDifference
2020-06-2128.948228.914828.91482.5e-7
2020-06-2221.248421.354521.35455.1e-8
2020-06-2323.989924.067724.06772.8e-9
2020-06-2435.051435.001535.00152.5e-7
2020-06-2547.137247.140147.14013.5e-7
2020-06-2648.568648.657848.65784.9e-7
2020-06-2741.107141.075541.07554.4e-7
2020-06-2829.024728.916928.91691.1e-7
2020-06-2934.990435.000535.00051.1e-7
2020-06-3024.029224.063524.06352.2e-7
2020-07-0136.292636.199336.19931.6e-7
2020-07-0246.007345.941145.94116.1e-8
2020-07-0348.582748.654648.65466.7e-10
2020-07-0434.977435.000535.00051.1e-7
2020-07-0528.986028.921128.92112.1e-8
2020-07-0621.312421.349221.34924.6e-8
2020-07-0725.142725.263025.26305.5e-8
2020-07-0834.999935.003635.00361.6e-7
2020-07-0935.039335.000735.00079.4e-8
2020-07-1048.578648.650448.65042.0e-7
2020-07-1141.023941.076441.07649.0e-8
2020-07-1229.008628.924728.92475.8e-8
2020-07-1322.602222.547122.54714.6e-8
2020-07-1434.953935.000435.00041.1e-7
2020-07-1535.033735.004135.00411.5e-7
2020-07-1646.056145.945145.94511.8e-7
2020-07-1748.647248.647748.64771.6e-7
2020-07-1841.012241.075641.07561.1e-7
2020-07-1936.241636.200436.20041.8e-7
2020-07-2021.388921.351321.35139.1e-8
2020-07-2123.960424.055524.05553.3e-8
2020-07-2234.929635.005335.00532.0e-7
2020-07-2345.988045.949145.94914.3e-7
2020-07-2434.984035.001135.00112.0e-7
2020-07-2542.177942.272142.27213.0e-7
2020-07-2628.937028.927528.92757.3e-8
2020-07-2721.438321.353321.35331.4e-7
2020-07-2824.040424.052124.05212.8e-7
2020-07-2934.968935.000535.00052.3e-7
2020-07-3046.038945.951445.95143.8e-7
2020-07-3149.925549.845649.84562.5e-7
2020-08-0141.024741.069441.06941.3e-7
2020-08-0228.914228.927328.92735.0e-8
2020-08-0335.075335.001035.00101.8e-7
2020-08-0424.032724.051424.05142.5e-7
2020-08-0534.893235.001035.00103.1e-7
2020-08-0647.140047.154847.15482.7e-7
2020-08-0748.684048.649348.64931.6e-7
2020-08-0834.921035.001035.00101.8e-7
2020-08-0928.855328.926628.92665.5e-9
2020-08-1021.415121.356521.35651.1e-7
2020-08-1124.096524.050124.05011.2e-7
2020-08-1236.145736.197636.19767.1e-9
2020-08-1335.025335.000435.00043.1e-8
2020-08-1448.763748.651148.65111.9e-7
2020-08-1541.087641.067141.06711.4e-7
2020-08-1628.875628.924628.92463.3e-8
2020-08-1721.404621.358821.35889.7e-8
2020-08-1836.257036.199336.19932.2e-8
2020-08-1934.921434.995434.99543.7e-8
2020-08-2045.877145.954245.95421.1e-7
2020-08-2148.689448.655848.65582.0e-7
2020-08-2241.056841.068041.06801.6e-7
2020-08-2334.891335.000635.00061.4e-7
2020-08-2422.541522.560222.56021.1e-7
2020-08-2524.126924.053224.05322.6e-8
2020-08-2634.976634.992034.99202.1e-8
2020-08-2745.901845.951845.95181.1e-7
2020-08-2835.086035.000635.00061.4e-7
2020-08-2941.158541.067641.06762.8e-7
2020-08-3030.087930.122530.12252.0e-7
2020-08-3121.348721.359621.35962.9e-7
2020-09-0124.145224.055324.05532.6e-7
2020-09-0234.999435.001035.00101.4e-7
2020-09-0345.850345.949245.94922.4e-8
2020-09-0448.645348.657348.65731.2e-8
2020-09-0542.312242.269842.26986.3e-8
2020-09-0628.844528.921728.92172.2e-7
2020-09-0734.913935.000835.00085.1e-8
2020-09-0824.099924.058424.05842.8e-8
2020-09-0935.030634.992134.99211.2e-7
2020-09-1045.878445.945745.94578.4e-8
2020-09-1149.859049.856749.85674.7e-8
2020-09-1235.111135.000835.00085.1e-8

Timing ​

Median of all measured repetitions.

Effect Prophet runs cross-validation folds one at a time, so only Python Prophet has parallel timings.

StepEffect ProphetPython ProphetEffect Prophet is
Cross-validate27.6 ms184 msNot compared: different work
Cross-validate, Python parallel="threads"—199 ms—
Cross-validate, Python parallel="processes"—1.50 s—

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.

  • Cross-validate: Python Prophet's cross-validation returns different outputs, and baselines, search and holdout reports have no Python API, so the benchmark times equivalent application code. The two libraries also compute ranges and some metrics differently.

Settings ​

The case declaration both libraries ran.

json
{
  "kind": "evaluation",
  "comparison": {
    "kind": "different-public-work",
    "evidenceId": "rolling-origin-evaluation-v1"
  },
  "configuration": {
    "growth": "flat",
    "scaling": "minmax",
    "seasonalityMode": "additive",
    "holidaysMode": "additive",
    "changepoints": {
      "mode": "auto",
      "count": 25,
      "range": 0.8
    },
    "changepointPriorScale": 0.05,
    "seasonalities": [
      {
        "name": "weekly-custom",
        "periodDays": 7,
        "fourierOrder": 2,
        "priorScale": 10,
        "conditionName": "active",
        "mode": "multiplicative"
      }
    ],
    "events": [
      {
        "name": "campaign",
        "date": "2020-01-22",
        "lowerWindowDays": 0,
        "upperWindowDays": 0,
        "priorScale": 10
      }
    ],
    "regressors": [
      {
        "name": "promotion",
        "priorScale": 10,
        "standardization": "never"
      }
    ]
  },
  "effectOptimizer": {
    "algorithm": "lbfgs",
    "maxIterations": 10000,
    "fallback": "none",
    "lbfgs": {
      "historySize": 5,
      "initAlpha": 0.001,
      "tolObj": 1e-12,
      "tolRelObj": 10000,
      "tolGrad": 1e-8,
      "tolRelGrad": 10000000,
      "tolParam": 1e-8
    }
  },
  "pythonOptimizer": {
    "algorithm": "LBFGS",
    "maxIterations": 10000,
    "newtonFallback": false
  },
  "plan": {
    "horizonMs": 604800000,
    "cutoffs": [
      "2020-06-20T00:00:00.000Z",
      "2020-06-27T00:00:00.000Z",
      "2020-07-04T00:00:00.000Z",
      "2020-07-11T00:00:00.000Z",
      "2020-07-18T00:00:00.000Z",
      "2020-07-25T00:00:00.000Z",
      "2020-08-01T00:00:00.000Z",
      "2020-08-08T00:00:00.000Z",
      "2020-08-15T00:00:00.000Z",
      "2020-08-22T00:00:00.000Z",
      "2020-08-29T00:00:00.000Z",
      "2020-09-05T00:00:00.000Z"
    ]
  },
  "metricAggregation": "horizons"
}

Inspired by Prophet from Meta. Not affiliated with Meta.