Skip to content

Cross-validation with a forecast regressor and ranges ​

match ← All flat growth benchmarks

The same folds with simulated futures that include the temperature model's draws.

Input ​

benchmark/inputs/v4/flat-correlated-regressors.json: 730 history rows and 180 forecast rows.

Output ​

Largest difference: 0.012 (0.094% of the input's range).

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

DateActualEffect ProphetPython ProphetDifference
2021-12-0345.563946.011046.02200.011
2021-12-0443.846644.646544.65760.011
2021-12-0543.250743.167043.17830.011
2021-12-0643.887342.625442.63680.011
2021-12-0744.492743.379943.39150.012
2021-12-0845.258544.841744.85390.012
2021-12-0946.238345.866445.87880.012
2021-12-1745.539345.217245.20960.0076
2021-12-1843.946643.839743.83230.0074
2021-12-1942.848742.366942.35970.0071
2021-12-2043.565241.842841.83580.0070
2021-12-2144.697942.589142.58220.0069
2021-12-2245.259344.029144.02130.0078
2021-12-2345.821845.043545.03560.0079

Timing ​

Median of all measured repetitions.

StepEffect ProphetPython ProphetEffect Prophet is
Cross-validate with ranges61.8 ms291 msNot 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.

  • Cross-validate with ranges: 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": "absmax",
    "seasonalityMode": "additive",
    "holidaysMode": "additive",
    "changepoints": {
      "mode": "auto",
      "count": 25,
      "range": 0.8
    },
    "changepointPriorScale": 0.05,
    "seasonalities": [
      {
        "name": "yearly-custom",
        "periodDays": 365.25,
        "fourierOrder": 10,
        "priorScale": 10
      },
      {
        "name": "weekly-custom",
        "periodDays": 7,
        "fourierOrder": 2,
        "priorScale": 10
      }
    ],
    "events": [],
    "regressors": [
      {
        "name": "temperature",
        "priorScale": 10,
        "standardization": "auto",
        "predictor": true
      },
      {
        "name": "baseline",
        "priorScale": 10,
        "standardization": "never"
      }
    ]
  },
  "pythonOptimizer": {
    "algorithm": "Auto",
    "maxIterations": 10000,
    "newtonFallback": true,
    "sigFigs": 12
  },
  "plan": {
    "horizonMs": 604800000,
    "cutoffs": [
      "2021-12-02T00:00:00.000Z",
      "2021-12-16T00:00:00.000Z"
    ]
  },
  "metricAggregation": "horizons",
  "interval": {
    "seed": 19,
    "samples": 128,
    "intervalWidth": 0.8
  }
}

Inspired by Prophet from Meta. Not affiliated with Meta.