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 µs453 µs78× faster
Fit1.88 ms11.1 ms5.9× faster
Predict191 µs2.74 ms14× faster
Fit and predict1.65 ms15.0 ms9.1× faster
Convert, fit and predict1.80 ms14.8 ms8.2× faster
First forecast in a new process172 ms1.48 s8.6× faster
Save model to JSON26 µs350 µs13× faster
Load model from JSON113 µs2.06 ms18× faster
Load and predict in a new process167 ms1.44 s8.6× 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.