Skip to content

Mixed effects, absmax scaling ​

match ← All flat growth benchmarks

96 daily rows with a switchable multiplicative weekly pattern, an event and a regressor.

Input ​

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

Output ​

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

Every forecast row from both libraries.

DateEffect ProphetPython ProphetDifference
2020-04-0621.349221.34925.6e-8
2020-04-0724.064024.06401.5e-7
2020-04-0836.214236.21422.1e-7
2020-04-0945.946645.94662.0e-7
2020-04-1035.002635.00261.1e-7
2020-04-1141.075641.07563.3e-8
2020-04-1228.924128.92414.4e-9
2020-04-1321.349221.34925.6e-8
2020-04-1425.265525.26551.5e-7
2020-04-1535.002635.00261.1e-7
2020-04-1645.946645.94662.0e-7
2020-04-1748.645748.64571.2e-7
2020-04-1841.075641.07563.3e-8
2020-04-1928.924128.92414.4e-9
2020-04-2036.204136.20411.1e-7
2020-04-2124.064024.06401.5e-7
2020-04-2235.012735.01272.1e-7
2020-04-2345.946645.94662.0e-7
2020-04-2448.645748.64571.2e-7
2020-04-2535.002635.00261.1e-7
2020-04-2630.125630.12561.0e-9
2020-04-2721.349221.34925.6e-8
2020-04-2824.064024.06401.5e-7
2020-04-2935.012735.01272.1e-7

Timing ​

Median of all measured repetitions.

StepEffect ProphetPython ProphetEffect Prophet is
Fit1.58 ms7.92 ms5.0× faster
Predict469 µs4.67 ms10× faster
Save model to JSON21 µs651 µs31× faster
Load model from JSON226 µs3.56 ms16× faster
Load and predict in a new process158 ms1.41 s9.0× faster

Settings ​

The case declaration both libraries ran.

json
{
  "kind": "map",
  "comparison": {
    "kind": "equivalent-objective",
    "evidenceId": "flat-growth-mixed-scaling-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"
      }
    ]
  },
  "effectOptimizer": {
    "algorithm": "lbfgs",
    "maxIterations": 10000,
    "fallback": "none",
    "lbfgs": {
      "historySize": 5,
      "initAlpha": 0.001,
      "tolObj": 1e-12,
      "tolRelObj": 10000,
      "tolGrad": 1e-8,
      "tolRelGrad": 10000000,
      "tolParam": 1e-8
    }
  },
  "pythonOptimizer": {
    "algorithm": "LBFGS",
    "maxIterations": 10000,
    "newtonFallback": false
  }
}

Inspired by Prophet from Meta. Not affiliated with Meta.