Skip to content

Cross-validation with repeated timestamps ​

match ← All linear growth benchmarks

Folds over rows with repeated dates. Each repeated row is scored separately.

Input ​

benchmark/inputs/v1/training-duplicates.json: 96 history rows and 8 forecast rows.

Output ​

Largest difference: 1.2e-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-01-1914.826514.748814.74881.2e-11
2020-01-1914.941914.748814.74881.2e-11
2020-01-1914.931114.748814.74881.2e-11
2020-01-1914.797614.748814.74881.2e-11
2020-01-2015.011914.920014.92001.2e-11
2020-01-2015.111214.920014.92001.2e-11
2020-01-2015.194814.920014.92001.2e-11
2020-01-2015.093214.920014.92001.2e-11
2020-01-2115.225515.091115.09111.2e-11
2020-01-2115.244115.091115.09111.2e-11
2020-01-2115.368515.091115.09111.2e-11
2020-01-2115.327015.091115.09111.2e-11
2020-01-2015.011915.073815.07386.3e-12
2020-01-2015.111215.073815.07386.3e-12
2020-01-2015.194815.073815.07386.3e-12
2020-01-2015.093215.073815.07386.3e-12
2020-01-2115.225515.298015.29806.6e-12
2020-01-2115.244115.298015.29806.6e-12
2020-01-2115.368515.298015.29806.6e-12
2020-01-2115.327015.298015.29806.6e-12
2020-01-2215.539415.522115.52217.0e-12
2020-01-2215.465915.522115.52217.0e-12
2020-01-2215.567615.522115.52217.0e-12
2020-01-2215.581015.522115.52217.0e-12

Timing ​

Median of all measured repetitions.

StepEffect ProphetPython ProphetEffect Prophet is
Plan cross-validation folds1.16 ms972 µs1.2× slower
Cross-validate5.76 ms60.4 ms10× faster
Score baselines1.60 ms1.55 ms1.0× slower
Search settings5.82 ms62.3 ms11× faster
Final holdout check3.85 ms23.5 ms6.1× faster
Save report266 µs9 µs30× slower
Load report185 µs5 µs37× slower

Settings ​

The case declaration both libraries ran.

json
{
  "kind": "evaluation",
  "comparison": {
    "kind": "different-public-work",
    "evidenceId": "rolling-origin-evaluation-v1"
  },
  "configuration": {
    "growth": "linear",
    "scaling": "absmax",
    "seasonalityMode": "additive",
    "holidaysMode": "additive",
    "changepoints": {
      "mode": "explicit",
      "timestamps": [
        "2020-01-17T00:00:00.000Z"
      ]
    },
    "changepointPriorScale": 0.05,
    "seasonalities": [],
    "events": [],
    "regressors": []
  },
  "effectOptimizer": {
    "algorithm": "auto",
    "maxIterations": 10000,
    "fallback": "newton",
    "lbfgs": {
      "historySize": 5,
      "initAlpha": 0.001,
      "tolObj": 1e-12,
      "tolRelObj": 10000,
      "tolGrad": 1e-8,
      "tolRelGrad": 10000000,
      "tolParam": 1e-8
    }
  },
  "pythonOptimizer": {
    "algorithm": "Auto",
    "maxIterations": 10000,
    "newtonFallback": true,
    "sigFigs": 12
  },
  "plan": {
    "horizonMs": 259200000,
    "cutoffs": [
      "2020-01-18T00:00:00.000Z",
      "2020-01-19T00:00:00.000Z"
    ]
  },
  "metricAggregation": "overall",
  "mapeZeroActual": "exclude",
  "candidates": [
    {
      "id": "control",
      "changepointPriorScale": 0.05
    }
  ],
  "holdoutRows": 8
}

Inspired by Prophet from Meta. Not affiliated with Meta.