diff --git a/docs/arima.html b/docs/arima.html index 682a39cfb..c48b429e0 100644 --- a/docs/arima.html +++ b/docs/arima.html @@ -59,9 +59,9 @@
-
{'ar1': 0.4689829145163128,
- 'ar2': 0.22312523789164457,
- 'ma1': -1.0913909475743682}
+
{'ar1': 0.466880673428245,
+ 'ar2': 0.22506344134934328,
+ 'ma1': -1.0964437716813402}
@@ -125,11 +125,11 @@

predict_arima -
(array([448.07383778, 423.76127286, 453.4616271 , 496.63557354,
-        508.56552631, 572.26359535, 659.79847373, 644.20507938,
-        546.51511535, 499.7512409 ]),
- array([11.52726482, 13.17087978, 14.69871817, 15.67558242, 16.44637167,
-        17.05466929, 17.56245596, 17.99871958, 18.38480966, 18.73431477]))
+
(array([448.03641765, 423.6958796 , 453.37910036, 496.53844782,
+        508.4585562 , 572.14906375, 659.67853114, 644.08113724,
+        546.38826999, 499.62227626]),
+ array([11.53128398, 13.1873165 , 14.74522214, 15.74954361, 16.54939395,
+        17.18562958, 17.7205789 , 18.18296878, 18.59424176, 18.96803794]))
@@ -162,12 +162,12 @@

predict_arima -
(array([470.00937272, 440.51544656, 442.19147092, 430.30545649,
-        425.096418  , 417.3695783 , 411.26634297, 404.88733056,
-        399.07104147, 393.41663428]),
- array([ 30.69910092,  51.71192568,  61.89381735,  71.06719113,
-         77.98071907,  83.94818888,  88.93456731,  93.25688638,
-         96.99560511, 100.27006818]))
+
(array([470.0097129 , 440.51623786, 442.19261859, 430.30698345,
+        425.09828469, 417.37177946, 411.26885683, 404.89014495,
+        399.07414049, 393.42000495]),
+ array([ 30.69910087,  51.7119296 ,  61.89382391,  71.067199  ,
+         77.98072868,  83.94819971,  88.93457943,  93.2568996 ,
+         96.9956194 , 100.27008344]))
@@ -202,11 +202,11 @@

predict_arima -
(array([441.89795441, 463.67049935, 489.91196632, 513.32979525,
-        528.76750245, 534.25618332, 530.97888269, 522.35816274,
-        512.68417075, 505.75238585]),
- array([25.04154434, 31.85338185, 33.32712576, 33.34241457, 34.68174561,
-        37.33840998, 39.68800251, 40.7798007 , 40.92280834, 40.99296398]))
+
(array([441.89777076, 463.6701726 , 489.91157043, 513.32941052,
+        528.76719128, 534.25597523, 530.97877135, 522.35811387,
+        512.68413676, 505.7523218 ]),
+ array([25.04154425, 31.85337615, 33.32711649, 33.34240568, 34.68173961,
+        37.33840629, 39.6879995 , 40.7797975 , 40.92280492, 40.99296076]))
@@ -240,7 +240,7 @@

predict_arima -
1020.7426750289078
+
1020.8073918488345
@@ -475,17 +475,17 @@

auto_arima_fReferences 2 - 490.196786 + 490.196787 3 - 489.549974 + 489.549975 4 - 485.653254 + 485.653255 5 @@ -917,37 +917,37 @@

References 1 419.928952 483.363282 - 546.797611 + 546.797612 2 - 411.105076 - 490.196786 - 569.288497 + 411.105075 + 490.196787 + 569.288499 3 - 401.920877 - 489.549974 - 577.179072 + 401.920876 + 489.549975 + 577.179074 4 - 393.609049 - 485.653254 - 577.697460 + 393.609048 + 485.653255 + 577.697462 5 - 386.910312 + 386.910310 481.407362 - 575.904412 + 575.904414 6 - 382.073458 + 382.073456 478.248913 - 574.424368 + 574.424370 @@ -1020,48 +1020,48 @@

