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 rows61 µs507 µs8.3× faster
Fit5.05 ms21.9 ms4.3× faster
Predict378 µs4.53 ms12× faster
Fit and predict4.67 ms26.9 ms5.8× faster
Convert, fit and predict4.59 ms27.4 ms6.0× faster
First forecast in a new process170 ms1.42 s8.4× faster
Save model to JSON33 µs648 µs20× faster
Load model from JSON126 µs3.60 ms29× faster
Load and predict in a new process155 ms1.41 s9.1× 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.