Skip to content

Twelve folds and a search, sequential and parallel ​

match ← All logistic growth benchmarks

Twelve weekly cutoffs on the 256-day history, then three candidate settings compared on them. Python Prophet is also timed with parallel="threads" and parallel="processes", which must give the same forecasts and scores as running sequentially.

Input ​

benchmark/inputs/v1/logistic-implicit-floor-large.json: 256 history rows and 64 forecast rows.

Output ​

Largest difference: 0.066 (0.079% of the input's range).

Each row is one forecast made during cross-validation, next to the value that actually happened.

DateActualEffect ProphetPython ProphetDifference
2020-06-2180.208980.175580.21830.043
2020-06-2279.971380.077280.14340.066
2020-06-2380.226780.300880.35620.055
2020-06-2480.824580.767280.77450.0072
2020-06-2581.246181.249681.24850.0011
2020-06-2681.390381.479681.50730.028
2020-06-2781.388881.356281.38940.033
2020-06-2881.193181.085581.12050.035
2020-06-2980.969080.978581.03620.058
2020-06-3081.168281.200781.24820.047
2020-07-0181.765281.669881.67120.0014
2020-07-0282.213282.147182.14070.0064
2020-07-0382.298982.371782.39330.022
2020-07-0482.225782.250382.27720.027
2020-07-0582.044481.978582.00770.029
2020-07-0681.827981.865781.91690.051
2020-07-0781.967582.084482.12590.041
2020-07-0882.556482.556682.55380.0028
2020-07-0983.072983.031183.02080.010
2020-07-1083.175183.248383.26520.017
2020-07-1183.076483.127783.14980.022
2020-07-1282.944082.858682.88260.024
2020-07-1382.793182.740882.78600.045
2020-07-1482.907082.954782.99080.036
2020-07-1583.462683.429983.42350.0065
2020-07-1684.015083.904583.89110.013
2020-07-1784.113484.116284.12900.013
2020-07-1883.933183.995484.01340.018
2020-07-1983.769983.727783.74740.020
2020-07-2083.645983.608183.64840.040
2020-07-2183.724183.817083.84870.032
2020-07-2284.222584.294184.28490.0092
2020-07-2384.809984.770684.75470.016
2020-07-2484.961184.976984.98650.0096
2020-07-2584.759884.853784.86840.015
2020-07-2684.599784.589784.60610.016
2020-07-2784.554584.469684.50590.036
2020-07-2884.662584.672984.70100.028
2020-07-2985.119485.150185.13860.011
2020-07-3085.717785.629785.61200.018
2020-07-3185.909885.833085.84010.0071
2020-08-0185.662285.707185.71920.012
2020-08-0285.431885.444085.45780.014
2020-08-0385.396885.325885.35880.033
2020-08-0485.508485.525485.55060.025
2020-08-0585.896786.001285.98830.013
2020-08-0686.471386.484386.46530.019
2020-08-0786.720286.686586.69160.0051
2020-08-0886.484386.556386.56630.0099
2020-08-0986.223886.294986.30650.012
2020-08-1086.236086.179286.20960.030
2020-08-1186.422386.375486.39820.023
2020-08-1286.798886.847986.83390.014
2020-08-1387.351487.333787.31390.020
2020-08-1487.648887.536787.54020.0035
2020-08-1587.424987.403287.41150.0083
2020-08-1687.092187.140587.15050.010
2020-08-1787.073287.027787.05600.028
2020-08-1887.284587.223887.24480.021
2020-08-1987.621587.692987.67800.015
2020-08-2088.104388.180488.16000.020
2020-08-2188.421088.386288.38850.0023
2020-08-2288.240388.249288.25620.0070
2020-08-2387.879487.985187.99370.0086
2020-08-2487.855887.875287.90140.026
2020-08-2588.145588.071488.09070.019
2020-08-2688.522088.536288.52090.015
2020-08-2788.974089.023589.00280.021
2020-08-2889.311489.232189.23350.0014
2020-08-2989.186589.093989.09980.0059
2020-08-3088.794888.826788.83420.0075
2020-08-3188.707288.718188.74280.025
2020-09-0189.007888.917688.93560.018
2020-09-0289.388689.379489.36380.016
2020-09-0389.766189.865389.84450.021
2020-09-0490.065290.078190.07880.00071
2020-09-0589.983689.939289.94430.0051
2020-09-0689.594689.669089.67560.0066
2020-09-0789.466589.561089.58440.023
2020-09-0889.805589.763189.78000.017
2020-09-0990.262790.222590.20680.016
2020-09-1090.636990.705390.68450.021
2020-09-1190.921490.920390.92050.00018
2020-09-1290.899390.783090.78740.0045

Timing ​

Median of all measured repetitions.

Effect Prophet runs cross-validation folds one at a time, so only Python Prophet has parallel timings.

StepEffect ProphetPython ProphetEffect Prophet is
Cross-validate61.3 ms170 msNot compared: different work
Cross-validate, Python parallel="threads"—164 ms—
Cross-validate, Python parallel="processes"—1.49 s—
Search settings173 ms528 msNot compared: different work
Search settings, Python parallel="threads"—500 ms—
Search settings, Python parallel="processes"—4.55 s—

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.

  • Cross-validate, Search settings: Python Prophet's cross-validation returns different outputs, and baselines, search and holdout reports have no Python API, so the benchmark times equivalent application code. The two libraries also compute ranges and some metrics differently.

Settings ​

The case declaration both libraries ran.

json
{
  "kind": "evaluation",
  "comparison": {
    "kind": "different-public-work",
    "evidenceId": "rolling-origin-evaluation-v1"
  },
  "configuration": {
    "growth": "logistic",
    "scaling": "minmax",
    "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": []
  },
  "pythonOptimizer": {
    "algorithm": "Auto",
    "maxIterations": 10000,
    "newtonFallback": true,
    "sigFigs": 12
  },
  "plan": {
    "horizonMs": 604800000,
    "cutoffs": [
      "2020-06-20T00:00:00.000Z",
      "2020-06-27T00:00:00.000Z",
      "2020-07-04T00:00:00.000Z",
      "2020-07-11T00:00:00.000Z",
      "2020-07-18T00:00:00.000Z",
      "2020-07-25T00:00:00.000Z",
      "2020-08-01T00:00:00.000Z",
      "2020-08-08T00:00:00.000Z",
      "2020-08-15T00:00:00.000Z",
      "2020-08-22T00:00:00.000Z",
      "2020-08-29T00:00:00.000Z",
      "2020-09-05T00:00:00.000Z"
    ]
  },
  "metricAggregation": "horizons",
  "candidates": [
    {
      "id": "prior-low",
      "changepointPriorScale": 0.1
    },
    {
      "id": "prior-mid",
      "changepointPriorScale": 0.2
    },
    {
      "id": "prior-high",
      "changepointPriorScale": 0.5
    }
  ]
}

Inspired by Prophet from Meta. Not affiliated with Meta.