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 rows13 µs703 µs53× faster
Fit2.02 ms13.8 ms6.8× faster
Predict154 µs5.12 ms33× faster
Fit and predict1.65 ms16.6 ms10× faster
Convert, fit and predict1.68 ms16.6 ms9.9× faster
First forecast in a new process189 ms1.46 s7.8× faster
Save model to JSON27 µs579 µs21× faster
Load model from JSON164 µs3.69 ms22× faster
Load and predict in a new process161 ms1.42 s8.8× 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.