Skip to content

Mixed effects, eight months, minmax scaling ​

match ← All flat growth benchmarks

The same features on 256 daily rows.

Input ​

benchmark/inputs/v1/flat-mixed-components-large.json: 256 history rows and 64 forecast rows.

Output ​

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

Every forecast row from both libraries.

DateEffect ProphetPython ProphetDifference
2020-09-1319.530519.53051.4e-8
2020-09-140.29570.29571.4e-7
2020-09-157.16967.16966.3e-8
2020-09-1634.980734.98071.7e-7
2020-09-1736.200836.20081.3e-7
2020-09-1869.741569.74154.0e-7
2020-09-1950.445850.44582.3e-7
2020-09-2019.530519.53051.4e-8
2020-09-210.29570.29571.4e-7
2020-09-2235.000635.00061.4e-7
2020-09-2336.180936.18091.6e-7
2020-09-2462.840662.84063.7e-7
2020-09-2569.741569.74154.0e-7
2020-09-2650.445850.44582.3e-7
2020-09-2735.000635.00061.4e-7
2020-09-280.29570.29571.4e-7
2020-09-298.36988.36987.0e-8
2020-09-3034.980734.98071.7e-7
2020-10-0162.840662.84063.7e-7
2020-10-0235.000635.00061.4e-7
2020-10-0350.445850.44582.3e-7
2020-10-0419.530519.53051.4e-8
2020-10-051.49581.49581.5e-7
2020-10-067.16967.16966.3e-8
2020-10-0735.000635.00061.4e-7
2020-10-0862.840662.84063.7e-7
2020-10-0969.741569.74154.0e-7
2020-10-1050.445850.44582.3e-7
2020-10-1120.730720.73072.1e-8
2020-10-1235.000635.00061.4e-7
2020-10-137.16967.16966.3e-8
2020-10-1434.980734.98071.7e-7
2020-10-1562.840662.84063.7e-7
2020-10-1669.741569.74154.0e-7
2020-10-1736.200836.20081.3e-7
2020-10-1819.530519.53051.4e-8
2020-10-190.29570.29571.4e-7
2020-10-207.16967.16966.3e-8
2020-10-2134.980734.98071.7e-7
2020-10-2235.000635.00061.4e-7
2020-10-2370.941770.94173.9e-7
2020-10-2450.445850.44582.3e-7
2020-10-2519.530519.53051.4e-8
2020-10-260.29570.29571.4e-7
2020-10-2735.000635.00061.4e-7
2020-10-2834.980734.98071.7e-7
2020-10-2964.040864.04083.6e-7
2020-10-3069.741569.74154.0e-7
2020-10-3150.445850.44582.3e-7
2020-11-0135.000635.00061.4e-7
2020-11-020.29570.29571.4e-7
2020-11-037.16967.16966.3e-8
2020-11-0436.180936.18091.6e-7
2020-11-0562.840662.84063.7e-7
2020-11-0635.000635.00061.4e-7
2020-11-0750.445850.44582.3e-7
2020-11-0819.530519.53051.4e-8
2020-11-090.29570.29571.4e-7
2020-11-108.36988.36987.0e-8
2020-11-1135.000635.00061.4e-7
2020-11-1262.840662.84063.7e-7
2020-11-1369.741569.74154.0e-7
2020-11-1450.445850.44582.3e-7
2020-11-1519.530519.53051.4e-8

Timing ​

Median of all measured repetitions.

StepEffect ProphetPython ProphetEffect Prophet is
Convert input rows67 µs638 µs9.5× faster
Fit2.26 ms9.13 ms4.0× faster
Predict515 µs4.71 ms9.2× faster
Fit and predict2.23 ms13.7 ms6.2× faster
Convert, fit and predict2.15 ms14.5 ms6.7× faster
First forecast in a new process174 ms1.44 s8.2× faster
Save model to JSON35 µs819 µs24× faster
Load model from JSON194 µs3.87 ms20× faster
Load and predict in a new process164 ms1.44 s8.8× faster

Settings ​

The case declaration both libraries ran.

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