References 419.928952 401.946201 483.363282 - 546.797611 - 564.780362 + 546.797612 + 564.780363 2 - 411.105076 - 388.683675 - 490.196786 - 569.288497 - 591.709898 + 411.105075 + 388.683674 + 490.196787 + 569.288499 + 591.709900 3 - 401.920877 - 377.079245 - 489.549974 - 577.179072 - 602.020703 + 401.920876 + 377.079244 + 489.549975 + 577.179074 + 602.020706 4 - 393.609049 - 367.515796 - 485.653254 - 577.697460 - 603.790713 + 393.609048 + 367.515794 + 485.653255 + 577.697462 + 603.790716 5 - 386.910312 - 360.121711 + 386.910310 + 360.121709 481.407362 - 575.904412 - 602.693012 + 575.904414 + 602.693015 6 - 382.073458 - 354.809053 + 382.073456 + 354.809051 478.248913 - 574.424368 - 601.688773 + 574.424370 + 601.688776 @@ -1123,7 +1123,7 @@

References 1 - 112.688512 + 112.688513 2 @@ -1143,7 +1143,7 @@

References 139 - 630.376066 + 630.376068 140 @@ -1151,15 +1151,15 @@

References 141 - 451.814468 + 451.814466 142 - 443.498420 + 443.498419 143 - 374.088367 + 374.088365 @@ -1227,7 +1227,7 @@

References 1 92.528257 - 112.688512 + 112.688513 132.848768 @@ -1256,33 +1256,33 @@

References 139 - 610.215811 - 630.376066 - 650.536321 + 610.215813 + 630.376068 + 650.536323 140 - 547.795809 + 547.795810 567.956065 588.116320 141 - 431.654213 - 451.814468 - 471.974723 + 431.654211 + 451.814466 + 471.974721 142 - 423.338165 - 443.498420 - 463.658675 + 423.338164 + 443.498419 + 463.658674 143 - 353.928112 - 374.088367 - 394.248622 + 353.928110 + 374.088365 + 394.248620 @@ -1335,8 +1335,8 @@

References - lo_80% lo_90% + lo_80% mean hi_80% hi_90% @@ -1355,7 +1355,7 @@

References 1 74.383399 63.524432 - 112.688512 + 112.688513 150.993626 161.852593 @@ -1393,11 +1393,11 @@

References 139 - 592.070953 - 581.211985 - 630.376066 - 668.681180 - 679.540147 + 592.070954 + 581.211987 + 630.376068 + 668.681181 + 679.540149 140 @@ -1405,31 +1405,31 @@

References 518.791984 567.956065 606.261178 - 617.120145 + 617.120146 141 - 413.509354 - 402.650387 - 451.814468 - 490.119581 - 500.978549 + 413.509353 + 402.650385 + 451.814466 + 490.119580 + 500.978547 142 - 405.193307 - 394.334339 - 443.498420 - 481.803534 - 492.662501 + 405.193306 + 394.334338 + 443.498419 + 481.803533 + 492.662500 143 - 335.783253 - 324.924286 - 374.088367 - 412.393480 - 423.252448 + 335.783252 + 324.924284 + 374.088365 + 412.393479 + 423.252446 @@ -1606,83 +1606,83 @@

