Skip to content

Global prior scales ​

match ← All linear growth benchmarks

The mixed-feature rows with seasonalityPriorScale 0.1 and holidaysPriorScale 0.05. The seasonality, custom events, regressor and US holidays set no prior of their own, so each takes the global one; the regressor follows holidaysPriorScale, as in Python.

Input ​

benchmark/inputs/v5/country-mixed-96.json: 96 history rows and 4 forecast rows.

Output ​

Largest difference: 4.5e-12 (< 0.0001% of the input's range).

Every forecast row from both libraries.

DateEffect ProphetPython ProphetDifference
2024-12-2521.877321.87734.2e-12
2025-01-0123.155223.15522.1e-12
2025-01-0220.728620.72864.5e-12
2025-01-0520.867420.86743.5e-12

Timing ​

Median of all measured repetitions.

StepEffect ProphetPython ProphetEffect Prophet is
Convert input rows51 µs545 µs11× faster
Fit5.64 ms27.7 ms4.9× faster
Predict227 µs6.37 ms28× faster
Fit and predict5.09 ms33.8 ms6.6× faster
Convert, fit and predict4.75 ms33.9 ms7.1× faster
First forecast in a new process188 ms1.63 s8.7× faster
Save model to JSON132 µs745 µs5.6× faster
Load model from JSON1.09 ms4.49 ms4.1× faster
Load and predict in a new process169 ms1.61 s9.5× faster

Settings ​

The case declaration both libraries ran.

json
{
  "kind": "map",
  "comparison": {
    "kind": "equivalent-objective",
    "evidenceId": "country-calendar-public-v1"
  },
  "configuration": {
    "growth": "linear",
    "countryHolidays": {
      "country": "US",
      "coverage": "reject-known-gaps",
      "priorScale": 0.05
    },
    "scaling": "absmax",
    "seasonalityMode": "additive",
    "holidaysMode": "additive",
    "seasonalityPriorScale": 0.1,
    "holidaysPriorScale": 0.05,
    "changepoints": {
      "mode": "auto",
      "count": 2,
      "range": 0.8
    },
    "changepointPriorScale": 0.05,
    "seasonalities": [
      {
        "name": "weekly-active",
        "periodDays": 7,
        "fourierOrder": 1,
        "conditionName": "active"
      }
    ],
    "events": [
      {
        "name": "launch",
        "date": "2024-01-01",
        "lowerWindowDays": 0,
        "upperWindowDays": 0
      },
      {
        "name": "launch",
        "date": "2024-01-05",
        "lowerWindowDays": 0,
        "upperWindowDays": 0
      },
      {
        "name": "launch",
        "date": "2025-01-01",
        "lowerWindowDays": 0,
        "upperWindowDays": 0
      },
      {
        "name": "launch",
        "date": "2025-01-05",
        "lowerWindowDays": 0,
        "upperWindowDays": 0
      }
    ],
    "regressors": [
      {
        "name": "promotion",
        "standardization": "never"
      }
    ]
  },
  "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
  }
}

Inspired by Prophet from Meta. Not affiliated with Meta.