Skip to content

Additive effects, minmax scaling ​

match ← All flat growth benchmarks

The mixed-effects rows with every effect additive: a switchable 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.3e-11 (< 0.0001% of the input's range).

Every forecast row from both libraries.

DateEffect ProphetPython ProphetDifference
2020-04-0621.349221.34928.6e-12
2020-04-0724.064024.06402.0e-11
2020-04-0836.214236.21422.1e-11
2020-04-0945.946645.94661.4e-11
2020-04-1035.002635.00267.7e-12
2020-04-1141.075641.07567.6e-12
2020-04-1228.924228.92423.7e-12
2020-04-1321.349221.34928.6e-12
2020-04-1425.265525.26551.9e-11
2020-04-1535.002635.00267.7e-12
2020-04-1645.946645.94661.4e-11
2020-04-1748.645748.64574.3e-14
2020-04-1841.075641.07567.6e-12
2020-04-1928.924228.92423.7e-12
2020-04-2036.204036.20406.4e-12
2020-04-2124.064024.06402.0e-11
2020-04-2235.012735.01272.3e-11
2020-04-2345.946645.94661.4e-11
2020-04-2448.645748.64575.0e-14
2020-04-2535.002635.00267.7e-12
2020-04-2630.125630.12565.0e-12
2020-04-2721.349221.34928.6e-12
2020-04-2824.064024.06402.0e-11
2020-04-2935.012735.01272.3e-11

Timing ​

Median of all measured repetitions.

StepEffect ProphetPython ProphetEffect Prophet is
Convert input rows58 µs518 µs9.0× faster
Fit5.48 ms22.3 ms4.1× faster
Predict309 µs4.64 ms15× faster
Fit and predict4.82 ms27.5 ms5.7× faster
Convert, fit and predict4.52 ms28.5 ms6.3× faster
First forecast in a new process177 ms1.46 s8.3× faster
Save model to JSON35 µs738 µs21× faster
Load model from JSON130 µs3.83 ms29× faster
Load and predict in a new process159 ms1.47 s9.2× faster

Settings ​

The case declaration both libraries ran.

json
{
  "kind": "map",
  "comparison": {
    "kind": "equivalent-objective",
    "evidenceId": "flat-map-additive-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"
      }
    ],
    "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.