Skip to content

Values far from zero, absmax scaling ​

match ← All linear growth benchmarks

96 daily rows offset well above zero, with weekly seasonality and one changepoint.

Input ​

benchmark/inputs/v1/linear-offset-scaling.json: 96 history rows and 24 forecast rows.

Output ​

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

Every forecast row from both libraries.

DateEffect ProphetPython ProphetDifference
2020-04-06110.0819110.08191.2e-11
2020-04-07110.2547110.25471.2e-11
2020-04-08110.5696110.56961.2e-11
2020-04-09110.8826110.88261.2e-11
2020-04-10111.0514111.05141.2e-11
2020-04-11111.0356111.03561.2e-11
2020-04-12110.9363110.93631.2e-11
2020-04-13110.9232110.92321.2e-11
2020-04-14111.0960111.09601.2e-11
2020-04-15111.4109111.41091.2e-11
2020-04-16111.7239111.72391.2e-11
2020-04-17111.8927111.89271.2e-11
2020-04-18111.8768111.87681.2e-11
2020-04-19111.7776111.77761.2e-11
2020-04-20111.7645111.76451.2e-11
2020-04-21111.9372111.93721.2e-11
2020-04-22112.2522112.25221.2e-11
2020-04-23112.5652112.56521.2e-11
2020-04-24112.7340112.73401.2e-11
2020-04-25112.7181112.71811.2e-11
2020-04-26112.6189112.61891.2e-11
2020-04-27112.6058112.60581.2e-11
2020-04-28112.7785112.77851.2e-11
2020-04-29113.0935113.09351.2e-11

Timing ​

Median of all measured repetitions.

StepEffect ProphetPython ProphetEffect Prophet is
Convert input rows15 µs459 µs30× faster
Fit5.55 ms23.3 ms4.2× faster
Predict177 µs3.02 ms17× faster
Fit and predict5.44 ms26.1 ms4.8× faster
Convert, fit and predict5.83 ms26.8 ms4.6× faster
First forecast in a new process170 ms1.45 s8.5× faster
Save model to JSON21 µs419 µs20× faster
Load model from JSON106 µs2.13 ms20× faster
Load and predict in a new process157 ms1.44 s9.2× 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": "additive",
    "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
      }
    ],
    "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.