Skip to content

Samples with mixed effects ​

match ← All linear growth benchmarks

512 raw simulated values per date for the same mixed model.

Input ​

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

Output ​

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

Every forecast row from both libraries.

DateEffect ProphetPython ProphetDifference
2020-04-0256.894656.89461.8e-10
2020-04-0358.961958.96191.7e-10
2020-04-0449.886349.88631.4e-10
2020-04-0542.586642.58661.4e-10
2020-04-0626.017626.01761.2e-10
2020-04-0844.166044.16601.7e-10
2020-04-1042.985342.98531.5e-10
2020-04-1235.653435.65341.2e-10
2020-04-1431.108931.10891.6e-10
2020-04-1657.051857.05181.7e-10
2020-04-1851.196551.19651.5e-10
2020-04-2045.135345.13531.7e-10

Timing ​

Median of all measured repetitions.

StepEffect ProphetPython ProphetEffect Prophet is
Convert input rows57 µs522 µs9.2× faster
Save model to JSON27 µs643 µs23× faster
Load model from JSON290 µs3.62 ms13× faster
Simulate uncertainty726 µs68.6 ms94× faster
First simulation in a new process192 ms1.52 s7.9× faster
Load and simulate in a new process175 ms1.51 s8.6× faster

Settings ​

The case declaration both libraries ran.

json
{
  "kind": "map",
  "comparison": {
    "kind": "equivalent-objective",
    "evidenceId": "linear-output-first-v4"
  },
  "configuration": {
    "growth": "linear",
    "scaling": "absmax",
    "seasonalityMode": "multiplicative",
    "holidaysMode": "additive",
    "changepoints": {
      "mode": "explicit",
      "timestamps": [
        "2020-02-10T00:00:00.000Z"
      ]
    },
    "changepointPriorScale": 0.2,
    "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"
      }
    ]
  },
  "effectOptimizer": {
    "algorithm": "auto",
    "maxIterations": 10000,
    "fallback": "newton",
    "lbfgs": {
      "historySize": 5,
      "initAlpha": 0.001,
      "tolObj": 1e-12,
      "tolRelObj": 10000,
      "tolGrad": 1e-8,
      "tolRelGrad": 10000000,
      "tolParam": 1e-8
    }
  },
  "pythonOptimizer": {
    "algorithm": "Auto",
    "maxIterations": 10000,
    "newtonFallback": true,
    "sigFigs": 12
  },
  "uncertainty": {
    "seed": 19,
    "samples": 512,
    "intervalWidth": 0.8,
    "output": "samples",
    "algorithm": "scalar-continuous-time",
    "evidence": "docs/validation/uncertainty.md#evidence-classes",
    "samplerMemoryLimitBytes": 67108864
  }
}

Inspired by Prophet from Meta. Not affiliated with Meta.