References 0 - 444.847964 - 434.808170 - 480.263439 - 515.678913 - 525.718708 + 444.847963 + 434.808168 + 480.263437 + 515.678911 + 525.718706 1 - 414.132044 - 398.250567 - 470.154109 - 526.176174 - 542.057651 + 414.132100 + 398.250623 + 470.154163 + 526.176226 + 542.057702 2 - 422.259259 - 403.968470 - 486.780194 - 551.301128 - 569.591917 + 422.259329 + 403.968541 + 486.780261 + 551.301193 + 569.591981 3 - 398.925598 - 379.813444 - 466.343905 - 533.762212 - 552.874366 + 398.925698 + 379.813546 + 466.344002 + 533.762305 + 552.874457 4 - 400.961668 - 381.849515 - 468.379976 - 535.798283 - 554.910436 + 400.961769 + 381.849617 + 468.380072 + 535.798375 + 554.910527 5 - 402.991947 - 383.879794 - 470.410254 - 537.828561 - 556.940715 + 402.992047 + 383.879895 + 470.410351 + 537.828654 + 556.940806 6 - 405.016485 - 385.904331 - 472.434792 - 539.853099 - 558.965253 + 405.016585 + 385.904433 + 472.434888 + 539.853191 + 558.965344 7 - 407.035332 - 387.923179 - 474.453639 - 541.871947 - 560.984100 + 407.035432 + 387.923280 + 474.453735 + 541.872038 + 560.984191 8 - 409.048538 - 389.936385 - 476.466845 - 543.885153 - 562.997306 + 409.048638 + 389.936486 + 476.466941 + 543.885244 + 562.997397 9 - 411.056152 - 391.943999 - 478.474459 - 545.892767 - 565.004920 + 411.056252 + 391.944099 + 478.474555 + 545.892858 + 565.005010 @@ -1740,23 +1740,23 @@

References 0 - 73.205195 + 73.205186 1 - 116.319121 + 116.319149 2 - 100.318846 + 100.318853 3 - 107.862718 + 107.862723 4 - 108.927678 + 108.927698 ... @@ -1764,23 +1764,23 @@

References 139 - 608.317486 + 608.317523 140 - 564.682612 + 564.682620 141 - 429.362212 + 429.362250 142 - 442.344672 + 442.344697 143 - 391.283965 + 391.284005 @@ -1833,8 +1833,8 @@

References - lo_80% lo_90% + lo_80% mean hi_80% hi_90% @@ -1843,43 +1843,43 @@

References 0 - 37.789721 - 27.749926 - 73.205195 - 108.620669 - 118.660464 + 37.789712 + 27.749917 + 73.205186 + 108.620660 + 118.660455 1 - 80.903646 - 70.863851 - 116.319121 - 151.734595 - 161.774390 + 80.903675 + 70.863880 + 116.319149 + 151.734624 + 161.774418 2 - 64.903372 - 54.863577 - 100.318846 - 135.734320 - 145.774115 + 64.903379 + 54.863584 + 100.318853 + 135.734328 + 145.774123 3 - 72.447244 - 62.407449 - 107.862718 - 143.278193 - 153.317988 + 72.447249 + 62.407454 + 107.862723 + 143.278198 + 153.317993 4 - 73.512204 - 63.472409 - 108.927678 - 144.343152 - 154.382947 + 73.512224 + 63.472429 + 108.927698 + 144.343172 + 154.382967 ... @@ -1891,43 +1891,43 @@

References 139 - 572.902012 - 562.862217 - 608.317486 - 643.732961 - 653.772756 + 572.902048 + 562.862253 + 608.317523 + 643.732997 + 653.772792 140 - 529.267138 - 519.227343 - 564.682612 - 600.098087 - 610.137882 + 529.267145 + 519.227350 + 564.682620 + 600.098094 + 610.137889 141 - 393.946737 - 383.906942 - 429.362212 - 464.777686 - 474.817481 + 393.946776 + 383.906981 + 429.362250 + 464.777724 + 474.817519 142 - 406.929198 - 396.889403 - 442.344672 - 477.760146 - 487.799941 + 406.929222 + 396.889427 + 442.344697 + 477.760171 + 487.799966 143 - 355.868490 - 345.828696 - 391.283965 - 426.699439 - 436.739234 + 355.868531 + 345.828736 + 391.284005 + 426.699480 + 436.739275 @@ -1965,9 +1965,9 @@

References Regression with ARIMA(0,0,3) errors Coefficients: - ma1 ma2 ma3 ex_1 ex_2 -coefficient 1.226 0.904 0.552 57.136 -45.774 -s.e. 1.025 2.163 1.025 877.522 1783.342 + ma1 ma2 ma3 ex_1 ex_2 +coefficient 1.226 0.904 0.552 57.136 -45.774 +s.e. 0.052 0.123 0.084 15.718 44.469 sigma^2 = 763.684: log likelihood = -679.81 diff --git a/docs/models.html b/docs/models.html index 4a4fb8aba..451310c69 100644 --- a/docs/models.html +++ b/docs/models.html @@ -441,24 +441,6 @@

