Skip to content

Capacity, floor and a multiplicative regressor ​

match ← All logistic growth benchmarks

96 daily rows with changing capacities, an explicit floor, min-max scaling, weekly seasonality, a multiplicative regressor and two automatic changepoints. mcmc_samples=300.

Input ​

benchmark/inputs/v1/logistic-explicit-floor.json: 96 history rows and 24 forecast rows.

Output ​

Largest difference: 0.0044 (0.0091% of the input's range).

Every forecast row from both libraries.

DateEffect ProphetPython ProphetDifference
2020-04-0665.832065.83370.0017
2020-04-0766.247366.24810.00078
2020-04-0867.287267.28300.0042
2020-04-0967.570067.57140.0014
2020-04-1067.957467.95870.0013
2020-04-1168.004468.00370.00072
2020-04-1267.898367.89835.8e-5
2020-04-1367.942267.94400.0018
2020-04-1468.696768.69340.0033
2020-04-1568.934868.93478.2e-5
2020-04-1669.549369.55080.0015
2020-04-1769.895669.89690.0014
2020-04-1869.902769.90200.00069
2020-04-1969.757869.75784.4e-5
2020-04-2070.156870.15440.0024
2020-04-2170.098270.09910.00084
2020-04-2270.685170.68509.2e-5
2020-04-2371.265571.26690.0014
2020-04-2471.578771.58010.0013
2020-04-2571.553971.55310.00072
2020-04-2671.778571.77410.0044
2020-04-2771.354771.35640.0018
2020-04-2871.659971.66070.00080
2020-04-2972.218972.21880.00014

Timing ​

Median of all measured repetitions.

StepEffect ProphetPython ProphetEffect Prophet is
Fit1.83 s452 ms4.0× slower
Predict396 µs3.79 msNot compared: different work
Save model to JSON269 µs12.5 ms46× faster
Load model from JSON2.87 ms8.01 ms2.8× faster
Simulate uncertainty2.91 ms210 msNot compared: different work
Load and simulate in a new process186 ms1.65 sNot compared: different work

Some steps aren't compared, because the two libraries' public calls produce different outputs. Their times show what each call costs, not which library is faster.

  • Predict: Python's predict on a posterior also computes every component's range over the draws, while Effect Prophet's predict returns point forecasts and leaves ranges to predictWithIntervals.
  • Simulate uncertainty, Load and simulate in a new process: Python's predict(vectorized=False) also builds the point forecast and every component, while Effect Prophet's predictUncertainty returns only the ranges.

Settings ​

The case declaration both libraries ran.

json
{
  "kind": "map",
  "comparison": {
    "kind": "equivalent-posterior",
    "evidenceId": "posterior-nuts-v1"
  },
  "configuration": {
    "growth": "logistic",
    "scaling": "minmax",
    "seasonalityMode": "additive",
    "holidaysMode": "additive",
    "changepoints": {
      "mode": "auto",
      "count": 2,
      "range": 0.8
    },
    "changepointPriorScale": 0.2,
    "seasonalities": [
      {
        "name": "weekly-custom",
        "periodDays": 7,
        "fourierOrder": 2,
        "priorScale": 10
      }
    ],
    "events": [],
    "regressors": [
      {
        "name": "promotion",
        "priorScale": 10,
        "standardization": "never",
        "mode": "multiplicative"
      }
    ]
  },
  "pythonOptimizer": {
    "algorithm": "Auto",
    "maxIterations": 10000,
    "newtonFallback": true,
    "sigFigs": 12
  },
  "uncertainty": {
    "seed": 19,
    "samples": 1000,
    "intervalWidth": 0.8,
    "output": "intervals",
    "algorithm": "scalar-continuous-time",
    "evidence": "docs/validation/uncertainty.md#evidence-classes",
    "samplerMemoryLimitBytes": 67108864
  },
  "mcmc": {
    "samples": 300,
    "seed": 19,
    "pointWidthFraction": 0.15
  }
}

Inspired by Prophet from Meta. Not affiliated with Meta.