Skip to content

Refit after a week of new data ​

match flagged ← All logistic growth benchmarks

fit(history, { growth: "logistic", map: { warmStart } }) from warmStartParameters of a fit of the first 358 days, against fit(df, init=warm_start_params(m)). The 365 days with changing growth, fitted with L-BFGS. Timings compare the refit with a fresh fit.

Input ​

benchmark/inputs/v3/logistic-rate-changes.json: 365 history rows and 455 forecast rows.

Output ​

Largest difference: 0.058 (0.039% of the input's range).

Every forecast row from both libraries.

DateEffect ProphetPython ProphetDifference
2020-01-019.46159.44830.013
2020-01-0210.508510.49520.013
2020-01-0310.946910.93340.013
2020-01-0410.442010.42850.014
2020-01-059.57529.56170.014
2020-01-069.19919.18550.014
2020-01-079.60929.59560.014
2020-01-0810.580810.56730.013
2020-01-0911.644811.63130.014
2020-01-1012.100412.08660.014
2020-01-1111.613011.59920.014
2020-01-1210.763910.75010.014
2020-01-1310.405810.39200.014
2020-01-1410.834110.82020.014
2020-01-1511.824011.81040.014
2020-01-1612.906712.89300.014
2020-01-1713.381213.36730.014
2020-01-1812.913012.89910.014
2020-01-1912.083312.06940.014
2020-01-2011.744811.73090.014
2020-01-2112.193012.17910.014
2020-01-2213.203113.18940.014
2020-01-2314.306214.29240.014
2020-01-2414.801314.78740.014
2020-01-2514.354014.34010.014
2020-01-2613.545513.53170.014
2020-01-2713.228413.21460.014
2020-01-2813.698313.68450.014
2020-01-2914.730414.71680.014
2020-01-3015.855715.84210.014
2020-01-3116.373416.35960.014
2020-02-0115.948815.93510.014
2020-02-0215.163315.14970.014
2020-02-0314.869614.85600.014
2020-02-0415.363015.34950.014
2020-02-0516.419016.40570.013
2020-02-0617.568417.55520.013
2020-02-0718.110518.09720.013
2020-02-0817.710617.69740.013
2020-02-0916.950116.93700.013
2020-02-1016.681616.66850.013
2020-02-1117.200617.18760.013
2020-02-1218.282318.26960.013
2020-02-1319.457919.44520.013
2020-02-1420.026320.01360.013
2020-02-1519.653119.64050.013
2020-02-1618.919518.90710.012
2020-02-1718.678218.66590.012
2020-02-1819.224719.21260.012
2020-02-1920.334220.32240.012
2020-02-2021.537921.52620.012
2020-02-2122.134722.12300.012
2020-02-2221.790121.77850.012
2020-02-2321.085421.07410.011
2020-02-2420.873420.86220.011
2020-02-2521.449421.43840.011
2020-02-2622.588722.57810.011
2020-02-2723.822423.81190.010
2020-02-2824.449524.43910.010
2020-02-2924.135524.12540.010
2020-03-0123.461823.45190.0099
2020-03-0223.280923.27120.0097
2020-03-0323.888323.87880.0095
2020-03-0425.059425.05030.0091
2020-03-0526.325126.31620.0088
2020-03-0626.984526.97570.0087
2020-03-0726.703026.69460.0084
2020-03-0826.062126.05400.0081
2020-03-0925.914325.90640.0079
2020-03-1026.555126.54750.0076
2020-03-1127.759727.75260.0071
2020-03-1229.059229.05240.0068
2020-03-1329.752729.74610.0066
2020-03-1429.505729.49940.0063
2020-03-1528.899328.89340.0059
2020-03-1628.786328.78080.0056
2020-03-1729.462229.45700.0052
2020-03-1830.702130.69750.0046
2020-03-1932.037232.03290.0043
2020-03-2032.766532.76240.0041
2020-03-2132.555432.55170.0036
2020-03-2231.985331.98200.0032
2020-03-2331.908731.90590.0028
2020-03-2432.621232.61880.0024
2020-03-2533.898033.89620.0017
2020-03-2635.270135.26880.0013
2020-03-2736.036636.03560.0010
2020-03-2835.862935.86240.00051
2020-03-2935.330335.33031.9e-7
2020-03-3035.291535.29200.00049
2020-03-3136.042036.04290.00099
2020-04-0137.356837.35850.0017
2020-04-0238.767238.76940.0022
2020-04-0339.572039.57460.0026
2020-04-0439.436939.44000.0032
2020-04-0538.943038.94670.0037
2020-04-0638.943038.94730.0043
2020-04-0739.732339.73720.0049
2020-04-0841.086141.09180.0057
2020-04-0942.535642.54180.0063
2020-04-1043.379643.38640.0067
2020-04-1143.283743.29110.0074
2020-04-1242.829242.83720.0080
2020-04-1342.868642.87720.0087
2020-04-1443.697343.70660.0093
2020-04-1545.090645.10080.010
2020-04-1646.579546.59050.011
2020-04-1747.463147.47460.012
2020-04-1847.406747.41900.012
2020-04-1946.991647.00470.013
2020-04-2047.070447.08430.014
2020-04-2147.938647.95330.015
2020-04-2249.371449.38710.016
2020-04-2350.899750.91620.016
2020-04-2451.822651.83980.017
2020-04-2551.805651.82360.018
2020-04-2651.429751.44860.019
2020-04-2751.459451.48140.022
2020-04-2852.277052.30200.025
2020-04-2953.657753.68600.028
2020-04-3055.132555.16390.031
2020-05-0156.000356.03480.034
2020-05-0255.926755.96450.038
2020-05-0355.492955.53390.041
2020-05-0455.551455.59570.044
2020-05-0556.397656.44530.048
2020-05-0657.806957.85810.051
2020-05-0759.310059.36470.055
2020-05-0860.206260.26410.058
2020-05-0959.804759.85660.052
2020-05-1059.039659.08540.046
2020-05-1158.763558.80320.040
2020-05-1259.271959.30540.033
2020-05-1360.340060.36750.027
2020-05-1461.498761.52000.021
2020-05-1562.047262.06200.015
2020-05-1661.650861.65930.0085
2020-05-1760.890860.89300.0022
2020-05-1860.619860.61560.0042
2020-05-1961.133261.12270.011
2020-05-2062.206462.18950.017
2020-05-2163.291863.27510.017
2020-05-2263.766563.74990.017
2020-05-2363.296063.27970.016
2020-05-2462.461662.44550.016
2020-05-2562.115962.09990.016
2020-05-2662.554262.53840.016
2020-05-2763.551863.53650.015
2020-05-2864.639864.62460.015
2020-05-2965.117165.10200.015
2020-05-3064.649264.63430.015
2020-05-3163.817363.80260.015
2020-06-0163.474163.45960.014
2020-06-0263.915063.90070.014
2020-06-0364.915164.90130.014
2020-06-0466.005665.99190.014
2020-06-0566.485566.47180.014
2020-06-0666.020166.00670.013
2020-06-0765.190765.17760.013
2020-06-0864.850064.83710.013
2020-06-0965.293465.28070.013
2020-06-1066.296166.28380.012
2020-06-1167.389167.37700.012
2020-06-1267.871467.85940.012
2020-06-1367.408567.39670.012
2020-06-1466.581766.57010.012
2020-06-1566.243466.23210.011
2020-06-1666.689366.67810.011
2020-06-1767.694467.68370.011
2020-06-1868.789968.77940.011
2020-06-1969.274769.26420.010
2020-06-2068.814268.80400.010
2020-06-2167.989867.97990.010
2020-06-2267.654167.64430.0097
2020-06-2368.102368.09280.0095
2020-06-2469.109969.10080.0091
2020-06-2570.207870.19890.0089
2020-06-2670.695070.68620.0088
2020-06-2770.237070.22840.0086
2020-06-2869.415069.40670.0083
2020-06-2969.081669.07360.0081
2020-06-3069.532369.52450.0078
2020-07-0170.542370.53490.0074
2020-07-0271.642671.63540.0072
2020-07-0372.132272.12500.0071
2020-07-0471.676571.66970.0069
2020-07-0570.856970.85030.0066
2020-07-0670.525970.51950.0064
2020-07-0770.978970.97280.0061
2020-07-0871.991371.98560.0057
2020-07-0973.093973.08840.0055
2020-07-1073.585873.58040.0054
2020-07-1173.132573.12740.0051
2020-07-1272.315272.31030.0049
2020-07-1371.986571.98190.0046
2020-07-1472.441972.43750.0044
2020-07-1573.456573.45250.0039
2020-07-1674.561474.55770.0037
2020-07-1775.055675.05200.0036
2020-07-1874.604674.60120.0034
2020-07-1973.789673.78650.0031
2020-07-2073.463273.46030.0028
2020-07-2173.920873.91820.0026
2020-07-2274.937774.93550.0021
2020-07-2376.044876.04290.0019
2020-07-2476.541376.53950.0018
2020-07-2576.092576.09100.0016
2020-07-2675.279775.27840.0013
2020-07-2774.955574.95450.0010
2020-07-2875.415375.41460.00078
2020-07-2976.434476.43410.00032
2020-07-3077.543977.54370.00020
2020-07-3178.042778.04250.00022
2020-08-0177.596277.59616.6e-5
2020-08-0276.785776.78580.00010
2020-08-0376.463876.46400.00024
2020-08-0476.925976.92630.00037
2020-08-0577.947377.94800.00072
2020-08-0679.058979.05970.00083
2020-08-0779.559879.56060.00082
2020-08-0879.115579.11640.00098
2020-08-0978.307178.30820.0011
2020-08-1078.023678.02490.0013
2020-08-1178.524278.52570.0015
2020-08-1279.584179.58600.0019
2020-08-1380.734480.73640.0020
2020-08-1481.274181.27610.0020
2020-08-1580.868680.87080.0022
2020-08-1680.099180.10150.0024
2020-08-1779.818379.82090.0026
2020-08-1880.321680.32440.0028
2020-08-1981.384381.38740.0031
2020-08-2082.537282.54050.0033
2020-08-2183.079683.08290.0033
2020-08-2282.839982.84250.0026
2020-08-2382.236982.23870.0018
2020-08-2482.123082.12400.0010
2020-08-2582.793782.79390.00026
2020-08-2684.024284.02390.00032
2020-08-2785.345685.34450.0011
2020-08-2886.056886.05480.0021
2020-08-2985.823385.82050.0028
2020-08-3085.226385.22270.0036
2020-08-3185.118485.11400.0044
2020-09-0185.795085.78980.0052
2020-09-0287.185687.18070.0049
2020-09-0388.667588.66270.0048
2020-09-0489.539889.53490.0049
2020-09-0589.467889.46300.0048
2020-09-0689.032889.02810.0047
2020-09-0789.087389.08270.0046
2020-09-0889.926789.92220.0045
2020-09-0991.326391.32210.0042
2020-09-1092.817092.81280.0042
2020-09-1193.697893.69360.0042
2020-09-1293.634293.63000.0041
2020-09-1393.207393.20330.0040
2020-09-1493.269793.26570.0039
2020-09-1594.116894.11290.0038
2020-09-1695.523895.52030.0035
2020-09-1797.021797.01820.0035
2020-09-1897.909597.90600.0035
2020-09-1997.852697.84920.0034
2020-09-2097.432297.42890.0033
2020-09-2197.500897.49760.0032
2020-09-2298.354098.35090.0031
2020-09-2399.766899.76400.0028
2020-09-24101.2702101.26750.0027
2020-09-25102.1633102.16060.0028
2020-09-26102.1115102.10880.0027
2020-09-27101.6959101.69330.0026
2020-09-28101.7691101.76670.0025
2020-09-29102.6266102.62420.0024
2020-09-30104.0435104.04140.0021
2020-10-01105.5508105.54880.0020
2020-10-02106.4475106.44550.0020
2020-10-03106.3990106.39710.0019
2020-10-04105.9865105.98470.0018
2020-10-05106.0626106.06090.0017
2020-10-06106.9227106.92100.0016
2020-10-07108.3419108.34060.0013
2020-10-08109.8513109.85010.0012
2020-10-09110.7498110.74860.0013
2020-10-10110.7029110.70180.0012
2020-10-11110.2918110.29070.0010
2020-10-12110.3690110.36800.00094
2020-10-13111.2299111.22900.00086
2020-10-14112.6497112.64920.00055
2020-10-15114.1594114.15900.00047
2020-10-16115.0581115.05750.00053
2020-10-17115.0110115.01060.00042
2020-10-18114.5994114.59920.00029
2020-10-19114.6760114.67580.00019
2020-10-20115.5360115.53599.8e-5
2020-10-21116.9546116.95480.00020
2020-10-22118.4630118.46320.00028
2020-10-23119.3599119.36020.00023
2020-10-24119.3110119.31130.00034
2020-10-25118.8973118.89770.00047
2020-10-26118.9714118.97190.00057
2020-10-27119.8287119.82940.00065
2020-10-28121.2445121.24550.00095
2020-10-29122.7497122.75070.0010
2020-10-30123.6433123.64430.00097
2020-10-31123.5907123.59180.0011
2020-11-01123.1732123.17440.0012
2020-11-02123.2432123.24450.0013
2020-11-03124.0962124.09760.0014
2020-11-04125.5074125.50910.0017
2020-11-05127.0078127.00960.0018
2020-11-06127.8964127.89810.0017
2020-11-07127.8385127.84040.0018
2020-11-08127.4155127.41740.0019
2020-11-09127.4798127.48180.0020
2020-11-10128.3269128.32900.0021
2020-11-11129.7319129.73430.0024
2020-11-12131.2259131.22830.0025
2020-11-13132.1078132.11020.0024
2020-11-14132.0431132.04560.0025
2020-11-15131.6130131.61560.0026
2020-11-16131.6700131.67270.0027
2020-11-17132.5095132.51230.0028
2020-11-18133.9068133.90990.0031
2020-11-19135.3929135.39610.0032
2020-11-20136.2667136.26980.0031
2020-11-21136.1936136.19680.0032
2020-11-22135.7549135.75820.0033
2020-11-23135.8032135.80660.0034
2020-11-24136.6338136.63720.0035
2020-11-25138.0219138.02570.0037
2020-11-26139.4986139.50240.0038
2020-11-27140.3629140.36660.0037
2020-11-28140.2800140.28390.0038
2020-11-29139.8314139.83540.0039
2020-11-30139.8695139.87360.0040
2020-12-01140.6898140.69390.0041
2020-12-02142.0675142.07190.0044
2020-12-03143.5335143.53790.0044
2020-12-04144.3869144.39120.0043
2020-12-05144.2930144.29750.0044
2020-12-06143.8332143.83780.0045
2020-12-07143.8600143.86460.0046
2020-12-08144.6687144.67340.0047
2020-12-09146.0347146.03960.0049
2020-12-10147.4888147.49380.0050
2020-12-11148.3302148.33510.0049
2020-12-12148.2242148.22910.0050
2020-12-13147.7520147.75710.0051
2020-12-14147.7662147.77140.0052
2020-12-15148.5623148.56750.0052
2020-12-16149.9155149.92100.0055
2020-12-17151.3567151.36220.0055
2020-12-18152.1850152.19040.0054
2020-12-19152.0658152.07130.0055
2020-12-20151.5802151.58580.0056
2020-12-21151.5810151.58670.0057
2020-12-22152.3635152.36920.0057
2020-12-23153.7029153.70890.0060
2020-12-24155.1303155.13630.0060
2020-12-25155.9446155.95050.0059
2020-12-26155.8112155.81720.0060
2020-12-27155.3115155.31750.0061
2020-12-28155.2979155.30400.0061
2020-12-29156.0659156.07210.0062
2020-12-30157.3908157.39720.0064
2020-12-31158.8035158.80990.0064
2021-01-01159.6030159.60930.0063
2021-01-02159.4548159.46120.0064
2021-01-03158.9401158.94650.0065
2021-01-04158.9114158.91790.0065
2021-01-05159.6643159.67090.0066
2021-01-06160.9739160.98070.0068
2021-01-07162.3713162.37810.0068
2021-01-08163.1554163.16210.0067
2021-01-09162.9917162.99850.0068
2021-01-10162.4614162.46820.0068
2021-01-11162.4171162.42400.0069
2021-01-12163.1543163.16120.0069
2021-01-13164.4481164.45530.0071
2021-01-14165.8296165.83680.0072
2021-01-15166.5978166.60490.0070
2021-01-16166.4181166.42520.0071
2021-01-17165.8718165.87890.0072
2021-01-18165.8114165.81860.0072
2021-01-19166.5324166.53960.0072
2021-01-20167.8100167.81750.0074
2021-01-21169.1753169.18270.0074
2021-01-22169.9272169.93450.0073
2021-01-23169.7311169.73850.0074
2021-01-24169.1684169.17580.0074
2021-01-25169.0916169.09900.0074
2021-01-26169.7961169.80360.0075
2021-01-27171.0573171.06500.0077
2021-01-28172.4060172.41370.0077
2021-01-29173.1413173.14890.0076
2021-01-30172.9287172.93630.0076
2021-01-31172.3493172.35700.0076
2021-02-01172.2559172.26350.0077
2021-02-02172.9438172.95140.0077
2021-02-03174.1882174.19610.0079
2021-02-04175.5202175.52810.0079
2021-02-05176.2389176.24660.0077
2021-02-06176.0095176.01730.0078
2021-02-07175.4134175.42130.0078
2021-02-08175.3033175.31110.0078
2021-02-09175.9744175.98220.0078
2021-02-10177.2021177.21020.0080
2021-02-11178.5174178.52540.0080
2021-02-12179.2193179.22720.0079
2021-02-13178.9732178.98110.0079
2021-02-14178.3604178.36830.0079
2021-02-15178.2335178.24140.0080
2021-02-16178.8879178.89590.0079
2021-02-17180.0989180.10710.0082
2021-02-18181.3975181.40560.0081
2021-02-19182.0827182.09070.0080
2021-02-20181.8199181.82790.0080
2021-02-21181.1905181.19850.0080
2021-02-22181.0470181.05500.0080
2021-02-23181.6848181.69280.0080
2021-02-24182.8792182.88740.0082
2021-02-25184.1612184.16940.0082
2021-02-26184.8299184.83800.0080
2021-02-27184.5507184.55870.0081
2021-02-28183.9047183.91280.0081
2021-03-01183.7448183.75290.0081
2021-03-02184.3662184.37430.0081
2021-03-03185.5443185.55250.0083
2021-03-04186.8099186.81820.0082
2021-03-05187.4623187.47040.0081
2021-03-06187.1668187.17490.0081
2021-03-07186.5047186.51280.0081
2021-03-08186.3285186.33660.0081
2021-03-09186.9338186.94190.0081
2021-03-10188.0958188.10400.0083
2021-03-11189.3454189.35360.0082
2021-03-12189.9818189.98980.0081
2021-03-13189.6703189.67840.0081
2021-03-14188.9923189.00030.0081
2021-03-15188.8003188.80830.0081
2021-03-16189.3898189.39780.0080
2021-03-17190.5360190.54420.0082
2021-03-18191.7699191.77810.0082
2021-03-19192.3907192.39870.0080
2021-03-20192.0636192.07160.0080
2021-03-21191.3700191.37810.0080
2021-03-22191.1626191.17060.0080
2021-03-23191.7367191.74460.0080
2021-03-24192.8675192.87570.0082
2021-03-25194.0862194.09430.0081
2021-03-26194.6917194.69960.0079
2021-03-27194.3495194.35740.0079
2021-03-28193.6408193.64870.0079
2021-03-29193.4183193.42620.0079
2021-03-30193.9774193.98530.0079

Internal fit differences ​

The forecasts match, so this case passes. Both libraries search for the best-fitting parameters and stop when they are close enough. On this input they stopped at slightly different points, so these internal numbers differ by more than the threshold where we take a closer look.

CheckEffect ProphetPython ProphetThreshold
Fitting objective (lower is a better fit)-1687.6409-1688.47580.01
warm-start-parameters-2.6234-2.68900.01

Timing ​

Median of all measured repetitions.

StepEffect ProphetPython ProphetEffect Prophet is
Fit131 ms111 ms1.2× slower
Refit from an earlier fit117 ms94.2 ms1.2× slower

Settings ​

The case declaration both libraries ran.

json
{
  "kind": "map",
  "comparison": {
    "kind": "equivalent-objective",
    "evidenceId": "logistic-python-reconciliation-v1"
  },
  "fitRequest": "growth-only",
  "configuration": {
    "growth": "logistic",
    "scaling": "absmax",
    "seasonalityMode": "additive",
    "holidaysMode": "additive",
    "changepoints": {
      "mode": "auto",
      "count": 25,
      "range": 0.8
    },
    "changepointPriorScale": 0.05,
    "seasonalities": [
      {
        "name": "weekly",
        "periodDays": 7,
        "fourierOrder": 3,
        "priorScale": 10
      }
    ],
    "events": [],
    "regressors": []
  },
  "pythonOptimizer": {
    "algorithm": "Auto",
    "maxIterations": 10000,
    "newtonFallback": true,
    "sigFigs": 12
  },
  "warmStart": {
    "baseRows": 358,
    "investigateParameterAbsolute": 0.01
  }
}

Inspired by Prophet from Meta. Not affiliated with Meta.