Skip to content

One hand-picked changepoint ​

match ← All linear growth benchmarks

32 daily rows with a changepoint on 13 January and a looser prior scale of 0.2.

Input ​

benchmark/inputs/v1/linear-small.json: 32 history rows and 16 forecast rows.

Output ​

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

Every forecast row from both libraries.

DateEffect ProphetPython ProphetDifference
2020-02-0223.380623.38061.0e-11
2020-02-0323.723023.72301.0e-11
2020-02-0424.065324.06531.0e-11
2020-02-0524.407624.40761.0e-11
2020-02-0624.750024.75001.0e-11
2020-02-0725.092325.09231.0e-11
2020-02-0825.434625.43461.0e-11
2020-02-0925.776925.77691.0e-11
2020-02-1026.119326.11931.0e-11
2020-02-1126.461626.46169.9e-12
2020-02-1226.803926.80399.9e-12
2020-02-1327.146327.14639.9e-12
2020-02-1427.488627.48869.9e-12
2020-02-1527.830927.83099.8e-12
2020-02-1628.173328.17339.8e-12
2020-02-1728.515628.51569.8e-12

Timing ​

Median of all measured repetitions.

StepEffect ProphetPython ProphetEffect Prophet is
Convert input rows6 µs451 µs78× faster
Fit1.89 ms11.0 ms5.8× faster
Predict229 µs2.75 ms12× faster
Fit and predict2.11 ms13.8 ms6.5× faster
Convert, fit and predict1.78 ms14.1 ms7.9× faster
First forecast in a new process184 ms1.45 s7.9× faster
Save model to JSON23 µs359 µs16× faster
Load model from JSON106 µs1.97 ms18× faster
Load and predict in a new process163 ms1.42 s8.7× 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-13T00:00:00.000Z"
      ]
    },
    "changepointPriorScale": 0.2,
    "seasonalities": [],
    "events": [],
    "regressors": []
  },
  "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.