Skip to content

Event with a window ​

match ← All logistic growth benchmarks

A campaign on two dates, each affecting the day before and the day after too.

Input ​

benchmark/inputs/v2/logistic-event-96.json: 96 history rows and 120 forecast rows.

Output ​

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

Every forecast row from both libraries.

DateEffect ProphetPython ProphetDifference
2020-01-0114.192314.19232.6e-11
2020-01-0214.724414.72442.7e-11
2020-01-0315.273015.27302.7e-11
2020-01-0415.838515.83852.8e-11
2020-01-0516.421016.42102.8e-11
2020-01-0617.020817.02082.9e-11
2020-01-0717.638017.63803.0e-11
2020-01-0818.273018.27303.0e-11
2020-01-0918.925818.92583.1e-11
2020-01-1019.596719.59673.1e-11
2020-01-1120.285620.28563.2e-11
2020-01-1220.992820.99283.2e-11
2020-01-1321.718421.71843.3e-11
2020-01-1422.462222.46223.3e-11
2020-01-1523.224423.22443.4e-11
2020-01-1624.004924.00493.4e-11
2020-01-1724.803724.80373.5e-11
2020-01-1825.620625.62063.5e-11
2020-01-1926.455626.45563.5e-11
2020-01-2027.308427.30843.6e-11
2020-01-2130.152330.15234.1e-11
2020-01-2230.956330.95633.6e-11
2020-01-2331.963131.96313.9e-11
2020-01-2430.893730.89373.7e-11
2020-01-2531.832031.83203.7e-11
2020-01-2632.786232.78623.7e-11
2020-01-2733.756033.75603.7e-11
2020-01-2834.740834.74083.8e-11
2020-01-2935.740135.74013.8e-11
2020-01-3036.753436.75343.8e-11
2020-01-3137.779937.77993.8e-11
2020-02-0138.819138.81913.8e-11
2020-02-0239.870239.87023.8e-11
2020-02-0340.932540.93253.7e-11
2020-02-0442.005242.00523.7e-11
2020-02-0543.087643.08763.7e-11
2020-02-0644.178844.17883.7e-11
2020-02-0745.277945.27793.7e-11
2020-02-0846.384146.38413.6e-11
2020-02-0947.497047.49703.6e-11
2020-02-1048.615248.61523.6e-11
2020-02-1149.737749.73773.5e-11
2020-02-1250.863550.86353.5e-11
2020-02-1351.991851.99183.4e-11
2020-02-1453.121553.12153.4e-11
2020-02-1554.251754.25173.3e-11
2020-02-1655.381455.38143.3e-11
2020-02-1756.509656.50963.2e-11
2020-02-1857.635457.63543.2e-11
2020-02-1958.757958.75793.1e-11
2020-02-2059.876259.87623.0e-11
2020-02-2160.989260.98923.0e-11
2020-02-2262.096262.09622.9e-11
2020-02-2363.196363.19632.8e-11
2020-02-2464.288664.28862.8e-11
2020-02-2565.372365.37232.7e-11
2020-02-2666.446766.44672.6e-11
2020-02-2767.510967.51092.6e-11
2020-02-2868.564468.56442.5e-11
2020-02-2969.606469.60642.4e-11
2020-03-0170.636270.63622.3e-11
2020-03-0271.653371.65332.2e-11
2020-03-0372.657172.65712.2e-11
2020-03-0473.647273.64722.1e-11
2020-03-0574.622974.62292.0e-11
2020-03-0675.583975.58391.9e-11
2020-03-0776.529876.52981.9e-11
2020-03-0877.460277.46021.8e-11
2020-03-0978.374878.37481.7e-11
2020-03-1079.273479.27341.7e-11
2020-03-1180.155680.15561.6e-11
2020-03-1281.021381.02131.5e-11
2020-03-1381.870481.87041.4e-11
2020-03-1482.702782.70271.4e-11
2020-03-1583.518083.51801.3e-11
2020-03-1684.316584.31651.3e-11
2020-03-1785.097985.09791.2e-11
2020-03-1885.862485.86241.1e-11
2020-03-1986.609986.60991.1e-11
2020-03-2087.340687.34061.0e-11
2020-03-2188.054588.05459.6e-12
2020-03-2288.751788.75179.1e-12
2020-03-2389.432489.43248.5e-12
2020-03-2490.096790.09678.0e-12
2020-03-2590.744890.74487.5e-12
2020-03-2691.376891.37687.1e-12
2020-03-2791.993191.99316.6e-12
2020-03-2892.593892.59386.2e-12
2020-03-2993.179193.17915.8e-12
2020-03-3093.749393.74935.4e-12
2020-03-3194.304794.30475.0e-12
2020-04-0194.845694.84564.6e-12
2020-04-0295.372195.37214.3e-12
2020-04-0395.884795.88474.0e-12
2020-04-0496.383596.38353.6e-12
2020-04-0596.869096.86903.4e-12
2020-04-0697.341397.34133.1e-12
2020-04-0797.800897.80082.8e-12
2020-04-0898.247998.24792.5e-12
2020-04-0998.682798.68272.3e-12
2020-04-1099.105699.10562.1e-12
2020-04-1199.517099.51701.9e-12
2020-04-1299.917199.91711.6e-12
2020-04-13100.3062100.30621.4e-12
2020-04-14100.6847100.68471.3e-12
2020-04-15103.0261103.02615.8e-12
2020-04-16103.3002103.30024.5e-13
2020-04-17103.7502103.75022.7e-12
2020-04-18102.0977102.09776.3e-13
2020-04-19102.4273102.42735.0e-13
2020-04-20102.7479102.74793.6e-13
2020-04-21103.0598103.05982.4e-13
2020-04-22103.3634103.36341.3e-13
2020-04-23103.6588103.65881.4e-14
2020-04-24103.9464103.94645.7e-14
2020-04-25104.2264104.22641.1e-13
2020-04-26104.4990104.49902.4e-13
2020-04-27104.7645104.76453.1e-13
2020-04-28105.0231105.02313.8e-13
2020-04-29105.2751105.27514.4e-13

Timing ​

Median of all measured repetitions.

StepEffect ProphetPython ProphetEffect Prophet is
Fit9.09 ms17.9 ms2.0× faster
Predict925 µs4.20 ms4.5× faster
Save model to JSON22 µs656 µs30× faster
Load model from JSON150 µs3.45 ms23× faster
Load and predict in a new process158 ms1.49 s9.4× faster

Settings ​

The case declaration both libraries ran.

json
{
  "kind": "map",
  "comparison": {
    "kind": "equivalent-objective",
    "evidenceId": "logistic-python-reconciliation-v1"
  },
  "configuration": {
    "growth": "logistic",
    "scaling": "absmax",
    "seasonalityMode": "additive",
    "holidaysMode": "additive",
    "changepoints": {
      "mode": "explicit",
      "timestamps": [
        "2020-02-08T00:00:00.000Z"
      ]
    },
    "changepointPriorScale": 0.05,
    "seasonalities": [],
    "events": [
      {
        "name": "campaign",
        "date": "2020-01-22",
        "lowerWindowDays": -1,
        "upperWindowDays": 1,
        "priorScale": 10
      },
      {
        "name": "campaign",
        "date": "2020-04-16",
        "lowerWindowDays": -1,
        "upperWindowDays": 1,
        "priorScale": 10
      }
    ],
    "regressors": []
  },
  "pythonOptimizer": {
    "algorithm": "Auto",
    "maxIterations": 10000,
    "newtonFallback": true,
    "sigFigs": 12
  }
}

Inspired by Prophet from Meta. Not affiliated with Meta.