Skip to content

Ranges with mixed effects ​

match ← All flat growth benchmarks

80% ranges from 512 simulated paths for every past and future date.

Input ​

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

Output ​

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

Every forecast row from both libraries.

DateEffect ProphetPython ProphetDifference
2020-04-060.21500.21502.7e-8
2020-04-077.13217.13211.3e-7
2020-04-0836.229836.22982.3e-7
2020-04-0962.887062.88702.3e-7
2020-04-1035.002635.00261.1e-7
2020-04-1150.476150.47613.4e-8
2020-04-1219.515319.51531.8e-8
2020-04-130.21500.21502.7e-8
2020-04-148.33368.33361.4e-7
2020-04-1535.002635.00261.1e-7
2020-04-1662.887062.88702.3e-7
2020-04-1769.764269.76421.4e-7
2020-04-1850.476150.47613.4e-8
2020-04-1919.515319.51531.8e-8
2020-04-2036.204136.20411.2e-7
2020-04-217.13217.13211.3e-7
2020-04-2235.028335.02832.2e-7
2020-04-2362.887062.88702.3e-7
2020-04-2469.764269.76421.4e-7
2020-04-2535.002635.00261.1e-7
2020-04-2620.716820.71681.0e-8
2020-04-270.21500.21502.7e-8
2020-04-287.13217.13211.3e-7
2020-04-2935.028335.02832.2e-7

Timing ​

Median of all measured repetitions.

StepEffect ProphetPython ProphetEffect Prophet is
Convert input rows44 µs498 µs11× faster
Save model to JSON22 µs660 µs30× faster
Load model from JSON218 µs3.56 ms16× faster
Simulate uncertainty1.10 ms73.6 ms67× faster
First simulation in a new process178 ms1.51 s8.5× faster
Load and simulate in a new process162 ms1.51 s9.4× 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
  },
  "uncertainty": {
    "seed": 19,
    "samples": 512,
    "intervalWidth": 0.8,
    "output": "intervals",
    "algorithm": "scalar-continuous-time",
    "evidence": "docs/validation/uncertainty.md#evidence-classes",
    "samplerMemoryLimitBytes": 67108864
  }
}

Inspired by Prophet from Meta. Not affiliated with Meta.