Skip to content

Cross-validation and metrics ​

match ← All logistic growth benchmarks

One cutoff, a 7-day horizon, all metrics and a baseline comparison.

Input ​

benchmark/inputs/v1/logistic-implicit-floor.json: 96 history rows and 24 forecast rows.

Output ​

Largest difference: 1.6e-11 (< 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-03-1856.348256.229056.22901.6e-11
2020-03-1957.183157.150057.15001.6e-11
2020-03-2057.725757.823757.82371.5e-11
2020-03-2158.110858.107958.10791.5e-11
2020-03-2258.293558.223858.22381.4e-11
2020-03-2358.446058.526058.52601.4e-11
2020-03-2459.023259.134559.13451.4e-11

Timing ​

Median of all measured repetitions.

StepEffect ProphetPython ProphetEffect Prophet is
Convert input rows10 µs433 µsNot compared: different work
Plan cross-validation folds853 µs573 µsNot compared: different work
Cross-validate17.1 ms59.5 msNot compared: different work
Compute metrics67 µs5.16 msNot compared: different work
Score baselines1.02 ms769 µsNot compared: different work
First cross-validation in a new process191 ms1.46 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": "absmax",
    "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-03-17T00:00:00.000Z"
    ]
  },
  "metricAggregation": "horizons"
}

Inspired by Prophet from Meta. Not affiliated with Meta.