Skip to content

Cross-validation with ranges, eight months ​

match ← All flat growth benchmarks

The same long folds with simulated futures for interval coverage.

Input ​

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

Output ​

Largest difference: 2.4e-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-08-1335.025335.000535.00051.6e-7
2020-08-1448.763748.652548.65251.8e-7
2020-08-1541.087641.066241.06622.4e-7
2020-08-1628.875628.925128.92512.4e-7
2020-08-1721.404621.358521.35851.8e-7
2020-08-1836.257036.199336.19931.6e-7
2020-08-1934.921434.996034.99607.3e-8
2020-08-2045.877145.953445.95344.3e-8
2020-08-2148.689448.656748.65679.5e-9
2020-08-2241.056841.067141.06719.2e-8
2020-08-2334.891335.000935.00094.9e-8
2020-08-2422.541522.559922.55991.2e-7
2020-08-2524.126924.052724.05274.7e-8
2020-08-2634.976634.993034.99302.7e-8

Timing ​

Median of all measured repetitions.

StepEffect ProphetPython ProphetEffect Prophet is
Cross-validate with ranges8.02 ms46.5 ms5.8× faster

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-08-12T00:00:00.000Z",
      "2020-08-19T00:00:00.000Z"
    ]
  },
  "metricAggregation": "rolling",
  "mapeZeroActual": "exclude",
  "interval": {
    "seed": 19,
    "samples": 128,
    "intervalWidth": 0.8
  }
}

Inspired by Prophet from Meta. Not affiliated with Meta.