Skip to content

Mixed features, two chains ​

match ← All flat growth benchmarks

96 daily rows with min-max scaling, switchable multiplicative weekly seasonality, an event and a binary regressor. mcmc_samples=500 on 2 chains: 500 draws, two futures each.

Input ​

benchmark/inputs/v1/flat-mixed-components.json: 96 history rows and 24 forecast rows.

Output ​

Largest difference: 0.0062 (0.022% of the input's range).

Every forecast row from both libraries.

DateEffect ProphetPython ProphetDifference
2020-04-060.21730.21120.0062
2020-04-077.13517.13220.0029
2020-04-0836.229036.23240.0034
2020-04-0962.887062.88750.00049
2020-04-1035.002235.00223.5e-5
2020-04-1150.471950.47680.0050
2020-04-1219.512319.51270.00040
2020-04-130.21730.21120.0062
2020-04-148.33568.33410.0015
2020-04-1535.002235.00223.5e-5
2020-04-1662.887062.88750.00049
2020-04-1769.763269.76460.0014
2020-04-1850.471950.47680.0050
2020-04-1919.512319.51270.00040
2020-04-2036.202736.20420.0014
2020-04-217.13517.13220.0029
2020-04-2235.028535.03050.0020
2020-04-2362.887062.88750.00049
2020-04-2469.763269.76460.0014
2020-04-2535.002235.00223.5e-5
2020-04-2620.712820.71470.0018
2020-04-270.21730.21120.0062
2020-04-287.13517.13220.0029
2020-04-2935.028535.03050.0020

Timing ​

Median of all measured repetitions.

StepEffect ProphetPython ProphetEffect Prophet is
Fit636 ms529 ms1.2× slower
Predict312 µs4.90 msNot compared: different work
Save model to JSON166 µs12.5 ms75× faster
Load model from JSON1.51 ms9.74 ms6.5× faster
Simulate uncertainty2.02 ms130 msNot compared: different work
Load and simulate in a new process185 ms1.56 sNot 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.

  • Predict: Python's predict on a posterior also computes every component's range over the draws, while Effect Prophet's predict returns point forecasts and leaves ranges to predictWithIntervals.
  • Simulate uncertainty, Load and simulate in a new process: Python's predict(vectorized=False) also builds the point forecast and every component, while Effect Prophet's predictUncertainty returns only the ranges.

Settings ​

The case declaration both libraries ran.

json
{
  "kind": "map",
  "comparison": {
    "kind": "equivalent-posterior",
    "evidenceId": "posterior-nuts-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"
      }
    ]
  },
  "pythonOptimizer": {
    "algorithm": "Auto",
    "maxIterations": 10000,
    "newtonFallback": true,
    "sigFigs": 12
  },
  "uncertainty": {
    "seed": 19,
    "samples": 1000,
    "intervalWidth": 0.8,
    "output": "intervals",
    "algorithm": "scalar-continuous-time",
    "evidence": "docs/validation/uncertainty.md#evidence-classes",
    "samplerMemoryLimitBytes": 67108864
  },
  "mcmc": {
    "samples": 500,
    "seed": 19,
    "chains": 2,
    "pointWidthFraction": 0.15
  }
}

Inspired by Prophet from Meta. Not affiliated with Meta.