Skip to content

Cross-validation, eight months ​

match ← All logistic growth benchmarks

Two rolling cutoffs on the 256-day history, with rolling-window metrics.

Input ​

benchmark/inputs/v1/logistic-implicit-floor-large.json: 256 history rows and 64 forecast rows.

Output ​

Largest difference: 0.028 (0.034% 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-08-1387.351487.333187.31370.019
2020-08-1487.648887.537687.54130.0037
2020-08-1587.424987.402487.41100.0086
2020-08-1687.092187.141587.15150.010
2020-08-1787.073287.028387.05640.028
2020-08-1887.284587.224487.24530.021
2020-08-1987.621587.693987.67900.015
2020-08-2088.104388.179688.15950.020
2020-08-2188.421088.387188.38940.0024
2020-08-2288.240388.248688.25580.0072
2020-08-2387.879487.985387.99400.0086
2020-08-2487.855887.875087.90120.026
2020-08-2588.145588.070788.09020.019
2020-08-2688.522088.536788.52140.015

Timing ​

Median of all measured repetitions.

StepEffect ProphetPython ProphetEffect Prophet is
Convert input rows31 µs500 µsNot compared: different work
Plan cross-validation folds1.32 ms718 µsNot compared: different work
Cross-validate14.1 ms41.5 msNot compared: different work
Compute metrics62 µs5.31 msNot compared: different work
Score baselines2.15 ms1.30 msNot compared: different work
First cross-validation in a new process190 ms1.45 sNot 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.

  • Convert input rows, Plan cross-validation folds, Cross-validate, Compute metrics, Score baselines, First cross-validation in a new process: 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": "logistic",
    "scaling": "minmax",
    "seasonalityMode": "additive",
    "holidaysMode": "additive",
    "changepoints": {
      "mode": "explicit",
      "timestamps": [
        "2020-02-10T00:00:00.000Z"
      ]
    },
    "changepointPriorScale": 0.2,
    "seasonalities": [
      {
        "name": "weekly-custom",
        "periodDays": 7,
        "fourierOrder": 2,
        "priorScale": 10
      }
    ],
    "events": [],
    "regressors": []
  },
  "pythonOptimizer": {
    "algorithm": "Auto",
    "maxIterations": 10000,
    "newtonFallback": true,
    "sigFigs": 12
  },
  "plan": {
    "horizonMs": 604800000,
    "cutoffs": [
      "2020-08-12T00:00:00.000Z",
      "2020-08-19T00:00:00.000Z"
    ]
  },
  "metricAggregation": "rolling"
}

Inspired by Prophet from Meta. Not affiliated with Meta.