Skip to content

Monthly, custom and scaled metrics ​

match ← All flat growth benchmarks

Three 91-day folds scored by calendar month, with custom metrics and with MASE, in rolling windows. The scores Effect gives Python's own forecasts must equal Python's exactly. Python Prophet has no MASE, so Python registers its own; each fold's scale must match Effect's.

Input ​

benchmark/inputs/v1/flat-mixed-components-large.json: 256 history rows and 64 forecast rows.

Output ​

Largest difference: 4.1e-7 (< 0.0001% 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-05-0242.251842.262842.26281.5e-7
2020-05-0328.891328.927928.92797.7e-8
2020-05-0421.423521.361621.36161.5e-7
2020-05-0535.020835.002235.00222.4e-7
2020-05-0634.899534.995334.99533.9e-7
2020-05-0745.908145.960845.96083.8e-7
2020-05-0849.893749.854549.85452.8e-7
2020-05-0941.022541.064841.06481.3e-7
2020-05-1034.902235.002235.00222.4e-7
2020-05-1121.381921.361621.36161.5e-7
2020-05-1224.116524.048424.04842.9e-7
2020-05-1334.954334.995334.99533.9e-7
2020-05-1447.133047.158747.15874.0e-7
2020-05-1535.108635.002235.00222.4e-7
2020-05-1641.125141.064841.06481.3e-7
2020-05-1728.875028.927928.92797.7e-8
2020-05-1821.379321.361621.36161.5e-7
2020-05-1924.136824.048424.04842.9e-7
2020-05-2036.157136.200136.20012.6e-7
2020-05-2145.857645.960845.96083.8e-7
2020-05-2248.672948.656648.65662.6e-7
2020-05-2341.088041.064841.06481.3e-7
2020-05-2428.822428.927928.92797.7e-8
2020-05-2534.948935.002235.00222.4e-7
2020-05-2625.320225.246425.24643.1e-7
2020-05-2735.002334.995334.99533.9e-7
2020-05-2845.881945.960845.96083.8e-7
2020-05-2948.700148.656648.65662.6e-7
2020-05-3035.105035.002235.00222.4e-7
2020-05-3128.913328.927928.92797.7e-8
2020-06-0122.524422.559622.55961.7e-7
2020-06-0224.139224.048424.04842.9e-7
2020-06-0335.042034.995334.99533.9e-7
2020-06-0434.915535.002235.00222.4e-7
2020-06-0548.616648.656648.65662.6e-7
2020-06-0641.123741.064841.06481.3e-7
2020-06-0730.076530.125830.12589.7e-8
2020-06-0821.242521.361621.36161.5e-7
2020-06-0935.012735.002235.00222.4e-7
2020-06-1035.049334.995334.99533.9e-7
2020-06-1145.887545.960845.96083.8e-7
2020-06-1248.618948.656648.65662.6e-7
2020-06-1342.373242.262842.26281.5e-7
2020-06-1435.054735.002235.00222.4e-7
2020-06-1521.306321.361621.36161.5e-7
2020-06-1624.088724.048424.04842.9e-7
2020-06-1735.098834.995334.99533.9e-7
2020-06-1845.924045.960845.96083.8e-7
2020-06-1936.123936.200136.20012.6e-7
2020-06-2041.105041.064841.06481.3e-7
2020-06-2128.948228.927928.92797.7e-8
2020-06-2221.248421.361621.36161.5e-7
2020-06-2323.989924.048424.04842.9e-7
2020-06-2435.051435.002235.00222.4e-7
2020-06-2547.137247.158747.15874.0e-7
2020-06-2648.568648.656648.65662.6e-7
2020-06-2741.107141.064841.06481.3e-7
2020-06-2829.024728.927928.92797.7e-8
2020-06-2934.990435.002235.00222.4e-7
2020-06-3024.029224.048424.04842.9e-7
2020-07-0136.292636.193236.19324.1e-7
2020-07-0246.007345.960845.96083.8e-7
2020-07-0348.582748.656648.65662.6e-7
2020-07-0434.977435.002235.00222.4e-7
2020-07-0528.986028.927928.92797.7e-8
2020-07-0621.312421.361621.36161.5e-7
2020-07-0725.142725.246425.24643.1e-7
2020-07-0834.999934.995334.99533.9e-7
2020-07-0935.039335.002235.00222.4e-7
2020-07-1048.578648.656648.65662.6e-7
2020-07-1141.023941.064841.06481.3e-7
2020-07-1229.008628.927928.92797.7e-8
2020-07-1322.602222.559622.55961.7e-7
2020-07-1434.953935.002235.00222.4e-7
2020-07-1535.033734.995334.99533.9e-7
2020-07-1646.056145.960845.96083.8e-7
2020-07-1748.647248.656648.65662.6e-7
2020-07-1841.012241.064841.06481.3e-7
2020-07-1936.241636.200136.20012.6e-7
2020-07-2021.388921.361621.36161.5e-7
2020-07-2123.960424.048424.04842.9e-7
2020-07-2234.929634.995334.99533.9e-7
2020-07-2345.988045.960845.96083.8e-7
2020-07-2434.984035.002235.00222.4e-7
2020-07-2542.177942.262842.26281.5e-7
2020-07-2628.937028.927928.92797.7e-8
2020-07-2721.438321.361621.36161.5e-7
2020-07-2824.040424.048424.04842.9e-7
2020-07-2934.968935.002235.00222.4e-7
2020-07-3046.038945.960845.96083.8e-7
2020-07-3149.925549.854549.85452.8e-7
2020-05-3035.105035.000435.00046.7e-8
2020-05-3128.913328.916228.91623.2e-8
2020-06-0122.524422.567622.56761.6e-7
2020-06-0224.139224.061824.06181.1e-7
2020-06-0335.042034.985734.98576.8e-8
2020-06-0434.915535.000435.00046.7e-8
2020-06-0548.616648.661148.66112.9e-7
2020-06-0641.123741.065641.06561.6e-7
2020-06-0730.076530.117430.11743.3e-8
2020-06-0821.242521.366421.36641.5e-7
2020-06-0935.012735.000435.00046.7e-8
2020-06-1035.049334.985734.98576.8e-8
2020-06-1145.887545.945845.94582.4e-7
2020-06-1248.618948.661148.66112.9e-7
2020-06-1342.373242.266842.26681.6e-7
2020-06-1435.054735.000435.00046.7e-8
2020-06-1521.306321.366421.36641.5e-7
2020-06-1624.088724.061824.06181.1e-7
2020-06-1735.098834.985734.98576.8e-8
2020-06-1845.924045.945845.94582.4e-7
2020-06-1936.123936.201636.20166.6e-8
2020-06-2041.105041.065641.06561.6e-7
2020-06-2128.948228.916228.91623.2e-8
2020-06-2221.248421.366421.36641.5e-7
2020-06-2323.989924.061824.06181.1e-7
2020-06-2435.051435.000435.00046.7e-8
2020-06-2547.137247.147047.14702.4e-7
2020-06-2648.568648.661148.66112.9e-7
2020-06-2741.107141.065641.06561.6e-7
2020-06-2829.024728.916228.91623.2e-8
2020-06-2934.990435.000435.00046.7e-8
2020-06-3024.029224.061824.06181.1e-7
2020-07-0136.292636.186936.18696.7e-8
2020-07-0246.007345.945845.94582.4e-7
2020-07-0348.582748.661148.66112.9e-7
2020-07-0434.977435.000435.00046.7e-8
2020-07-0528.986028.916228.91623.2e-8
2020-07-0621.312421.366421.36641.5e-7
2020-07-0725.142725.263125.26311.1e-7
2020-07-0834.999934.985734.98576.8e-8
2020-07-0935.039335.000435.00046.7e-8
2020-07-1048.578648.661148.66112.9e-7
2020-07-1141.023941.065641.06561.6e-7
2020-07-1229.008628.916228.91623.2e-8
2020-07-1322.602222.567622.56761.6e-7
2020-07-1434.953935.000435.00046.7e-8
2020-07-1535.033734.985734.98576.8e-8
2020-07-1646.056145.945845.94582.4e-7
2020-07-1748.647248.661148.66112.9e-7
2020-07-1841.012241.065641.06561.6e-7
2020-07-1936.241636.201636.20166.6e-8
2020-07-2021.388921.366421.36641.5e-7
2020-07-2123.960424.061824.06181.1e-7
2020-07-2234.929634.985734.98576.8e-8
2020-07-2345.988045.945845.94582.4e-7
2020-07-2434.984035.000435.00046.7e-8
2020-07-2542.177942.266842.26681.6e-7
2020-07-2628.937028.916228.91623.2e-8
2020-07-2721.438321.366421.36641.5e-7
2020-07-2824.040424.061824.06181.1e-7
2020-07-2934.968935.000435.00046.7e-8
2020-07-3046.038945.945845.94582.4e-7
2020-07-3149.925549.862449.86242.9e-7
2020-08-0141.024741.065641.06561.6e-7
2020-08-0228.914228.916228.91623.2e-8
2020-08-0335.075335.000435.00046.7e-8
2020-08-0424.032724.061824.06181.1e-7
2020-08-0534.893234.985734.98576.8e-8
2020-08-0647.140047.147047.14702.4e-7
2020-08-0748.684048.661148.66112.9e-7
2020-08-0834.921035.000435.00046.7e-8
2020-08-0928.855328.916228.91623.2e-8
2020-08-1021.415121.366421.36641.5e-7
2020-08-1124.096524.061824.06181.1e-7
2020-08-1236.145736.186936.18696.7e-8
2020-08-1335.025335.000435.00046.7e-8
2020-08-1448.763748.661148.66112.9e-7
2020-08-1541.087641.065641.06561.6e-7
2020-08-1628.875628.916228.91623.2e-8
2020-08-1721.404621.366421.36641.5e-7
2020-08-1836.257036.201636.20166.6e-8
2020-08-1934.921434.985734.98576.8e-8
2020-08-2045.877145.945845.94582.4e-7
2020-08-2148.689448.661148.66112.9e-7
2020-08-2241.056841.065641.06561.6e-7
2020-08-2334.891335.000435.00046.7e-8
2020-08-2422.541522.567622.56761.6e-7
2020-08-2524.126924.061824.06181.1e-7
2020-08-2634.976634.985734.98576.8e-8
2020-08-2745.901845.945845.94582.4e-7
2020-08-2835.086035.000435.00046.7e-8
2020-06-1342.373242.268242.26821.7e-7
2020-06-1435.054735.000535.00053.3e-8
2020-06-1521.306321.358921.35898.4e-9
2020-06-1624.088724.065924.06599.9e-8
2020-06-1735.098834.994034.99401.1e-7
2020-06-1845.924045.943045.94301.0e-8
2020-06-1936.123936.198836.19881.7e-8
2020-06-2041.105041.069841.06981.8e-7
2020-06-2128.948228.914128.91411.3e-7
2020-06-2221.248421.358921.35898.4e-9
2020-06-2323.989924.065924.06599.9e-8
2020-06-2435.051435.000535.00053.3e-8
2020-06-2547.137247.141347.14132.6e-8
2020-06-2648.568648.657848.65781.2e-7
2020-06-2741.107141.069841.06981.8e-7
2020-06-2829.024728.914128.91411.3e-7
2020-06-2934.990435.000535.00053.3e-8
2020-06-3024.029224.065924.06599.9e-8
2020-07-0136.292636.192436.19241.2e-7
2020-07-0246.007345.943045.94301.0e-8
2020-07-0348.582748.657848.65781.2e-7
2020-07-0434.977435.000535.00053.3e-8
2020-07-0528.986028.914128.91411.3e-7
2020-07-0621.312421.358921.35898.4e-9
2020-07-0725.142725.264325.26431.1e-7
2020-07-0834.999934.994034.99401.1e-7
2020-07-0935.039335.000535.00053.3e-8
2020-07-1048.578648.657848.65781.2e-7
2020-07-1141.023941.069841.06981.8e-7
2020-07-1229.008628.914128.91411.3e-7
2020-07-1322.602222.557322.55737.3e-9
2020-07-1434.953935.000535.00053.3e-8
2020-07-1535.033734.994034.99401.1e-7
2020-07-1646.056145.943045.94301.0e-8
2020-07-1748.647248.657848.65781.2e-7
2020-07-1841.012241.069841.06981.8e-7
2020-07-1936.241636.198836.19881.7e-8
2020-07-2021.388921.358921.35898.4e-9
2020-07-2123.960424.065924.06599.9e-8
2020-07-2234.929634.994034.99401.1e-7
2020-07-2345.988045.943045.94301.0e-8
2020-07-2434.984035.000535.00053.3e-8
2020-07-2542.177942.268242.26821.7e-7
2020-07-2628.937028.914128.91411.3e-7
2020-07-2721.438321.358921.35898.4e-9
2020-07-2824.040424.065924.06599.9e-8
2020-07-2934.968935.000535.00053.3e-8
2020-07-3046.038945.943045.94301.0e-8
2020-07-3149.925549.856149.85611.0e-7
2020-08-0141.024741.069841.06981.8e-7
2020-08-0228.914228.914128.91411.3e-7
2020-08-0335.075335.000535.00053.3e-8
2020-08-0424.032724.065924.06599.9e-8
2020-08-0534.893234.994034.99401.1e-7
2020-08-0647.140047.141347.14132.6e-8
2020-08-0748.684048.657848.65781.2e-7
2020-08-0834.921035.000535.00053.3e-8
2020-08-0928.855328.914128.91411.3e-7
2020-08-1021.415121.358921.35898.4e-9
2020-08-1124.096524.065924.06599.9e-8
2020-08-1236.145736.192436.19241.2e-7
2020-08-1335.025335.000535.00053.3e-8
2020-08-1448.763748.657848.65781.2e-7
2020-08-1541.087641.069841.06981.8e-7
2020-08-1628.875628.914128.91411.3e-7
2020-08-1721.404621.358921.35898.4e-9
2020-08-1836.257036.198836.19881.7e-8
2020-08-1934.921434.994034.99401.1e-7
2020-08-2045.877145.943045.94301.0e-8
2020-08-2148.689448.657848.65781.2e-7
2020-08-2241.056841.069841.06981.8e-7
2020-08-2334.891335.000535.00053.3e-8
2020-08-2422.541522.557322.55737.3e-9
2020-08-2524.126924.065924.06599.9e-8
2020-08-2634.976634.994034.99401.1e-7
2020-08-2745.901845.943045.94301.0e-8
2020-08-2835.086035.000535.00053.3e-8
2020-08-2941.158541.069841.06981.8e-7
2020-08-3030.087930.112430.11241.2e-7
2020-08-3121.348721.358921.35898.4e-9
2020-09-0124.145224.065924.06599.9e-8
2020-09-0234.999435.000535.00053.3e-8
2020-09-0345.850345.943045.94301.0e-8
2020-09-0448.645348.657848.65781.2e-7
2020-09-0542.312242.268242.26821.7e-7
2020-09-0628.844528.914128.91411.3e-7
2020-09-0734.913935.000535.00053.3e-8
2020-09-0824.099924.065924.06599.9e-8
2020-09-0935.030634.994034.99401.1e-7
2020-09-1045.878445.943045.94301.0e-8
2020-09-1149.859049.856149.85611.0e-7

Timing ​

Median of all measured repetitions.

StepEffect ProphetPython ProphetEffect Prophet is
Compute metrics462 µs5.61 msNot compared: different work
Compute metrics by calendar month376 µs5.05 msNot compared: different work
Compute custom metrics1.19 ms10.1 msNot compared: different work
Compute MASE2.00 ms5.62 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.

  • Compute metrics, Compute metrics by calendar month, Compute custom metrics, Compute MASE: 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": "flat",
    "scaling": "minmax",
    "seasonalityMode": "additive",
    "holidaysMode": "additive",
    "changepoints": {
      "mode": "auto",
      "count": 25,
      "range": 0.8
    },
    "changepointPriorScale": 0.05,
    "seasonalities": [
      {
        "name": "weekly-custom",
        "periodDays": 7,
        "fourierOrder": 2,
        "priorScale": 10,
        "conditionName": "active",
        "mode": "multiplicative"
      }
    ],
    "events": [
      {
        "name": "campaign",
        "date": "2020-01-22",
        "lowerWindowDays": 0,
        "upperWindowDays": 0,
        "priorScale": 10
      }
    ],
    "regressors": [
      {
        "name": "promotion",
        "priorScale": 10,
        "standardization": "never"
      }
    ]
  },
  "effectOptimizer": {
    "algorithm": "lbfgs",
    "maxIterations": 10000,
    "fallback": "none",
    "lbfgs": {
      "historySize": 5,
      "initAlpha": 0.001,
      "tolObj": 1e-12,
      "tolRelObj": 10000,
      "tolGrad": 1e-8,
      "tolRelGrad": 10000000,
      "tolParam": 1e-8
    }
  },
  "pythonOptimizer": {
    "algorithm": "LBFGS",
    "maxIterations": 10000,
    "newtonFallback": false
  },
  "plan": {
    "horizonMs": 7862400000,
    "cutoffs": [
      "2020-05-01T00:00:00.000Z",
      "2020-05-29T00:00:00.000Z",
      "2020-06-12T00:00:00.000Z"
    ]
  },
  "metricAggregation": "rolling"
}

Inspired by Prophet from Meta. Not affiliated with Meta.