Skip to content

Everything at once, small ​

match ← All linear growth benchmarks

24 rows with a switchable weekly pattern, a three-day cycle, an event and a regressor.

Input ​

benchmark/inputs/v1/map-mixed-features-explicit-small.json: 24 history rows and 3 forecast rows.

Output ​

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

Every forecast row from both libraries.

DateEffect ProphetPython ProphetDifference
2020-01-2521.514921.51492.9e-13
2020-01-2621.916521.91657.9e-13
2020-01-2721.202521.20251.0e-12

Timing ​

Median of all measured repetitions.

StepEffect ProphetPython ProphetEffect Prophet is
Convert input rows11 µs486 µs44× faster
Fit2.04 ms12.3 ms6.0× faster
Predict170 µs4.99 ms29× faster
Fit and predict1.79 ms16.0 ms8.9× faster
Convert, fit and predict1.59 ms19.7 ms12× faster
First forecast in a new process182 ms1.46 s8.1× faster
Save model to JSON27 µs585 µs22× faster
Load model from JSON141 µs3.74 ms27× faster
Load and predict in a new process174 ms1.47 s8.5× faster

Settings ​

The case declaration both libraries ran.

json
{
  "kind": "linear-map",
  "comparison": {
    "kind": "equivalent-objective",
    "evidenceId": "linear-output-first-v4"
  },
  "configuration": {
    "effectMap": "explicit",
    "changepoints": {
      "mode": "explicit",
      "timestamps": [
        "2020-01-11T00:00:00.000Z"
      ]
    },
    "changepointPriorScale": 0.2,
    "seasonalities": [
      {
        "name": "weekly-on",
        "periodDays": 7,
        "fourierOrder": 1,
        "priorScale": 10,
        "conditionName": "onSeason"
      },
      {
        "name": "three-day",
        "periodDays": 3,
        "fourierOrder": 1,
        "priorScale": 5
      }
    ],
    "events": [
      {
        "name": "launch",
        "date": "2020-01-08",
        "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
  }
}

Inspired by Prophet from Meta. Not affiliated with Meta.