Skip to content

A regressor forecast by its own sampled model ​

match ← All linear growth benchmarks

The same rows and regressors, with the regressor's own model sampled too: predictor: { mcmc } against regressor_predictor={"mcmc_samples": 300}, with the main model's seed and 4 chains, which Python passes on from fit. Its 600 draws give 1,200 simulated values, one for each of the main model's 1,200 futures.

Input ​

benchmark/inputs/v1/map-regressors-medium.json: 256 history rows and 64 forecast rows.

Output ​

Largest difference: 0.018 (0.019% of the input's range).

Every forecast row from both libraries.

DateEffect ProphetPython ProphetDifference
2020-09-13107.1914107.18750.0039
2020-09-14107.6416107.63670.0049
2020-09-15108.0900108.08320.0069
2020-09-16108.5383108.53110.0072
2020-09-17107.9404107.93380.0066
2020-09-18110.1909110.18340.0075
2020-09-19110.6399110.63080.0091
2020-09-20111.0890111.07890.010
2020-09-21110.1006110.09080.0098
2020-09-22110.5574110.54570.012
2020-09-23111.0185111.00660.012
2020-09-24111.4826111.46980.013
2020-09-25112.3122112.30000.012
2020-09-26112.7869112.77320.014
2020-09-27115.0657115.05220.014
2020-09-28115.5529115.53860.014
2020-09-29116.4039116.39020.014
2020-09-30113.7021113.68670.015
2020-10-01114.2085114.19260.016
2020-10-02114.7252114.70780.017
2020-10-03115.6042115.58800.016
2020-10-04116.1313116.11450.017
2020-10-05116.6681116.65080.017
2020-10-06119.0120118.99430.018
2020-10-07119.9212119.90610.015
2020-10-08120.4784120.46310.015
2020-10-09119.2452119.22780.017
2020-10-10119.8161119.79790.018
2020-10-11120.7491120.73290.016
2020-10-12121.3325121.31610.016
2020-10-13120.5183120.50020.018
2020-10-14121.1120121.09440.018
2020-10-15123.8664123.85210.014
2020-10-16124.4697124.45450.015
2020-10-17125.0734125.05760.016
2020-10-18123.8778123.86100.017
2020-10-19124.8442124.82970.015
2020-10-20125.4537125.43820.016
2020-10-21126.0643126.04950.015
2020-10-22126.6734126.65870.015
2020-10-23127.6424127.62910.013
2020-10-24130.0497130.03670.013
2020-10-25130.6531130.64000.013
2020-10-26129.8536129.83980.014
2020-10-27129.0103128.99680.014
2020-10-28129.6060129.59310.013
2020-10-29130.1959130.18300.013
2020-10-30130.7837130.76980.014
2020-10-31131.7212131.70880.012
2020-11-01132.2934132.28070.013
2020-11-02134.6617134.64970.012
2020-11-03135.2229135.20970.013
2020-11-04136.1355136.12490.011
2020-11-05134.8818134.86990.012
2020-11-06135.4240135.41090.013
2020-11-07135.9563135.94200.014
2020-11-08135.4349135.42160.013
2020-11-09135.9530135.93920.014
2020-11-10136.4636136.44820.015
2020-11-11138.7678138.75340.014
2020-11-12139.6213139.60850.013
2020-11-13140.1135140.09910.014
2020-11-14138.7966138.77990.017
2020-11-15139.2723139.25470.018

Timing ​

Median of all measured repetitions.

StepEffect ProphetPython ProphetEffect Prophet is
Fit5.02 s4.42 s1.1× slower
Predict1.68 ms113 msNot compared: different work
Simulate uncertainty16.3 ms500 msNot compared: different work

Some steps aren't compared, because the two libraries' public calls produce different outputs. Their times show what each call costs, not which library is faster.

  • Predict: Python's predict on a posterior also computes every component's range over the draws, while Effect Prophet's predict returns point forecasts and leaves ranges to predictWithIntervals.
  • Simulate uncertainty: Python's predict(vectorized=False) also builds the point forecast and every component, while Effect Prophet's predictUncertainty returns only the ranges.

Settings ​

The case declaration both libraries ran.

json
{
  "kind": "map",
  "comparison": {
    "kind": "equivalent-posterior",
    "evidenceId": "posterior-nuts-v1"
  },
  "configuration": {
    "growth": "linear",
    "scaling": "absmax",
    "seasonalityMode": "additive",
    "holidaysMode": "additive",
    "changepoints": {
      "mode": "auto",
      "count": 25,
      "range": 0.8
    },
    "changepointPriorScale": 0.05,
    "seasonalities": [],
    "events": [],
    "regressors": [
      {
        "name": "binary-auto",
        "priorScale": 10,
        "standardization": "auto"
      },
      {
        "name": "numeric-auto",
        "priorScale": 10,
        "standardization": "auto",
        "predictor": {
          "mcmcSamples": 300
        }
      },
      {
        "name": "numeric-always",
        "priorScale": 7,
        "standardization": "always"
      },
      {
        "name": "numeric-never",
        "priorScale": 5,
        "standardization": "never"
      }
    ]
  },
  "pythonOptimizer": {
    "algorithm": "Auto",
    "maxIterations": 10000,
    "newtonFallback": true,
    "sigFigs": 12
  },
  "uncertainty": {
    "seed": 19,
    "samples": 1000,
    "intervalWidth": 0.8,
    "output": "intervals",
    "algorithm": "scalar-continuous-time",
    "evidence": "docs/validation/uncertainty.md#evidence-classes",
    "samplerMemoryLimitBytes": 67108864
  },
  "mcmc": {
    "samples": 300,
    "seed": 19,
    "pointWidthFraction": 0.15
  }
}

Inspired by Prophet from Meta. Not affiliated with Meta.