auto_arima -
- -
- - - -
-
array([444.30005077, 418.2100203 , 446.23703401, 488.22892853,
-       499.23136059, 562.23063085, 649.23084981, 633.23078411,
-       535.23080382, 488.23079791, 417.23079968, 459.23079915])
-
- -
- -
- - {% endraw %} @@ -519,23 +501,6 @@

auto_arima -
- -
- - - -
-
array([444.37987806, 418.34259254, 446.43040677, 488.47970809,
-       499.53987871, 562.59603023, 649.65266734])
-
- -
- -
- - {% endraw %} @@ -560,143 +525,6 @@

auto_arima -
- -
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
meanlo-95lo-80hi-80hi-95
0444.300051421.179472429.182317459.417784467.420629
1418.210020389.988431399.756915436.663126446.431610
2446.237034412.620660424.256469468.217599479.853408
3488.228929450.265291463.405840513.052017526.192566
4499.231361457.290190471.807503526.655218541.172531
5562.230631516.679736532.446502592.014760607.781525
6649.230850600.329866617.256215681.205484698.131833
7633.230784581.196677599.207510667.254058685.264891
8535.230804480.241310499.275106571.186501590.220298
9488.230798430.436989450.441457526.020138546.024607
10417.230800356.762551377.692737456.768863477.699049
11459.230799396.201501418.018156500.443442522.260098
-
- -
- -
- - {% endraw %} diff --git a/nbs/arima.ipynb b/nbs/arima.ipynb index ef8f650a8..28be9573f 100644 --- a/nbs/arima.ipynb +++ b/nbs/arima.ipynb @@ -3,6 +3,7 @@ { "cell_type": "code", "execution_count": null, + "id": "75751cce", "metadata": {}, "outputs": [], "source": [ @@ -12,6 +13,7 @@ { "cell_type": "code", "execution_count": null, + "id": "16d8c18e", "metadata": {}, "outputs": [], "source": [ @@ -22,6 +24,7 @@ }, { "cell_type": "markdown", + "id": "bb0efd1a", "metadata": {}, "source": [ "# ARIMA" @@ -30,6 +33,7 @@ { "cell_type": "code", "execution_count": null, + "id": "aac2a54f", "metadata": {}, "outputs": [], "source": [ @@ -54,6 +58,7 @@ { "cell_type": "code", "execution_count": null, + "id": "f6aa9517", "metadata": {}, "outputs": [], "source": [ @@ -64,6 +69,7 @@ { "cell_type": "code", "execution_count": null, + "id": "376c09fe", "metadata": {}, "outputs": [], "source": [ @@ -86,6 +92,7 @@ { "cell_type": "code", "execution_count": null, + "id": "1ea975b7", "metadata": {}, "outputs": [], "source": [ @@ -125,6 +132,7 @@ { "cell_type": "code", "execution_count": null, + "id": "8c4d8301", "metadata": {}, "outputs": [], "source": [ @@ -138,6 +146,7 @@ { "cell_type": "code", "execution_count": null, + "id": "cc5f2433", "metadata": {}, "outputs": [], "source": [ @@ -159,6 +168,7 @@ { "cell_type": "code", "execution_count": null, + "id": "71d72a8b", "metadata": {}, "outputs": [], "source": [ @@ -170,6 +180,7 @@ { "cell_type": "code", "execution_count": null, + "id": "8ca693ea", "metadata": {}, "outputs": [], "source": [ @@ -192,6 +203,7 @@ { "cell_type": "code", "execution_count": null, + "id": "a94fe482", "metadata": {}, "outputs": [], "source": [ @@ -208,6 +220,7 @@ { "cell_type": "code", "execution_count": null, + "id": "0f18a037", "metadata": {}, "outputs": [], "source": [ @@ -244,6 +257,7 @@ { "cell_type": "code", "execution_count": null, + "id": "0db3588b", "metadata": {}, "outputs": [], "source": [ @@ -269,6 +283,7 @@ { "cell_type": "code", "execution_count": null, + "id": "7098ce54", "metadata": {}, "outputs": [], "source": [ @@ -290,6 +305,7 @@ { "cell_type": "code", "execution_count": null, + "id": "f9e27a5b", "metadata": {}, "outputs": [], "source": [ @@ -311,6 +327,7 @@ { "cell_type": "code", "execution_count": null, + "id": "ed047f9d", "metadata": {}, "outputs": [], "source": [ @@ -323,6 +340,7 @@ { "cell_type": "code", "execution_count": null, + "id": "77952067", "metadata": {}, "outputs": [], "source": [ @@ -460,6 +478,7 @@ { "cell_type": "code", "execution_count": null, + "id": "990cf2ce", "metadata": {}, "outputs": [], "source": [ @@ -506,6 +525,7 @@ { "cell_type": "code", "execution_count": null, + "id": "b26f389d", "metadata": {}, "outputs": [], "source": [ @@ -552,6 +572,7 @@ { "cell_type": "code", "execution_count": null, + "id": "de9fc815", "metadata": {}, "outputs": [], "source": [ @@ -567,6 +588,7 @@ { "cell_type": "code", "execution_count": null, + "id": "d8c647ce", "metadata": {}, "outputs": [], "source": [ @@ -585,6 +607,7 @@ { "cell_type": "code", "execution_count": null, + "id": "08d2362a", "metadata": {}, "outputs": [], "source": [ @@ -636,6 +659,7 @@ { "cell_type": "code", "execution_count": null, + "id": "4978f300", "metadata": {}, "outputs": [], "source": [ @@ -650,6 +674,7 @@ { "cell_type": "code", "execution_count": null, + "id": "384bd712", "metadata": {}, "outputs": [], "source": [ @@ -709,6 +734,7 @@ { "cell_type": "code", "execution_count": null, + "id": "f2be7839", "metadata": {}, "outputs": [], "source": [ @@ -722,6 +748,7 @@ { "cell_type": "code", "execution_count": null, + "id": "82dd44b6", "metadata": {}, "outputs": [], "source": [ @@ -862,6 +889,7 @@ { "cell_type": "code", "execution_count": null, + "id": "e045b791", "metadata": {}, "outputs": [], "source": [ @@ -884,6 +912,7 @@ { "cell_type": "code", "execution_count": null, + "id": "36173064", "metadata": {}, "outputs": [], "source": [ @@ -922,6 +951,7 @@ { "cell_type": "code", "execution_count": null, + "id": "9d4f09f8", "metadata": {}, "outputs": [], "source": [ @@ -1318,6 +1348,7 @@ { "cell_type": "code", "execution_count": null, + "id": "67aac1bd", "metadata": {}, "outputs": [], "source": [ @@ -1328,6 +1359,7 @@ { "cell_type": "code", "execution_count": null, + "id": "50ec5a92", "metadata": {}, "outputs": [], "source": [ @@ -1340,6 +1372,7 @@ { "cell_type": "code", "execution_count": null, + "id": "b673533a", "metadata": {}, "outputs": [], "source": [ @@ -1355,6 +1388,7 @@ { "cell_type": "code", "execution_count": null, + "id": "ee1b480c", "metadata": {}, "outputs": [], "source": [ @@ -1367,6 +1401,7 @@ { "cell_type": "code", "execution_count": null, + "id": "b18047ec", "metadata": {}, "outputs": [], "source": [ @@ -1381,6 +1416,7 @@ { "cell_type": "code", "execution_count": null, + "id": "b4d2c960", "metadata": {}, "outputs": [], "source": [ @@ -1431,6 +1467,7 @@ { "cell_type": "code", "execution_count": null, + "id": "67b31584", "metadata": {}, "outputs": [], "source": [ @@ -1441,6 +1478,7 @@ { "cell_type": "code", "execution_count": null, + "id": "56649503", "metadata": {}, "outputs": [], "source": [ @@ -1451,6 +1489,7 @@ { "cell_type": "code", "execution_count": null, + "id": "c66e3708", "metadata": {}, "outputs": [], "source": [ @@ -1463,6 +1502,7 @@ { "cell_type": "code", "execution_count": null, + "id": "a1b4602e", "metadata": {}, "outputs": [], "source": [ @@ -1527,6 +1567,7 @@ { "cell_type": "code", "execution_count": null, + "id": "d2edb920", "metadata": {}, "outputs": [], "source": [ @@ -1536,6 +1577,7 @@ { "cell_type": "code", "execution_count": null, + "id": "92eef1e1", "metadata": {}, "outputs": [], "source": [ @@ -1545,6 +1587,7 @@ { "cell_type": "code", "execution_count": null, + "id": "392e0c60", "metadata": {}, "outputs": [], "source": [ @@ -1556,6 +1599,7 @@ { "cell_type": "code", "execution_count": null, + "id": "3202440f", "metadata": {}, "outputs": [], "source": [ @@ -1585,6 +1629,7 @@ { "cell_type": "code", "execution_count": null, + "id": "edc82531", "metadata": {}, "outputs": [], "source": [ @@ -1596,6 +1641,7 @@ { "cell_type": "code", "execution_count": null, + "id": "a3b4409d", "metadata": {}, "outputs": [], "source": [ @@ -1699,6 +1745,7 @@ { "cell_type": "code", "execution_count": null, + "id": "945ae139", "metadata": {}, "outputs": [], "source": [ @@ -1709,6 +1756,7 @@ { "cell_type": "code", "execution_count": null, + "id": "801fdafe", "metadata": {}, "outputs": [], "source": [ @@ -1720,6 +1768,7 @@ { "cell_type": "code", "execution_count": null, + "id": "cc0e3178", "metadata": {}, "outputs": [], "source": [ @@ -1775,6 +1824,7 @@ { "cell_type": "code", "execution_count": null, + "id": "a5ab7655", "metadata": {}, "outputs": [], "source": [ @@ -1786,6 +1836,7 @@ { "cell_type": "code", "execution_count": null, + "id": "79f6202b", "metadata": {}, "outputs": [], "source": [ @@ -1863,6 +1914,7 @@ { "cell_type": "code", "execution_count": null, + "id": "8f4b931c", "metadata": {}, "outputs": [], "source": [ @@ -1875,6 +1927,7 @@ { "cell_type": "code", "execution_count": null, + "id": "17832964", "metadata": {}, "outputs": [], "source": [ @@ -1887,6 +1940,7 @@ { "cell_type": "code", "execution_count": null, + "id": "b8907ad6", "metadata": {}, "outputs": [], "source": [ @@ -1899,6 +1953,7 @@ { "cell_type": "code", "execution_count": null, + "id": "9e8956f7", "metadata": {}, "outputs": [], "source": [ @@ -1934,6 +1989,7 @@ { "cell_type": "code", "execution_count": null, + "id": "88d5f2db", "metadata": {}, "outputs": [], "source": [ @@ -1943,6 +1999,7 @@ { "cell_type": "code", "execution_count": null, + "id": "66281320", "metadata": {}, "outputs": [], "source": [ @@ -1952,6 +2009,7 @@ { "cell_type": "code", "execution_count": null, + "id": "c4e1747d", "metadata": {}, "outputs": [], "source": [ @@ -1963,6 +2021,7 @@ { "cell_type": "code", "execution_count": null, + "id": "7ae9eb8b", "metadata": {}, "outputs": [], "source": [ @@ -2057,6 +2116,7 @@ { "cell_type": "code", "execution_count": null, + "id": "f36741e6", "metadata": {}, "outputs": [], "source": [ @@ -2069,6 +2129,7 @@ { "cell_type": "code", "execution_count": null, + "id": "e5701398", "metadata": {}, "outputs": [], "source": [ @@ -2081,6 +2142,7 @@ { "cell_type": "code", "execution_count": null, + "id": "74813e44", "metadata": {}, "outputs": [], "source": [ @@ -2093,6 +2155,7 @@ { "cell_type": "code", "execution_count": null, + "id": "9af83af8", "metadata": {}, "outputs": [], "source": [ @@ -2103,6 +2166,7 @@ { "cell_type": "code", "execution_count": null, + "id": "b58f5d51", "metadata": {}, "outputs": [], "source": [ @@ -2113,6 +2177,7 @@ { "cell_type": "code", "execution_count": null, + "id": "28778abf", "metadata": {}, "outputs": [], "source": [ @@ -2136,6 +2201,7 @@ { "cell_type": "code", "execution_count": null, + "id": "b24dc914", "metadata": {}, "outputs": [], "source": [ @@ -2147,6 +2213,7 @@ { "cell_type": "code", "execution_count": null, + "id": "c962408c", "metadata": {}, "outputs": [], "source": [ @@ -2158,6 +2225,7 @@ { "cell_type": "code", "execution_count": null, + "id": "c26e951f", "metadata": {}, "outputs": [], "source": [ @@ -2169,6 +2237,7 @@ { "cell_type": "code", "execution_count": null, + "id": "7b28ad3b", "metadata": {}, "outputs": [], "source": [ @@ -2212,6 +2281,7 @@ { "cell_type": "code", "execution_count": null, + "id": "70618c6f", "metadata": {}, "outputs": [], "source": [ @@ -2222,6 +2292,7 @@ { "cell_type": "code", "execution_count": null, + "id": "4703b3b0", "metadata": {}, "outputs": [], "source": [ @@ -2241,6 +2312,7 @@ { "cell_type": "code", "execution_count": null, + "id": "d805e6f4", "metadata": {}, "outputs": [], "source": [ @@ -2251,6 +2323,7 @@ { "cell_type": "code", "execution_count": null, + "id": "8b04bb30", "metadata": {}, "outputs": [], "source": [ @@ -2321,6 +2394,7 @@ { "cell_type": "code", "execution_count": null, + "id": "fa7f9fbc", "metadata": {}, "outputs": [], "source": [ @@ -2331,6 +2405,7 @@ { "cell_type": "code", "execution_count": null, + "id": "df5bc634", "metadata": {}, "outputs": [], "source": [ @@ -2383,6 +2458,7 @@ { "cell_type": "code", "execution_count": null, + "id": "2dff3d76", "metadata": {}, "outputs": [], "source": [ @@ -2393,6 +2469,7 @@ { "cell_type": "code", "execution_count": null, + "id": "34239e23", "metadata": {}, "outputs": [], "source": [ @@ -2406,6 +2483,7 @@ { "cell_type": "code", "execution_count": null, + "id": "0d5c60e7", "metadata": {}, "outputs": [], "source": [ @@ -2418,6 +2496,7 @@ { "cell_type": "code", "execution_count": null, + "id": "0342fc34", "metadata": {}, "outputs": [], "source": [ @@ -2896,6 +2975,7 @@ { "cell_type": "code", "execution_count": null, + "id": "813a5e2b", "metadata": {}, "outputs": [], "source": [ @@ -2907,6 +2987,7 @@ { "cell_type": "code", "execution_count": null, + "id": "1cbaa49a", "metadata": {}, "outputs": [], "source": [ @@ -2918,6 +2999,7 @@ { "cell_type": "code", "execution_count": null, + "id": "187c493d", "metadata": {}, "outputs": [], "source": [ @@ -2929,6 +3011,7 @@ { "cell_type": "code", "execution_count": null, + "id": "a8e51995", "metadata": {}, "outputs": [], "source": [ @@ -2938,6 +3021,7 @@ { "cell_type": "code", "execution_count": null, + "id": "b8c8e2c0", "metadata": {}, "outputs": [], "source": [ @@ -2971,6 +3055,7 @@ { "cell_type": "code", "execution_count": null, + "id": "1d97ff0e", "metadata": {}, "outputs": [], "source": [ @@ -2980,6 +3065,7 @@ { "cell_type": "code", "execution_count": null, + "id": "d6a45000", "metadata": {}, "outputs": [], "source": [ @@ -3000,6 +3086,7 @@ { "cell_type": "code", "execution_count": null, + "id": "3a438ab9", "metadata": {}, "outputs": [], "source": [ @@ -3309,7 +3396,7 @@ " \n", " lo = pd.DataFrame(\n", " fitted_values.values.reshape(-1, 1) - quantiles * se.reshape(-1, 1),\n", - " columns=[f'lo_{l}%' for l in _level],\n", + " columns=[f'lo_{l}%' for l in reversed(_level)],\n", " )\n", " hi = pd.DataFrame(\n", " fitted_values.values.reshape(-1, 1) + quantiles * se.reshape(-1, 1),\n", @@ -3327,6 +3414,7 @@ { "cell_type": "code", "execution_count": null, + "id": "347d0d46", "metadata": {}, "outputs": [], "source": [ @@ -3336,6 +3424,7 @@ { "cell_type": "code", "execution_count": null, + "id": "429d35f6", "metadata": {}, "outputs": [], "source": [ @@ -3345,6 +3434,7 @@ { "cell_type": "code", "execution_count": null, + "id": "c79bb3d3", "metadata": {}, "outputs": [], "source": [ @@ -3354,6 +3444,7 @@ { "cell_type": "code", "execution_count": null, + "id": "30888144", "metadata": {}, "outputs": [], "source": [ @@ -3363,6 +3454,7 @@ { "cell_type": "code", "execution_count": null, + "id": "3d84d894", "metadata": {}, "outputs": [], "source": [ @@ -3372,6 +3464,7 @@ { "cell_type": "code", "execution_count": null, + "id": "cea1b29a", "metadata": {}, "outputs": [], "source": [ @@ -3381,6 +3474,7 @@ { "cell_type": "code", "execution_count": null, + "id": "f8292ed7", "metadata": {}, "outputs": [], "source": [ @@ -3390,6 +3484,7 @@ { "cell_type": "code", "execution_count": null, + "id": "40d649c6", "metadata": {}, "outputs": [], "source": [ @@ -3399,6 +3494,7 @@ { "cell_type": "code", "execution_count": null, + "id": "d609ad93", "metadata": {}, "outputs": [], "source": [ @@ -3408,6 +3504,7 @@ { "cell_type": "code", "execution_count": null, + "id": "b7214a0f", "metadata": {}, "outputs": [], "source": [ @@ -3417,6 +3514,7 @@ { "cell_type": "code", "execution_count": null, + "id": "5f66f1c8", "metadata": {}, "outputs": [], "source": [ @@ -3426,6 +3524,7 @@ { "cell_type": "code", "execution_count": null, + "id": "b00c88ac", "metadata": {}, "outputs": [], "source": [ @@ -3435,6 +3534,7 @@ { "cell_type": "code", "execution_count": null, + "id": "461f0c94", "metadata": {}, "outputs": [], "source": [ @@ -3444,6 +3544,7 @@ { "cell_type": "code", "execution_count": null, + "id": "463a009e", "metadata": {}, "outputs": [], "source": [ @@ -3453,6 +3554,7 @@ { "cell_type": "code", "execution_count": null, + "id": "a4f03969", "metadata": {}, "outputs": [], "source": [ @@ -3462,6 +3564,7 @@ { "cell_type": "code", "execution_count": null, + "id": "951e0c1b", "metadata": {}, "outputs": [], "source": [ @@ -3471,7 +3574,7 @@ ], "metadata": { "kernelspec": { - "display_name": "Python 3", + "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" } diff --git a/statsforecast/arima.py b/statsforecast/arima.py index 35f7a208d..1d40749d1 100644 --- a/statsforecast/arima.py +++ b/statsforecast/arima.py @@ -2450,7 +2450,7 @@ def predict_in_sample(self, level: Optional[Union[int, Tuple[int]]] = None): lo = pd.DataFrame( fitted_values.values.reshape(-1, 1) - quantiles * se.reshape(-1, 1), - columns=[f'lo_{l}%' for l in _level], + columns=[f'lo_{l}%' for l in reversed(_level)], ) hi = pd.DataFrame( fitted_values.values.reshape(-1, 1) + quantiles * se.reshape(-1, 1),