Skip to content

Global prior scales with explicit overrides ​

match ← All linear growth benchmarks

The same global priors, but the seasonality, custom events and regressor each set a prior of 10, so only the US holidays take holidaysPriorScale.

Input ​

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

Output ​

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

Every forecast row from both libraries.

DateEffect ProphetPython ProphetDifference
2024-12-2521.878221.87829.2e-11
2025-01-0123.156223.15627.6e-11
2025-01-0220.729320.72939.3e-11
2025-01-0520.872720.87278.2e-11

Timing ​

Median of all measured repetitions.

StepEffect ProphetPython ProphetEffect Prophet is
Convert input rows52 µs534 µs10× faster
Fit5.79 ms27.1 ms4.7× faster
Predict233 µs6.34 ms27× faster
Fit and predict5.11 ms33.9 ms6.6× faster
Convert, fit and predict5.02 ms35.2 ms7.0× faster
First forecast in a new process182 ms1.66 s9.1× faster
Save model to JSON138 µs756 µs5.5× faster
Load model from JSON1.08 ms4.40 ms4.1× faster
Load and predict in a new process170 ms1.62 s9.6× 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,
        "priorScale": 10,
        "conditionName": "active"
      }
    ],
    "events": [
      {
        "name": "launch",
        "date": "2024-01-01",
        "lowerWindowDays": 0,
        "upperWindowDays": 0,
        "priorScale": 10
      },
      {
        "name": "launch",
        "date": "2024-01-05",
        "lowerWindowDays": 0,
        "upperWindowDays": 0,
        "priorScale": 10
      },
      {
        "name": "launch",
        "date": "2025-01-01",
        "lowerWindowDays": 0,
        "upperWindowDays": 0,
        "priorScale": 10
      },
      {
        "name": "launch",
        "date": "2025-01-05",
        "lowerWindowDays": 0,
        "upperWindowDays": 0,
        "priorScale": 10
      }
    ],
    "regressors": [
      {
        "name": "promotion",
        "priorScale": 10,
        "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.