Skip to content

Mixed effects, both libraries on default settings ​

match ← All flat growth benchmarks

The mixed-effects rows with absmax scaling, where both libraries pick their own optimizer. The other mixed-effects cases pin both to L-BFGS.

Input ​

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

Output ​

Largest difference: 0.021 (0.073% of the input's range).

Every forecast row from both libraries.

DateEffect ProphetPython ProphetDifference
2020-04-0621.344521.34920.0047
2020-04-0724.057724.06400.0064
2020-04-0836.198836.21420.015
2020-04-0945.928545.94660.018
2020-04-1034.990235.00260.012
2020-04-1141.059241.07560.016
2020-04-1228.915728.92410.0085
2020-04-1321.344521.34920.0047
2020-04-1425.255225.26550.010
2020-04-1534.990235.00260.012
2020-04-1645.928545.94660.018
2020-04-1748.624648.64570.021
2020-04-1841.059241.07560.016
2020-04-1928.915728.92410.0085
2020-04-2036.187736.20400.016
2020-04-2124.057724.06400.0064
2020-04-2235.001235.01270.011
2020-04-2345.928545.94660.018
2020-04-2448.624648.64570.021
2020-04-2534.990235.00260.012
2020-04-2630.113230.12560.012
2020-04-2721.344521.34920.0047
2020-04-2824.057724.06400.0064
2020-04-2935.001235.01270.011

Timing ​

Median of all measured repetitions.

StepEffect ProphetPython ProphetEffect Prophet is
Convert input rows59 µs504 µs8.5× faster
Fit3.85 ms43.2 ms11× faster
Predict374 µs4.55 ms12× faster
Fit and predict3.17 ms48.4 ms15× faster
Convert, fit and predict2.98 ms48.7 ms16× faster
First forecast in a new process169 ms1.45 s8.6× faster
Save model to JSON34 µs625 µs18× faster
Load model from JSON129 µs3.62 ms28× faster
Load and predict in a new process167 ms1.41 s8.4× faster

Settings ​

The case declaration both libraries ran.

json
{
  "kind": "map",
  "comparison": {
    "kind": "equivalent-objective",
    "evidenceId": "flat-map-mixed-v1"
  },
  "configuration": {
    "growth": "flat",
    "scaling": "absmax",
    "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
  }
}

Inspired by Prophet from Meta. Not affiliated with Meta.