diff --git a/alignment_guide.md b/alignment_guide.md new file mode 100644 index 0000000..183848b --- /dev/null +++ b/alignment_guide.md @@ -0,0 +1,107 @@ +# 🛠️ FastUMI 数据采集:T265 坐标系对齐与复位指南 + +在使用基于 Intel RealSense T265 的手持设备(如 FastUMI)进行机器人操作数据采集时,**“对齐”(Alignment)或“复位”(Reset)是最关键的一步**。 + +本指南将通过图文为您详细说明为什么需要对齐,以及如何正确地进行物理操作。 + +--- + +## 1. 为什么要进行“对齐”? + +T265 追踪相机(视觉里程计)没有内建的绝对坐标感。当你启动录制程序的瞬间,T265 会武断地宣布: +**“我现在所在的这个点就是宇宙的中心 (0,0,0),我现在的朝向就是正前方!”** + +### ❌ 如果不对齐(错误示范) + +如果你随便找个地方按下了“开始录制”,那么每次生成的轨迹数据都会落在不同的坐标系中。机器人学习算法看到的数据就像下面这样混乱: + +```mermaid +graph TD + subgraph "现实物理空间 (目标杯子位置固定)" + Cup((杯子)) + end + + subgraph "T265 记录的数据 (因启动点不同而错乱)" + A["演示 1: 在远点按下启动"] -->|导致| X1(("数据记录: 杯子在 10m 处")) + B["演示 2: 在近点按下启动"] -->|导致| X2(("数据记录: 杯子在 2m 处")) + end + + style Cup fill:#f9f,stroke:#333,stroke-width:2px + style X1 fill:#ff9,stroke:#333,stroke-width:2px + style X2 fill:#ff9,stroke:#333,stroke-width:2px +``` + +### ✅ 正确的对齐(锚点效应) + +通过在每次点击“开始录制”之前,将手持设备放置在**同一个物理锚点**,我们就强行把 T265 的“随机坐标系”和“机器人的绝对坐标系”绑定在了一起。 + +```mermaid +graph TD + A["物理锚点\n(如:桌角)"] -->|固定位置启动| B("T265: 这里是 0,0,0") + B -->|config.json 转换| C{"机器人基座:\n 锚点固定位位姿"} + C -->|输出数据| D["所有动作轨迹对齐"] + + style A fill:#bbf,stroke:#333,stroke-width:2px + style D fill:#bfb,stroke:#333,stroke-width:2px +``` + +--- + +## 2. 三种实用的物理对齐方案 + +为了确保每次启动时的位置和角度完全一致,以下是实验室中最常用的三种方案(按精度从低到高排列): + +### 方案一:桌面标记法(十字胶带) +**精度:⭐ | 成本:极低** + +这是最简单的方案,适用于对绝对精度要求不极端的任务。 + +1. **准备**:在操作台面上,用有色胶带贴一个明显的“十”字作为对齐点。 +2. **标定**:测量这个“十”字中心到机器人真实底座的物理距离(X, Y, Z),将数值填入 `config.json` 的 `base_position`。 +3. **操作**: + - 每次录制前,将手持夹爪的尖端(TCP)或者设备底部的固定点**垂直对准**十字中心。 + - 保持设备的朝向(例如:始终垂直于桌子边缘)。 + - 点击“开始录制”。 + +--- + +### 方案二:物理挡块法(推荐,最常用) +**精度:⭐⭐⭐⭐ | 成本:低** + +这是性价比最高的方法,能有效限制位置和角度误差。 + +1. **准备**:在操作台边缘,使用重物(如两块方正的铅块)或 3D 打印一个直角底座(Dock),用强力双面胶固定在桌面上。 +2. **标定**:测量挡块的内角顶点到机器人基座的距离,填入 `base_position`。 +3. **操作**: + - 每次录制前,将手持设备的手柄底部**紧紧靠住**挡块的直角内部。 + - 确保设备的背面贴紧挡块的一侧(保证朝向一致)。 + - 确认设备稳定后,点击“开始录制”。 + - 录制开始后,再把设备拿起来去执行操作。 + +--- + +### 方案三:机器人夹持法(最高精度) +**精度:⭐⭐⭐⭐⭐ | 成本:高(需要操作机械臂)** + +如果你的终极目标是在真实机器人上进行毫米级的抓取,这是最严谨的方法。 + +1. **准备**:编写一个简单的脚本,让真实机械臂移动到一个固定的“Home”位置(例如正前方,姿态垂直向下)。 +2. **操作**: + - 在录制开始前,操作者拿着 FastUMI 采集器,将采集器的夹爪与真实机器人的夹爪(或法兰盘特定位置)**物理对接**(例如:互相咬合,或者靠死)。 + - 此时,采集器的位姿被机械臂死死限制住了。 + - 第二个人在电脑上点击“开始录制”。 + - 录制开始后,操作者移开采集器,去执行演示动作。 +3. **配置**:此时 `config.json` 中的 `base_position` 就是机器人这个“Home”位置的精确坐标。 + +--- + +## 3. 常见问题排查 (Troubleshooting) + +| 现象 | 可能原因 | 解决办法 | +| :--- | :--- | :--- | +| **机器人回放时,动作总是偏向一侧几厘米** | `base_position` 测量不准,或者物理锚点移动了。 | 重新拿卷尺精确测量锚点到机器人底座的距离并更新 config。 | +| **机器人回放时,高度(Z轴)越来越低,最后砸桌子** | T265 启动时的俯仰角(Pitch)没对准。启动时可能手抖让设备往下倾斜了。 | 使用**物理挡块法**,确保启动时设备是绝对垂直/水平的。 | +| **轨迹偶尔会“瞬移”或大范围漂移** | T265 在采集过程中镜头被遮挡,或者周围环境特征太少(如大面积白墙)。 | 保证相机视野清晰;在桌面上放一些有纹理的物体帮助 T265 定位。 | + +--- +**总结**:数据采集的真理是——**垃圾进,垃圾出 (Garbage In, Garbage Out)**。花 10 分钟搭建一个稳固的对齐挡块,能为你省去后期数天的除错时间。 diff --git a/data/AirPassengers.csv b/data/AirPassengers.csv new file mode 100644 index 0000000..7014d86 --- /dev/null +++ b/data/AirPassengers.csv @@ -0,0 +1,145 @@ +Month,#Passengers +1949-01,112 +1949-02,118 +1949-03,132 +1949-04,129 +1949-05,121 +1949-06,135 +1949-07,148 +1949-08,148 +1949-09,136 +1949-10,119 +1949-11,104 +1949-12,118 +1950-01,115 +1950-02,126 +1950-03,141 +1950-04,135 +1950-05,125 +1950-06,149 +1950-07,170 +1950-08,170 +1950-09,158 +1950-10,133 +1950-11,114 +1950-12,140 +1951-01,145 +1951-02,150 +1951-03,178 +1951-04,163 +1951-05,172 +1951-06,178 +1951-07,199 +1951-08,199 +1951-09,184 +1951-10,162 +1951-11,146 +1951-12,166 +1952-01,171 +1952-02,180 +1952-03,193 +1952-04,181 +1952-05,183 +1952-06,218 +1952-07,230 +1952-08,242 +1952-09,209 +1952-10,191 +1952-11,172 +1952-12,194 +1953-01,196 +1953-02,196 +1953-03,236 +1953-04,235 +1953-05,229 +1953-06,243 +1953-07,264 +1953-08,272 +1953-09,237 +1953-10,211 +1953-11,180 +1953-12,201 +1954-01,204 +1954-02,188 +1954-03,235 +1954-04,227 +1954-05,234 +1954-06,264 +1954-07,302 +1954-08,293 +1954-09,259 +1954-10,229 +1954-11,203 +1954-12,229 +1955-01,242 +1955-02,233 +1955-03,267 +1955-04,269 +1955-05,270 +1955-06,315 +1955-07,364 +1955-08,347 +1955-09,312 +1955-10,274 +1955-11,237 +1955-12,278 +1956-01,284 +1956-02,277 +1956-03,317 +1956-04,313 +1956-05,318 +1956-06,374 +1956-07,413 +1956-08,405 +1956-09,355 +1956-10,306 +1956-11,271 +1956-12,306 +1957-01,315 +1957-02,301 +1957-03,356 +1957-04,348 +1957-05,355 +1957-06,422 +1957-07,465 +1957-08,467 +1957-09,404 +1957-10,347 +1957-11,305 +1957-12,336 +1958-01,340 +1958-02,318 +1958-03,362 +1958-04,348 +1958-05,363 +1958-06,435 +1958-07,491 +1958-08,505 +1958-09,404 +1958-10,359 +1958-11,310 +1958-12,337 +1959-01,360 +1959-02,342 +1959-03,406 +1959-04,396 +1959-05,420 +1959-06,472 +1959-07,548 +1959-08,559 +1959-09,463 +1959-10,407 +1959-11,362 +1959-12,405 +1960-01,417 +1960-02,391 +1960-03,419 +1960-04,461 +1960-05,472 +1960-06,535 +1960-07,622 +1960-08,606 +1960-09,508 +1960-10,461 +1960-11,390 +1960-12,432 diff --git a/data/airline_Passengers.csv b/data/airline_Passengers.csv new file mode 100644 index 0000000..1153271 --- /dev/null +++ b/data/airline_Passengers.csv @@ -0,0 +1,145 @@ +Period,Passengers +1949-01,112.0 +1949-02,118.0 +1949-03,132.0 +1949-04,129.0 +1949-05,121.0 +1949-06,135.0 +1949-07,148.0 +1949-08,148.0 +1949-09,136.0 +1949-10,119.0 +1949-11,104.0 +1949-12,118.0 +1950-01,115.0 +1950-02,126.0 +1950-03,141.0 +1950-04,135.0 +1950-05,125.0 +1950-06,149.0 +1950-07,170.0 +1950-08,170.0 +1950-09,158.0 +1950-10,133.0 +1950-11,114.0 +1950-12,140.0 +1951-01,145.0 +1951-02,150.0 +1951-03,178.0 +1951-04,163.0 +1951-05,172.0 +1951-06,178.0 +1951-07,199.0 +1951-08,199.0 +1951-09,184.0 +1951-10,162.0 +1951-11,146.0 +1951-12,166.0 +1952-01,171.0 +1952-02,180.0 +1952-03,193.0 +1952-04,181.0 +1952-05,183.0 +1952-06,218.0 +1952-07,230.0 +1952-08,242.0 +1952-09,209.0 +1952-10,191.0 +1952-11,172.0 +1952-12,194.0 +1953-01,196.0 +1953-02,196.0 +1953-03,236.0 +1953-04,235.0 +1953-05,229.0 +1953-06,243.0 +1953-07,264.0 +1953-08,272.0 +1953-09,237.0 +1953-10,211.0 +1953-11,180.0 +1953-12,201.0 +1954-01,204.0 +1954-02,188.0 +1954-03,235.0 +1954-04,227.0 +1954-05,234.0 +1954-06,264.0 +1954-07,302.0 +1954-08,293.0 +1954-09,259.0 +1954-10,229.0 +1954-11,203.0 +1954-12,229.0 +1955-01,242.0 +1955-02,233.0 +1955-03,267.0 +1955-04,269.0 +1955-05,270.0 +1955-06,315.0 +1955-07,364.0 +1955-08,347.0 +1955-09,312.0 +1955-10,274.0 +1955-11,237.0 +1955-12,278.0 +1956-01,284.0 +1956-02,277.0 +1956-03,317.0 +1956-04,313.0 +1956-05,318.0 +1956-06,374.0 +1956-07,413.0 +1956-08,405.0 +1956-09,355.0 +1956-10,306.0 +1956-11,271.0 +1956-12,306.0 +1957-01,315.0 +1957-02,301.0 +1957-03,356.0 +1957-04,348.0 +1957-05,355.0 +1957-06,422.0 +1957-07,465.0 +1957-08,467.0 +1957-09,404.0 +1957-10,347.0 +1957-11,305.0 +1957-12,336.0 +1958-01,340.0 +1958-02,318.0 +1958-03,362.0 +1958-04,348.0 +1958-05,363.0 +1958-06,435.0 +1958-07,491.0 +1958-08,505.0 +1958-09,404.0 +1958-10,359.0 +1958-11,310.0 +1958-12,337.0 +1959-01,360.0 +1959-02,342.0 +1959-03,406.0 +1959-04,396.0 +1959-05,420.0 +1959-06,472.0 +1959-07,548.0 +1959-08,559.0 +1959-09,463.0 +1959-10,407.0 +1959-11,362.0 +1959-12,405.0 +1960-01,417.0 +1960-02,391.0 +1960-03,419.0 +1960-04,461.0 +1960-05,472.0 +1960-06,535.0 +1960-07,622.0 +1960-08,606.0 +1960-09,508.0 +1960-10,461.0 +1960-11,390.0 +1960-12,432.0 diff --git a/data/aus_economy.csv b/data/aus_economy.csv new file mode 100644 index 0000000..4b1a4d5 --- /dev/null +++ b/data/aus_economy.csv @@ -0,0 +1,59 @@ +"","Country","Code","Year","GDP","Growth","CPI","Imports","Exports","Population","Pop" +"1","Australia","AUS",1960,18573188486.9526,NA,7.96045785639958,14.0617462614568,12.9944524843222,10276477,10.276477 +"2","Australia","AUS",1961,19648336879.8298,2.48560503731876,8.14255983350676,15.0250797993616,12.4031007751938,10483000,10.483 +"3","Australia","AUS",1962,19888005375.742,1.29647768991248,8.1165452653486,12.6309269061831,13.9430116004055,10742000,10.742 +"4","Australia","AUS",1963,21501847911.3003,6.21427841413849,8.16857440166493,13.8340538569717,13.0058857232148,10950000,10.95 +"5","Australia","AUS",1964,23758539590.0997,6.97872371922269,8.40270551508845,13.7644951447158,14.9382483265768,11167000,11.167 +"6","Australia","AUS",1965,25931235300.7056,5.98345003182685,8.68886576482831,15.2673404163427,13.220177939017,11388000,11.388 +"7","Australia","AUS",1966,27261731436.891,2.38249118683902,8.97502601456816,15.1302275901734,12.9323802481308,11651000,11.651 +"8","Australia","AUS",1967,30389741292.418,6.30238571187178,9.28720083246618,13.8934954855353,12.8837295006449,11799000,11.799 +"9","Australia","AUS",1968,32657632433.6432,5.09586806107485,9.5213319458897,14.4855967078189,12.2976680384088,12009000,12.009 +"10","Australia","AUS",1969,36620002239.8925,7.04415869047823,9.83350676378772,13.3341488776072,11.9548596244419,12263000,12.263 +"11","Australia","AUS",1970,41261059469.1455,7.17218249969342,10.1716961498439,13.2213234894957,12.9770370772488,12507000,12.507 +"12","Australia","AUS",1971,45138313360.9587,4.00393029937437,10.79604578564,12.9366812227074,12.6612743152044,12937000,12.937 +"13","Australia","AUS",1972,51954439252.3364,3.91269095266455,11.4464099895942,11.9735569896342,12.8257594495537,13177000,13.177 +"14","Australia","AUS",1973,63721973094.1704,2.61381945403487,12.4869927159209,11.0204081632653,14.1550216145572,13380000,13.38 +"15","Australia","AUS",1974,88809137803.9794,4.10258940908359,14.4120707596254,13.2167217086811,13.1519989378827,13723000,13.723 +"16","Australia","AUS",1975,97147343984.7057,1.35033806932037,16.5972944849116,14.7355252245541,14.2814973081627,13893000,13.893 +"17","Australia","AUS",1976,104894743476.617,2.58794616187579,18.8085327783559,13.3837261004891,13.5231273959598,14033000,14.033 +"18","Australia","AUS",1977,110174351915.577,3.59737724486371,21.1238293444329,14.6538261322228,14.0229047371161,14192000,14.192 +"19","Australia","AUS",1978,118309271373.787,0.896770386373419,22.8147762747138,14.593919517985,13.6281734720143,14358000,14.358 +"20","Australia","AUS",1979,134679086674.997,4.04351412008216,24.8959417273673,15.3604143119823,14.3119823208894,14514000,14.514 +"21","Australia","AUS",1980,149738161559.889,3.03420651964717,27.4193548387097,15.9126423096957,16.4394672222636,14692000,14.692 +"22","Australia","AUS",1981,176599326599.327,3.33785828158,30.0208116545265,16.7443542289866,14.9120673219158,14927000,14.927 +"23","Australia","AUS",1982,193721725697.893,3.32811935127086,33.4287200832466,16.8337415275958,13.5410377627157,15178000,15.178 +"24","Australia","AUS",1983,176986429574.169,-2.22014376028406,36.7845993756504,15.6274126169954,13.5947332240495,15369000,15.369 +"25","Australia","AUS",1984,193194167723.239,4.58113977595602,38.2414151925078,15.0090237899918,13.5802179772647,15544000,15.544 +"26","Australia","AUS",1985,180190994860.781,5.2492064621253,40.8168574401665,17.3096651980504,15.2599876551093,15758000,15.758 +"27","Australia","AUS",1986,181977476217.124,4.05513490026313,44.5109261186264,18.086140954431,15.0137418077684,16018400,16.0184 +"28","Australia","AUS",1987,189041159343.568,2.50532414245347,48.309053069719,17.0940111103721,15.4943135477231,16263900,16.2639 +"29","Australia","AUS",1988,235699941792.782,5.68105349873713,51.7950052029136,16.6447494335476,15.9841455057324,16532200,16.5322 +"30","Australia","AUS",1989,299317645142.904,3.86759656499176,55.6971904266389,16.9791507976235,15.1458682452284,16814400,16.8144 +"31","Australia","AUS",1990,310838014621.008,3.5645510463558,59.7814776274714,17.0703629800908,15.1435630573312,17065100,17.0651 +"32","Australia","AUS",1991,325358292127.776,-0.387546485670072,61.6805411030177,16.1917214061886,16.05904390178,17284000,17.284 +"33","Australia","AUS",1992,324878105052.68,0.442615830244435,62.3048907388137,16.4189385923175,16.6914039660164,17495000,17.495 +"34","Australia","AUS",1993,311528948847.667,4.0390788740615,63.3975026014568,17.8946157593692,17.5736634127858,17667000,17.667 +"35","Australia","AUS",1994,322201314424.075,3.97853397066716,64.6462018730489,18.5214131428989,18.0058916739311,17855000,17.855 +"36","Australia","AUS",1995,367216364716.365,3.8293687531652,67.6378772112383,19.8846667893329,17.9168848710084,18072000,18.072 +"37","Australia","AUS",1996,400302731411.229,3.87863127139082,69.4068678459938,19.3931375912388,18.9391943502546,18311000,18.311 +"38","Australia","AUS",1997,434568007512.913,3.96642048968603,69.5629552549428,18.9000001800858,19.1748110450196,18517000,18.517 +"39","Australia","AUS",1998,398899138574.239,4.57673936435452,70.1612903225807,20.4748536380903,19.5955769201339,18711000,18.711 +"40","Australia","AUS",1999,388395162301.04,5.01806394269731,71.2018730489074,20.8021606935129,18.3539555437955,18926000,18.926 +"41","Australia","AUS",2000,415034227218.489,3.94318908229896,74.3756503642039,21.6041545927346,19.4434818925066,19153000,19.153 +"42","Australia","AUS",2001,378215090694.43,1.93310572881344,77.6534859521332,22.1489118374042,22.2351816063772,19413000,19.413 +"43","Australia","AUS",2002,394486709920.469,4.00302228370373,79.9687825182102,20.7912269229902,20.7831361256753,19651400,19.6514 +"44","Australia","AUS",2003,466294700058.241,2.98574490463473,82.1540062434963,21.20985026754,19.1030041417487,19895400,19.8954 +"45","Australia","AUS",2004,611904253805.662,4.00110552014283,84.0790842872008,19.936527496033,17.2197648262353,20127400,20.1274 +"46","Australia","AUS",2005,692641708013.833,3.19031634041626,86.3423517169615,21.0293134437218,18.2853024685462,20394800,20.3948 +"47","Australia","AUS",2006,745521862833.184,2.83423251220411,89.4120707596254,21.7258081848393,19.9081266903614,20697900,20.6979 +"48","Australia","AUS",2007,851962785585.303,3.77732902959087,91.4932362122789,21.8769841818375,20.2305682650706,20827600,20.8276 +"49","Australia","AUS",2008,1052584601611.46,3.65776675972091,95.4734651404787,22.7390989651597,20.1886986630513,21249200,21.2492 +"50","Australia","AUS",2009,926448240318.068,1.92272729288334,97.1644120707596,22.8264756791295,23.0385074489272,21691700,21.6917 +"51","Australia","AUS",2010,1144260547872.81,2.05294200395332,100,20.8738652537682,19.842519200141,22031750,22.03175 +"52","Australia","AUS",2011,1394280784777.68,2.45110508268402,103.303850156087,20.5050985738418,21.4728411936199,22340024,22.340024 +"53","Australia","AUS",2012,1543411012579.91,3.89194002647891,105.124869927159,21.7681052912881,21.5189738107964,22742475,22.742475 +"54","Australia","AUS",2013,1573696522006.77,2.63948235705639,107.700312174818,21.285861624297,19.9877174384992,23145901,23.145901 +"55","Australia","AUS",2014,1464955475993.76,2.55833752286902,110.379812695109,21.5040832798588,21.0757650196519,23504138,23.504138 +"56","Australia","AUS",2015,1349034029453.37,2.35113644074406,112.044745057232,21.5344232529339,20.0129640731119,23850784,23.850784 +"57","Australia","AUS",2016,1208039015868.39,2.82731051096303,113.475546305931,21.5184465691816,19.2530266256288,24210809,24.210809 +"58","Australia","AUS",2017,1323421072479.07,1.95757542160659,115.686784599376,20.6226164342654,21.2703536282629,24598933,24.598933 diff --git a/data/code2.txt b/data/code2.txt new file mode 100644 index 0000000..640da86 --- /dev/null +++ b/data/code2.txt @@ -0,0 +1,110 @@ +ȥ +df = df.drop_duplicates().reset_index(drop=True) +ɾijһ +df2=df2.drop(cols,axis=1) +ɾ +df.drop(index=[0, 1]) + +dateתַ + +from datetime import datetime, date, time +d = date.fromisoformat('2018-09-22') +t = time.fromisoformat('16:28:22') +dt = datetime.fromisoformat('2018-09-22') + +sdate = pd.to_datetime(ds).strftime('%Y-%m-%d') +st = "2019-01-20 00:00:00" +dt = datetime.datetime.strptime(st, '%Y-%m-%d %H:%M:%S') +st = "2019-01-20" +dt = datetime.datetime.strptime(st, '%Y-%m-%d') +start=pd.to_datetime('2017-01-01') + + + +޸ +train['tf_status'] = t1['tf_status'].astype(np.int64) + +޸ +df['ds'] = pd.to_datetime(df['ds']) + +޸ֶ +df.rename(columns={'#studentid':'studentid'}, inplace = True) + +# +df['year']=df.datetime.apply(lambda x: x.year) +df['month'] = df.datetime.apply(lambda x: x.month) +df['year'] = df['year'].astype(np.int64) +df['month'] = df['month'].astype(np.int64) + +ɾֶ +df.drop(['#id'], axis=1, inplace=True) + +鿴ж10% +print(df.weeks.quantile(np.arange(.9,1,.01))) + + +df = df.set_index(['hetongdetailid']) + +жϿֵ + +print(" cat ܹ %d ֵ." % df['cat'].isnull().sum()) + +print(" review ܹ %d ֵ." % df['review'].isnull().sum()) + +df[df.isnull().values==True] + +df = df[pd.notnull(df['review'])] + + +df.sort_values(by="x1",ascending= False) + +ģѯ +df_remark_tf[df_remark_tf["content_method"].str.contains(keystring)] + +޸ֶ +df_appraise['deptid'] = df_appraise['deptid'].astype(np.int64) + +޸(https://blog.csdn.net/zhangchuang601/article/details/79583551) +df.loc[1,['name','age']] = ['bb',11] +df.iloc[1,2] = 19#޸ijһ +df.loc[df[df.htid.isin(ids)].index,"y"]=1 + +ݿ +df.to_sql(name='predict',con=mysql_engine,if_exists = 'replace') + + +dt = datetime.datetime(year, month, 1) + +鿴10%ݷֲ +print(movie_rating_count['totalRatingCount'].quantile(np.arange(.9,1,.01))) + +#-------plotly.express------------------------- +#ͼ +fig = px.line(df, x='date', y='y_true', + labels={'date':'', 'y_true':''}, + markers=True) +fig.update_xaxes(tickformat = "%Y-%m-%d", hoverformat = "%Y-%m-%d") +fig.update_layout(title_text="߲ҵͼ", title_x=0.5) +fig.update_traces(marker=dict(size=3)) #ƵĴС +fig.show() + +#ɢͼ +fig = px.scatter(df, x="ʵ", y="ʵ",hover_data=['did','']) +fig.update_traces(marker=dict(size=4)) #ĴС +fig.show() + +---------------------------------- +1nohup command & + nohup jupyter notebook & + +2ҵPID(رǰִ̨еĽ̵IJ裬ҵPID) +ps -ef | grep xxxx +ps -ef 鿴еḶ̌grep xxxxҵxxxxĿ + +3kill +kill -9 PID + + + + + diff --git "a/data/pandas_cheat_sheet_\351\253\230\346\270\205.png" "b/data/pandas_cheat_sheet_\351\253\230\346\270\205.png" new file mode 100644 index 0000000..ead5444 Binary files /dev/null and "b/data/pandas_cheat_sheet_\351\253\230\346\270\205.png" differ diff --git "a/\345\270\270\347\224\250\344\273\243\347\240\201.txt" "b/\345\270\270\347\224\250\344\273\243\347\240\201.txt" new file mode 100644 index 0000000..4c692d2 --- /dev/null +++ "b/\345\270\270\347\224\250\344\273\243\347\240\201.txt" @@ -0,0 +1,244 @@ +去重 +df = df.drop_duplicates().reset_index(drop=True) +删除某一列 +df2=df2.drop(cols,axis=1) +删除两行 +df.drop(index=[0, 1]) + +date转字符串 + +from datetime import datetime, date, time +d = date.fromisoformat('2018-09-22') +t = time.fromisoformat('16:28:22') +dt = datetime.fromisoformat('2018-09-22') + +sdate = pd.to_datetime(ds).strftime('%Y-%m-%d') +st = "2019-01-20 00:00:00" +dt = datetime.datetime.strptime(st, '%Y-%m-%d %H:%M:%S') +st = "2019-01-20" +dt = datetime.datetime.strptime(st, '%Y-%m-%d') +start=pd.to_datetime('2017-01-01') + + + +修改类型 +train['tf_status'] = t1['tf_status'].astype(np.int64) + +修改日期类型 +df['ds'] = pd.to_datetime(df['ds']) + +修改字段名 +df.rename(columns={'#studentid':'studentid'}, inplace = True) + +#加年月 +df['year']=df.datetime.apply(lambda x: x.year) +df['month'] = df.datetime.apply(lambda x: x.month) +df['year'] = df['year'].astype(np.int64) +df['month'] = df['month'].astype(np.int64) + +删除字段 +df.drop(['#id'], axis=1, inplace=True) + +查看数据中顶部10%的数据 +print(df.weeks.quantile(np.arange(.9,1,.01))) + +设置索引 +df = df.set_index(['hetongdetailid']) + +判断空值 + +print("在 cat 列中总共有 %d 个空值." % df['cat'].isnull().sum()) + +print("在 review 列中总共有 %d 个空值." % df['review'].isnull().sum()) + +df[df.isnull().values==True] + +df = df[pd.notnull(df['review'])] + +排序 +df.sort_values(by="x1",ascending= False) + +模糊查询 +df_remark_tf[df_remark_tf["content_method"].str.contains(keystring)] + +修改字段类型 +df_appraise['deptid'] = df_appraise['deptid'].astype(np.int64) + +修改数据(https://blog.csdn.net/zhangchuang601/article/details/79583551) +df.loc[1,['name','age']] = ['bb',11] +df.iloc[1,2] = 19#修改某一无 +df.loc[df[df.htid.isin(ids)].index,"y"]=1 + +保存数据库 +df.to_sql(name='predict',con=mysql_engine,if_exists = 'replace') + +生成日期 +dt = datetime.datetime(year, month, 1) + +查看顶部10%数据分布 +print(movie_rating_count['totalRatingCount'].quantile(np.arange(.9,1,.01))) + +#-------plotly.express------------------------- +#折线图 +import plotly.express as px + +fig = px.line(df, x='date', y='y_true', + labels={'date':'日期', 'y_true':'话务量'}, + markers=True) +fig.update_xaxes(tickformat = "%Y-%m-%d", hoverformat = "%Y-%m-%d") +fig.update_layout(title_text="热线部门日业务量趋势图", title_x=0.5) +fig.update_traces(marker=dict(size=3)) #控制点的大小 +fig.show() + +#散点图 +fig = px.scatter(df, x="真实订单量", y="真实金额",hover_data=['did','日期']) +fig.update_traces(marker=dict(size=4)) #点的大小 +fig.show() + +---------------------------------- +1、nohup command & +例如 nohup jupyter notebook & + +2、找到进程PID(关闭在前面后台执行的进程的步骤,首先找到其进程PID) +ps -ef | grep xxxx +ps -ef 查看本机所有的进程;grep xxxx代表过滤找到条件xxxx的项目 + +3、kill掉进程 +kill -9 具体的PID + +-------------打开指定端口------------------------------------- +firewall-cmd --zone=public --add-port=8504/tcp --permanent +firewall-cmd --reload + +netstat -ntlp //查看当前所有tcp端口· +netstat -ntulp |grep 8888 //查看所有1935端口使用情况 + +------------------更新pip命令---------------------------------------- +python -m pip install --upgrade pip + +-------------搭建虚拟环境----------------------------- +# 创建虚拟环境 +conda create --name yourenvname python=3.8 + +# 进入虚拟环境 +conda activate yourenvname + +#退出虚拟环境 +conda deactivate + +#删除虚拟环境 +conda remove -n py39 --all + +# 在jupyter notebook中添加虚拟环境 +python -m ipykernel install --user --name yourenvname --display-name "display-name" + + +------------------在jupyter notebook里面添加虚拟环境---------------------------------------- +1.cmd进入虚拟环境(torch_env) +activate torch_env + +2.pip install ipykernel ipython +回车 + +3.ipython kernel install --user --name torch_env +回车 + +4.再次进入jupyter notebook +右上角,new,即可选择需要的虚拟环境。 + +5.另外,如果需要在指定文件夹中打开jupyter notebook,只需要打开文件夹所在位置,点击搜索框左边的位置框,输入cmd,再输入jupyter notebook,即可将路径设为自己需要的。 + +在jupyter 中删除虚拟环境 +6.jupyter kernelspec uninstall myenv + +---------pip install 镜像安装----------------------------------------- +pip install package_name -i https://pypi.tuna.tsinghua.edu.cn/simple + +--------------------图个格式转换--------------------------------------------------- +from PIL import Image + +#base64转PIL +def base64_to_pil(img_base64): + base64_decoded = base64.b64decode(img_base64) + byte_stream = io.BytesIO(base64_decoded) + pil_image = Image.open(byte_stream) + return pil_image + +#PIL转base64 +def image_to_base64_str(pil_image): + byte_arr = io.BytesIO() + pil_image.save(byte_arr, format='PNG') + byte_arr = byte_arr.getvalue() + return str(base64.b64encode(byte_arr).decode('utf-8')) + +#数组转base64(方法一) +pil_image = Image.fromarray(cv2.cvtColor(image_array, cv2.COLOR_BGR2RGB)) +image_base64 = image_to_base64_str(pil_image) + +#数组转base64(方法二) +retval, buffer = cv2.imencode('.png', img_mask_face_array) +image_mask_face_base64 = base64.b64encode(buffer).decode('utf-8') + +# 将PIL转换为NumPy数组 +array_image = np.array(pil_image) +array_image = np.asarray(pil_image) + +#array to pil +from PIL import Image +pil_image = Image.fromarray(image_array) + + +音量调节 +alsamixer + +常用开机自启管理命令总结 +拷贝.service文件: sudo cp mcp_pipe.service /etc/systemd/system/mcp_pipe.service +赋权限:sudo chmod 644 /etc/systemd/system/mcp_pipe.service +重新加载 systemd 配置:sudo systemctl daemon-reload + +启用开机自启: sudo systemctl enable mcp_pipe.service +禁止开机自启: sudo systemctl disable mcp_pipe.service +立即启动: sudo systemctl start mcp_pipe.service +立即停止: sudo systemctl stop mcp_pipe.service +重启服务: sudo systemctl restart mcp_pipe.service +查看状态: sudo systemctl status mcp_pipe.service +查看实时日志:journalctl -u mcp_pipe.service -f + +第一步:在 GitLab 上创建一个新的空项目 +在您的浏览器中打开 GitLab,并导航到 xiaozhi 组。 +点击页面右上角的蓝色按钮 "New project"。 +选择 "Create blank project"。 +在 "Project name" 字段中,为您的项目命名,例如 simple-py-xiaozhi。 +确保 "Project slug" 和 "Project URL" 是正确的。 +您可以选择将 "Visibility Level" 设置为 "Private" 或 "Internal"。 +不要 勾选 "Initialize repository with a README"。因为您本地已经有项目了,所以要创建一个空的项目。 +点击 "Create project"。 + +1. cd D:\work\py-xiaozhi\simple-py-xiaozhi +2. git init +3. git remote add origin [您在GitLab上创建的项目的URL] +4. git add . +5. git commit -m "Initial commit" +6. git push -u origin main + +---------esp32编译---------------------- +cd ~/work/esp-idf +source ./export.sh + +1. idf.py set-target esp32s3 +2. idf.py menuconfig +3. idf.py build +------生成单个固件文件----- +4. cd build , +5. python3 -m esptool --chip esp32s3 merge_bin -o ../xiaozhi_ok.bin @flash_args +6. 烧录固件: +python -m esptool --chip esp32s3 -p /dev/tty.usbmodemXXXX -b 460800 --before default_reset --after hard_reset write_flash -z 0x0 xiaozhi.bin + + + + + + + + + diff --git "a/\346\225\231\347\250\213-pycaret-\346\227\266\351\227\264\345\272\217\345\210\227\351\242\204\346\265\213.ipynb" "b/\346\225\231\347\250\213-pycaret-\346\227\266\351\227\264\345\272\217\345\210\227\351\242\204\346\265\213.ipynb" new file mode 100644 index 0000000..35b16ff --- /dev/null +++ "b/\346\225\231\347\250\213-pycaret-\346\227\266\351\227\264\345\272\217\345\210\227\351\242\204\346\265\213.ipynb" @@ -0,0 +1,14058 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "id": "81e0620e", + "metadata": {}, + "source": [ + "Last updated: 16 Feb 2023\n", + "\n", + "# 👋 PyCaret 时间序列预测教程\n", + "\n", + "* 本教程来自于PyCaret官网,小红书作者:`派神`,对官方教程进行了整理和翻译。\n", + "\n", + "PyCaret 是 Python 中的开源低代码机器学习库,可自动执行机器学习工作流程。它是一种端到端的机器学习和模型管理工具,可以成倍地加快实验周期并提高您的工作效率。\n", + "\n", + "与其他开源机器学习库相比,PyCaret 是一个备用的低代码库,可以用几行代码代替数百行代码。这使得实验呈指数级快速和高效。PyCaret 本质上是围绕多个机器学习库和框架的 Python 包装器,例如 scikit-learn、XGBoost、LightGBM、CatBoost、spaCy、Optuna、Hyperopt、Ray 等。\n", + "\n", + "PyCaret 的设计和简洁性受到“公民数据科学家”的新兴角色的启发,这是 Gartner 首次使用的术语。“公民数据科学家”是高级用户,他们可以执行简单和适度复杂的分析任务,而这些任务以前需要更多的技术专长。\n" + ] + }, + { + "cell_type": "markdown", + "id": "8116e19d", + "metadata": {}, + "source": [ + "# 💻 Installation\n", + "\n", + "PyCaret 在以下 64 位系统上经过测试和支持:\n", + "- Python 3.7 – 3.10\n", + "- Python 3.9 for Ubuntu only\n", + "- Ubuntu 16.04 or later\n", + "- Windows 7 or later\n", + "\n", + "为了避免与其他包的潜在冲突,强烈建议使用虚拟环境,例如 python3 virtualenv(参见 python3 virtualenv 文档)或 conda 环境。 使用隔离环境可以独立于任何先前安装的 Python 包安装特定版本的 pycaret 及其依赖项。\n", + "\n", + "1. 创建conda 虚拟环境\n", + "- conda create --name yourenvname python=3.8\n", + "\n", + "2. 激活conda虚拟环境\n", + "- conda activate yourenvname\n", + "\n", + "3. 安装pycaret\n", + "- pip install pycaret\n", + "\n", + "4. 创建 notebook kernel,以便在jupyter notebook中加载虚拟环境\n", + "- python -m ipykernel install --user --name yourenvname --display-name \"display-name\"\n", + "\n", + "\n", + "\n", + "PyCaret 的默认安装不会自动安装所有额外的依赖项。如果您想安装所有依赖包,您必须安装完整版本:\n", + "\n", + "`pip install pycaret[full]`\n", + "\n", + "或者根据您的用例,您可以安装以下变体之一:\n", + "\n", + "- `pip install pycaret[analysis]`\n", + "- `pip install pycaret[models]`\n", + "- `pip install pycaret[tuner]`\n", + "- `pip install pycaret[mlops]`\n", + "- `pip install pycaret[parallel]`\n", + "- `pip install pycaret[test]`" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "id": "d7142a33", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "'3.0.0'" + ] + }, + "execution_count": 1, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# 版本检查\n", + "import pycaret\n", + "pycaret.__version__" + ] + }, + { + "cell_type": "markdown", + "id": "fb66e98d", + "metadata": {}, + "source": [ + "# 🚀 快速入门" + ] + }, + { + "cell_type": "markdown", + "id": "00347d44", + "metadata": {}, + "source": [ + "PyCaret 的时间序列预测模块现已可用。该模块目前适用于单变量/多变量时间序列预测任务。时序模块的API与PyCaret的其他模块一致。\n", + "\n", + "它内置了预处理功能和 30 多种算法,包括统计/时间序列方法以及基于机器学习的模型。除了模型训练,该模块还有很多其他能力,例如自动超参数调优、集成、模型分析、模型打包和部署能力。\n", + "\n", + "PyCaret 中的典型工作流程按以下顺序包含以下 5 个步骤:\n", + "\n", + "### **Setup** ➡️ **Compare Models** ➡️ **Analyze Model** ➡️ **Prediction** ➡️ **Save Model**
" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "id": "1b09f8df", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "Period\n", + "1949-01 112.0\n", + "1949-02 118.0\n", + "1949-03 132.0\n", + "1949-04 129.0\n", + "1949-05 121.0\n", + "Freq: M, Name: Number of airline passengers, dtype: float64" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "### 从pycaret dataset 模块中加载样本数据集\n", + "from pycaret.datasets import get_data\n", + "data = get_data('airline')" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "id": "2530c17c", + "metadata": {}, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAigAAAGwCAYAAACD0J42AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/bCgiHAAAACXBIWXMAAA9hAAAPYQGoP6dpAAB5QUlEQVR4nO3dd3xb9b0//tfR9pT3ikf2IoskNDFhk5JAoIxASwmzdHFDB1xom++P0l64JS0dtLQptJSb0AJltMwQRgi72SF7ke1tJ95T8/z+OPocSbZsax7J9uv5ePhRYsnSkUjR2+/1kWRZlkFERESUQHTxvgAiIiKi3higEBERUcJhgEJEREQJhwEKERERJRwGKERERJRwGKAQERFRwmGAQkRERAnHEO8LCIfb7UZNTQ3S0tIgSVK8L4eIiIiCIMsy2tvbUVRUBJ1u4BzJkAxQampqUFJSEu/LICIiojBUVlaiuLh4wPsMyQAlLS0NgPIC09PT43w1REREFIy2tjaUlJSon+MDGZIBiijrpKenM0AhIiIaYoJpz2CTLBERESUcBihERESUcBigEBERUcJhgEJEREQJhwEKERERJRwGKERERJRwGKAQERFRwmGAQkRERAmHAQoRERElHAYoRERElHAYoBAREVHCYYBCRERECYcBChEREQ3K5ZbhdsuaPR8DFCIiIhpQTUs3pv/8XTzw+j7NnpMBChEREQ1oV2ULuuwuvLStEq1dDk2ekwEKERERDai9RwlKnG4Z7x6o0+Q5GaAQERHRgNq6neo/r9tbq8lzMkAhIiKiAbX1eMs6nx05g5Yue8yfkwEKERERDait2xugON0y3ttfH/PnZIBCREREA2rvUUo82SkmAMBbGpR5GKAQERHRgESJZ+mcYgDAf47GvszDAIWIiIgGJJpkZxZnYEphuiZlHgYoRERENCCRQUlPMmDJ9AIAwNoYl3kYoBAREdGARA9KusWIK6YXAlDKPM2dsSvzMEAhIiKiAYkpnvQkI8bmpmJsbgpcbhl7q1tj9pwhByjV1dW4+eabkZ2djaSkJEyfPh3bt29Xb5dlGQ8++CAKCwuRlJSEhQsX4siRI36P0dTUhGXLliE9PR0ZGRm488470dHREfmrISIioqhyuWW025QMSprFAADISTEDADpszn5/LlIhBSjNzc1YsGABjEYj3n77bRw4cAC//e1vkZmZqd7n0UcfxeOPP44nn3wSW7ZsQUpKChYtWoSenh71PsuWLcP+/fuxfv16rF27Fp988gm+/e1vR+9VERERUVR09HiDEBGgpHr+1/e2aDOEcudf/epXKCkpwerVq9XvjRkzRv1nWZbx+9//Hg888ACuvvpqAMDf//535Ofn47XXXsONN96IgwcP4p133sG2bdswd+5cAMAf//hHXHHFFfjNb36DoqKiPs9rs9lgs9nUP7e1tYX2KomIiCgsokHWYtTBbNADAFLNSvjQnigZlDfeeANz587FDTfcgLy8PJx99tl46qmn1NtPnDiBuro6LFy4UP2e1WrFvHnzsGnTJgDApk2bkJGRoQYnALBw4ULodDps2bIl4POuXLkSVqtV/SopKQnpRRIREVF41Akei1H9nhYZlJAClOPHj+OJJ57AhAkT8O677+Kuu+7C97//fTzzzDMAgLo65YTD/Px8v5/Lz89Xb6urq0NeXp7f7QaDAVlZWep9eluxYgVaW1vVr8rKylAum4iIiMIkdqCI8g4ApHkyKB02R8CfiYaQSjxutxtz587FI488AgA4++yzsW/fPjz55JO47bbbYnKBAGA2m2E2m2P2+ERERBSYdweKTwZFDVASJINSWFiIqVOn+n1vypQpqKioAAAUFCjLW+rr/bfL1dfXq7cVFBSgoaHB73an04mmpib1PkRERJQYfHegCKLE054oJZ4FCxbg8OHDft/74osvUFZWBkBpmC0oKMCGDRvU29va2rBlyxaUl5cDAMrLy9HS0oIdO3ao9/nggw/gdrsxb968sF8IERERRZ/vDhRBiwxKSCWee+65B+eeey4eeeQRfPWrX8XWrVvx17/+FX/9618BAJIk4Yc//CH+93//FxMmTMCYMWPw05/+FEVFRbjmmmsAKBmXxYsX41vf+haefPJJOBwO3H333bjxxhsDTvAQERFR/IgSj18PSqKNGZ9zzjl49dVXsWLFCjz00EMYM2YMfv/732PZsm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YYkSSgqKkJSUhL++c9/oqSkBLNnz9b6pcRdf+9lIOL9LCws1Ojqhp5ov59utxsARtSHqhDt93LXrl3IzMwckQe6ReO97OjowEsvvYQ777wzlpea8KLxXvLzJ3yGeD1xR0eHX6R54sQJ7Nq1C1lZWSgtLcXLL7+M3NxclJaWYu/evfjBD36Aa665BpdddhkA5TfPQI2xpaWlGDNmjPrnX//611i8eDF0Oh1eeeUV/PKXv8RLL70EvV4f+xepkUjfy2PHjuH555/HFVdcgezsbOzZswf33HMPLrjgAsyYMUN93KNHj6KjowN1dXXo7u5W/w85depUmEwmTV9zLGnxfq5btw719fU455xzkJqaiv379+P+++/HggULMHr06Hi87JjQ4r188803UV9fj/nz58NisWD9+vV45JFHcN9998XlNceKVv8/B4AXX3wRTqdz2PahafVejoTPn5iKV23pww8/lAH0+brttttkWfaOXBqNRrm0tFR+4IEHZJvNNuBjIkAt8eKLL5atVqtssVjkefPmyevWrYvRK4qfSN/LiooK+YILLpCzsrJks9ksjx8/Xr7//vvl1tZWv+e58MILAz7PiRMnNHy1safF+/nBBx/I5eXl6t/NCRMmyD/+8Y/l5uZmjV9tbGnxXr799tvyrFmz5NTUVDklJUWeOXOm/OSTT8oul0vrlxtTWv3/XJZluby8XL7pppu0emma0+q9HAmfP7EkyfIImsUjIiKiISHhe1CIiIho5GGAQkRERAmHAQoRERElHAYoRERElHAYoBAREVHCYYBCRERECYcBChERESUcBihERESUcBigEFFCuv3223HNNddE9BgfffQRJElCS0tLVK6JiLTDAIWIInb77bdDkiRIkgSTyYTx48fjoYcegtPpDPsx//CHP2DNmjXRu0giGlLidlggEQ0vixcvxurVq2Gz2bBu3TosX74cRqMRK1asCOlxXC4XJEmC1WqN0ZUS0VDADAoRRYXZbEZBQQHKyspw1113YeHChXjjjTdgs9lw3333YdSoUUhJScG8efPw0UcfqT+3Zs0aZGRk4I033sDUqVNhNptRUVHRp8Rjs9nw/e9/H3l5ebBYLDjvvPOwbds2v2tYt24dJk6ciKSkJFx88cU4efKkNi+eiKKOAQoRxURSUhLsdjvuvvtubNq0CS+88AL27NmDG264AYsXL8aRI0fU+3Z1deFXv/oV/va3v2H//v3Iy8vr83g/+tGP8O9//xvPPPMMPv/8c4wfPx6LFi1CU1MTAKCyshLXXXcdrrrqKuzatQvf/OY38ZOf/ESz10tE0cUAhYiiSpZlvP/++3j33XcxY8YMrF69Gi+//DLOP/98jBs3Dvfddx/OO+88rF69Wv0Zh8OBP//5zzj33HMxadIkJCcn+z1mZ2cnnnjiCfz617/G5ZdfjqlTp+Kpp55CUlISnn76aQDAE088gXHjxuG3v/0tJk2ahGXLluH222/X8qUTURSxB4WIomLt2rVITU2Fw+GA2+3GTTfdhOuvvx5r1qzBxIkT/e5rs9mQnZ2t/tlkMmHGjBn9PvaxY8fgcDiwYMEC9XtGoxFf+tKXcPDgQQDAwYMHMW/ePL+fKy8vj8ZLI6I4YIBCRFFx8cUX44knnoDJZEJRUREMBgNefPFF6PV67NixA3q93u/+qamp6j8nJSVBkiStL5mIEhgDFCKKipSUFIwfP97ve2effTZcLhcaGhpw/vnnh/3Y48aNg8lkwn/+8x+UlZUBUMpC27Ztww9/+EMAwJQpU/DGG2/4/dzmzZvDfk4iii/2oBBRzEycOBHLli3DrbfeildeeQUnTpzA1q1bsXLlSrz11ltBP05KSgruuusu3H///XjnnXdw4MABfOtb30JXVxfuvPNOAMB3v/tdHDlyBPfffz8OHz6M559/nntUiIYwBihEFFOrV6/Grbfeiv/+7//GpEmTcM0112Dbtm0oLS0N6XF++ctfYunSpbjlllswe/ZsHD16FO+++y4yMzMBAKWlpfj3v/+N1157DTNnzsSTTz6JRx55JBYviYg0IMmyLMf7IoiIiIh8MYNCRERECYcBChERESUcBihERESUcBigEBERUcJhgEJEREQJhwEKERERJRwGKERERJRwGKAQERFRwmGAQkRERAmHAQoRERElHAYoRERElHD+f66JeAPVS4njAAAAAElFTkSuQmCC", + "text/plain": [ + "
" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "# 对数据集绘图\n", + "data.plot();" + ] + }, + { + "cell_type": "markdown", + "id": "c00f6a4a", + "metadata": {}, + "source": [ + "## Setup\n", + "\n", + "此函数初始化训练环境并创建转换管道。在 PyCaret 中执行任何其他函数之前必须调用setup函数。Setup只有一个必填参数,即data参数. 所有其他参数都是可选的。" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "id": "97f2c6c6", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
 DescriptionValue
0session_id123
1TargetNumber of airline passengers
2ApproachUnivariate
3Exogenous VariablesNot Present
4Original data shape(144, 1)
5Transformed data shape(144, 1)
6Transformed train set shape(141, 1)
7Transformed test set shape(3, 1)
8Rows with missing values0.0%
9Fold GeneratorExpandingWindowSplitter
10Fold Number3
11Enforce Prediction IntervalFalse
12Splits used for hyperparametersall
13User Defined Seasonal Period(s)None
14Ignore Seasonality TestFalse
15Seasonality Detection Algoauto
16Max Period to Consider60
17Seasonal Period(s) Tested[12, 24, 36, 11, 48]
18Significant Seasonal Period(s)[12, 24, 36, 11, 48]
19Significant Seasonal Period(s) without Harmonics[48, 36, 11]
20Remove HarmonicsFalse
21Harmonics Order Methodharmonic_max
22Num Seasonalities to Use1
23All Seasonalities to Use[12]
24Primary Seasonality12
25Seasonality PresentTrue
26Target Strictly PositiveTrue
27Target White NoiseNo
28Recommended d1
29Recommended Seasonal D1
30PreprocessFalse
31CPU Jobs-1
32Use GPUFalse
33Log ExperimentFalse
34Experiment Namets-default-name
35USI6b18
\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "# 导入 pycaret 时间序列和初始化设置\n", + "from pycaret.time_series import *\n", + "s = setup(data, fh = 3, session_id = 123)" + ] + }, + { + "cell_type": "markdown", + "id": "3c583864", + "metadata": {}, + "source": [ + "成功执行setup后,它会显示包含实验级别信息的信息表格。\n", + "\n", + "- **Session id:** 一个伪随机数,作为种子分布在所有函数中,以供以后再现。如果没有session_id传递,则自动生成一个随机数,分发给所有函数。
\n", + "
\n", + "- **Approach:** 单变量或多变量。
\n", + "
\n", + "- **Exogenous Variables:** 模型中使用的外生变量。
\n", + "
\n", + "- **Original data shape:** 原始数据在变换之前的形状。
\n", + "
\n", + "- **Transformed train set shape :** 变换后的训练集形状。
\n", + "
\n", + "- **Transformed test set shape :** 变换后的测试集的形状。
\n", + "
" + ] + }, + { + "cell_type": "markdown", + "id": "ada19398", + "metadata": {}, + "source": [ + "PyCaret 有两组 API 供您使用。(1)函数式(如上所示)和 (2)OOP(面向对象)的 API。\n", + "\n", + "如果使用面向对象的 API 而不是直接执行函数,您将导入一个类并执行类的方法。" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "id": "32ee91c9", + "metadata": {}, + "outputs": [], + "source": [ + "# 导入 TSForecastingExperiment 并初始化类\n", + "from pycaret.time_series import TSForecastingExperiment\n", + "exp = TSForecastingExperiment()" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "id": "3ead9fb5", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "pycaret.time_series.forecasting.oop.TSForecastingExperiment" + ] + }, + "execution_count": 6, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# 检查exp的类型\n", + "type(exp)" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "id": "f05b8590", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
 DescriptionValue
0session_id123
1TargetNumber of airline passengers
2ApproachUnivariate
3Exogenous VariablesNot Present
4Original data shape(144, 1)
5Transformed data shape(144, 1)
6Transformed train set shape(141, 1)
7Transformed test set shape(3, 1)
8Rows with missing values0.0%
9Fold GeneratorExpandingWindowSplitter
10Fold Number3
11Enforce Prediction IntervalFalse
12Splits used for hyperparametersall
13User Defined Seasonal Period(s)None
14Ignore Seasonality TestFalse
15Seasonality Detection Algoauto
16Max Period to Consider60
17Seasonal Period(s) Tested[12, 24, 36, 11, 48]
18Significant Seasonal Period(s)[12, 24, 36, 11, 48]
19Significant Seasonal Period(s) without Harmonics[48, 36, 11]
20Remove HarmonicsFalse
21Harmonics Order Methodharmonic_max
22Num Seasonalities to Use1
23All Seasonalities to Use[12]
24Primary Seasonality12
25Seasonality PresentTrue
26Target Strictly PositiveTrue
27Target White NoiseNo
28Recommended d1
29Recommended Seasonal D1
30PreprocessFalse
31CPU Jobs-1
32Use GPUFalse
33Log ExperimentFalse
34Experiment Namets-default-name
35USIa9da
\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": [ + "" + ] + }, + "execution_count": 7, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# 在 exp 上初始化设置\n", + "exp.setup(data, fh = 3, session_id = 123)" + ] + }, + { + "cell_type": "markdown", + "id": "77213120", + "metadata": {}, + "source": [ + "您可以使用这两种方法中的任何一种,即函数式或 OOP(面向对象),甚至可以在两组 API 之间来回切换。 方法的选择不会影响结果,并且已经过一致性测试。" + ] + }, + { + "cell_type": "markdown", + "id": "b86fdf15", + "metadata": {}, + "source": [ + "## Check Stats\n", + " `check_stats` 函数用于获取汇总统计信息并对原始数据或模型残差运行统计测试。" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "id": "f449e9eb", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
TestTest NameDataPropertySettingValue
0SummaryStatisticsTransformedLength144.0
1SummaryStatisticsTransformed# Missing Values0.0
2SummaryStatisticsTransformedMean280.298611
3SummaryStatisticsTransformedMedian265.5
4SummaryStatisticsTransformedStandard Deviation119.966317
5SummaryStatisticsTransformedVariance14391.917201
6SummaryStatisticsTransformedKurtosis-0.364942
7SummaryStatisticsTransformedSkewness0.58316
8SummaryStatisticsTransformed# Distinct Values118.0
9White NoiseLjung-BoxTransformedTest Statictic{'alpha': 0.05, 'K': 24}1606.083817
10White NoiseLjung-BoxTransformedTest Statictic{'alpha': 0.05, 'K': 48}1933.155822
11White NoiseLjung-BoxTransformedp-value{'alpha': 0.05, 'K': 24}0.0
12White NoiseLjung-BoxTransformedp-value{'alpha': 0.05, 'K': 48}0.0
13White NoiseLjung-BoxTransformedWhite Noise{'alpha': 0.05, 'K': 24}False
14White NoiseLjung-BoxTransformedWhite Noise{'alpha': 0.05, 'K': 48}False
15StationarityADFTransformedStationarity{'alpha': 0.05}False
16StationarityADFTransformedp-value{'alpha': 0.05}0.99188
17StationarityADFTransformedTest Statistic{'alpha': 0.05}0.815369
18StationarityADFTransformedCritical Value 1%{'alpha': 0.05}-3.481682
19StationarityADFTransformedCritical Value 5%{'alpha': 0.05}-2.884042
20StationarityADFTransformedCritical Value 10%{'alpha': 0.05}-2.57877
21StationarityKPSSTransformedTrend Stationarity{'alpha': 0.05}True
22StationarityKPSSTransformedp-value{'alpha': 0.05}0.1
23StationarityKPSSTransformedTest Statistic{'alpha': 0.05}0.09615
24StationarityKPSSTransformedCritical Value 10%{'alpha': 0.05}0.119
25StationarityKPSSTransformedCritical Value 5%{'alpha': 0.05}0.146
26StationarityKPSSTransformedCritical Value 2.5%{'alpha': 0.05}0.176
27StationarityKPSSTransformedCritical Value 1%{'alpha': 0.05}0.216
28NormalityShapiroTransformedNormality{'alpha': 0.05}False
29NormalityShapiroTransformedp-value{'alpha': 0.05}0.000068
\n", + "
" + ], + "text/plain": [ + " Test Test Name Data Property \\\n", + "0 Summary Statistics Transformed Length \n", + "1 Summary Statistics Transformed # Missing Values \n", + "2 Summary Statistics Transformed Mean \n", + "3 Summary Statistics Transformed Median \n", + "4 Summary Statistics Transformed Standard Deviation \n", + "5 Summary Statistics Transformed Variance \n", + "6 Summary Statistics Transformed Kurtosis \n", + "7 Summary Statistics Transformed Skewness \n", + "8 Summary Statistics Transformed # Distinct Values \n", + "9 White Noise Ljung-Box Transformed Test Statictic \n", + "10 White Noise Ljung-Box Transformed Test Statictic \n", + "11 White Noise Ljung-Box Transformed p-value \n", + "12 White Noise Ljung-Box Transformed p-value \n", + "13 White Noise Ljung-Box Transformed White Noise \n", + "14 White Noise Ljung-Box Transformed White Noise \n", + "15 Stationarity ADF Transformed Stationarity \n", + "16 Stationarity ADF Transformed p-value \n", + "17 Stationarity ADF Transformed Test Statistic \n", + "18 Stationarity ADF Transformed Critical Value 1% \n", + "19 Stationarity ADF Transformed Critical Value 5% \n", + "20 Stationarity ADF Transformed Critical Value 10% \n", + "21 Stationarity KPSS Transformed Trend Stationarity \n", + "22 Stationarity KPSS Transformed p-value \n", + "23 Stationarity KPSS Transformed Test Statistic \n", + "24 Stationarity KPSS Transformed Critical Value 10% \n", + "25 Stationarity KPSS Transformed Critical Value 5% \n", + "26 Stationarity KPSS Transformed Critical Value 2.5% \n", + "27 Stationarity KPSS Transformed Critical Value 1% \n", + "28 Normality Shapiro Transformed Normality \n", + "29 Normality Shapiro Transformed p-value \n", + "\n", + " Setting Value \n", + "0 144.0 \n", + "1 0.0 \n", + "2 280.298611 \n", + "3 265.5 \n", + "4 119.966317 \n", + "5 14391.917201 \n", + "6 -0.364942 \n", + "7 0.58316 \n", + "8 118.0 \n", + "9 {'alpha': 0.05, 'K': 24} 1606.083817 \n", + "10 {'alpha': 0.05, 'K': 48} 1933.155822 \n", + "11 {'alpha': 0.05, 'K': 24} 0.0 \n", + "12 {'alpha': 0.05, 'K': 48} 0.0 \n", + "13 {'alpha': 0.05, 'K': 24} False \n", + "14 {'alpha': 0.05, 'K': 48} False \n", + "15 {'alpha': 0.05} False \n", + "16 {'alpha': 0.05} 0.99188 \n", + "17 {'alpha': 0.05} 0.815369 \n", + "18 {'alpha': 0.05} -3.481682 \n", + "19 {'alpha': 0.05} -2.884042 \n", + "20 {'alpha': 0.05} -2.57877 \n", + "21 {'alpha': 0.05} True \n", + "22 {'alpha': 0.05} 0.1 \n", + "23 {'alpha': 0.05} 0.09615 \n", + "24 {'alpha': 0.05} 0.119 \n", + "25 {'alpha': 0.05} 0.146 \n", + "26 {'alpha': 0.05} 0.176 \n", + "27 {'alpha': 0.05} 0.216 \n", + "28 {'alpha': 0.05} False \n", + "29 {'alpha': 0.05} 0.000068 " + ] + }, + "execution_count": 8, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# 对原始数据进行统计测试\n", + "check_stats()" + ] + }, + { + "cell_type": "markdown", + "id": "f98dd435", + "metadata": {}, + "source": [ + "## Compare Models\n", + "\n", + "此函数使用交叉验证训练和评估模型库中所有可用模型的性能。此函数的输出是经过交叉验证后的平均分数的评分表格。可以使用该函数访问在 CV(交叉验证)期间评估的指标`get_metrics`。`add_metric`可以使用和函数添加或删除自定义指标`remove_metric`。" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "id": "65a19df4", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [ + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
 ModelMASERMSSEMAERMSEMAPESMAPER2TT (Sec)
etsETS0.49120.554115.094319.31050.03180.0316-0.44640.5433
exp_smoothExponential Smoothing0.49290.556115.147719.37920.03200.0317-0.46040.6000
arimaARIMA0.69640.711021.375724.77740.04470.0456-0.54950.5467
auto_arimaAuto ARIMA0.71360.694521.938924.21370.04590.0464-0.545411.7333
par_cds_dtPassive Aggressive w/ Cond. Deseasonalize & Detrending0.72120.669622.179423.36730.04530.04680.02610.1200
lar_cds_dtLeast Angular Regressor w/ Cond. Deseasonalize & Detrending0.85020.826426.264628.99230.05130.05340.03650.1100
huber_cds_dtHuber w/ Cond. Deseasonalize & Detrending0.86580.836226.782629.39470.05160.05360.15010.1233
lr_cds_dtLinear w/ Cond. Deseasonalize & Detrending0.89040.872227.526630.62430.05340.0555-0.00920.5633
ridge_cds_dtRidge w/ Cond. Deseasonalize & Detrending0.89050.872227.527030.62460.05340.0555-0.00920.1200
en_cds_dtElastic Net w/ Cond. Deseasonalize & Detrending0.89440.874627.653530.71270.05350.0557-0.00630.1033
llar_cds_dtLasso Least Angular Regressor w/ Cond. Deseasonalize & Detrending0.89660.875827.722430.75800.05360.0558-0.00420.1233
lasso_cds_dtLasso w/ Cond. Deseasonalize & Detrending0.89660.875927.723130.75940.05360.0558-0.00400.1333
br_cds_dtBayesian Ridge w/ Cond. Deseasonalize & Detrending0.91560.887828.318831.18210.05470.0569-0.02090.1267
knn_cds_dtK Neighbors w/ Cond. Deseasonalize & Detrending1.06950.992433.150034.92770.06310.0656-0.16820.1333
thetaTheta Forecaster1.08391.039333.322336.25550.06860.0710-1.79260.5200
et_cds_dtExtra Trees w/ Cond. Deseasonalize & Detrending1.16941.088436.216038.27290.06940.0727-0.43520.1633
dt_cds_dtDecision Tree w/ Cond. Deseasonalize & Detrending1.19301.134636.910639.85180.07330.0769-0.81350.0800
lightgbm_cds_dtLight Gradient Boosting w/ Cond. Deseasonalize & Detrending1.20191.136237.235939.98270.07130.0746-0.60510.0867
omp_cds_dtOrthogonal Matching Pursuit w/ Cond. Deseasonalize & Detrending1.21711.147537.645740.30700.07240.0757-0.70570.1233
ada_cds_dtAdaBoost w/ Cond. Deseasonalize & Detrending1.24151.174538.487341.34660.07280.0765-0.57110.1267
rf_cds_dtRandom Forest w/ Cond. Deseasonalize & Detrending1.25741.183738.873641.54800.07530.0789-0.94580.1767
gbr_cds_dtGradient Boosting w/ Cond. Deseasonalize & Detrending1.27021.182039.300441.53550.07600.0797-0.83440.0967
xgboost_cds_dtExtreme Gradient Boosting w/ Cond. Deseasonalize & Detrending1.31981.204540.834242.30450.07920.0831-0.91920.1100
naiveNaive Forecaster1.56541.495148.444452.52320.09200.0981-1.83440.7000
snaiveSeasonal Naive Forecaster1.67411.534351.666753.73500.10520.1117-4.53880.4767
polytrendPolynomial Trend Forecaster2.15532.109666.981774.40480.12410.1350-4.25250.5067
crostonCroston2.45652.351376.395382.97940.13940.1562-4.58950.5100
grand_meansGrand Means Forecaster7.30656.5029226.0502228.38800.44690.5821-72.11830.4767
\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "# 比较基准模型\n", + "best = compare_models()" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "id": "87477aa4", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [ + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
 ModelMASERMSSEMAERMSEMAPESMAPER2TT (Sec)
etsETS0.49120.554115.094319.31050.03180.0316-0.44640.0933
exp_smoothExponential Smoothing0.49290.556115.147719.37920.03200.0317-0.46040.1033
arimaARIMA0.69640.711021.375724.77740.04470.0456-0.54950.0800
auto_arimaAuto ARIMA0.71360.694521.938924.21370.04590.0464-0.545411.5600
par_cds_dtPassive Aggressive w/ Cond. Deseasonalize & Detrending0.72120.669622.179423.36730.04530.04680.02610.0933
lar_cds_dtLeast Angular Regressor w/ Cond. Deseasonalize & Detrending0.85020.826426.264628.99230.05130.05340.03650.0900
huber_cds_dtHuber w/ Cond. Deseasonalize & Detrending0.86580.836226.782629.39470.05160.05360.15010.0800
lr_cds_dtLinear w/ Cond. Deseasonalize & Detrending0.89040.872227.526630.62430.05340.0555-0.00920.0800
ridge_cds_dtRidge w/ Cond. Deseasonalize & Detrending0.89050.872227.527030.62460.05340.0555-0.00920.0867
en_cds_dtElastic Net w/ Cond. Deseasonalize & Detrending0.89440.874627.653530.71270.05350.0557-0.00630.0967
llar_cds_dtLasso Least Angular Regressor w/ Cond. Deseasonalize & Detrending0.89660.875827.722430.75800.05360.0558-0.00420.0933
lasso_cds_dtLasso w/ Cond. Deseasonalize & Detrending0.89660.875927.723130.75940.05360.0558-0.00400.0767
br_cds_dtBayesian Ridge w/ Cond. Deseasonalize & Detrending0.91560.887828.318831.18210.05470.0569-0.02090.0900
knn_cds_dtK Neighbors w/ Cond. Deseasonalize & Detrending1.06950.992433.150034.92770.06310.0656-0.16820.1000
thetaTheta Forecaster1.08391.039333.322336.25550.06860.0710-1.79260.0300
et_cds_dtExtra Trees w/ Cond. Deseasonalize & Detrending1.16941.088436.216038.27290.06940.0727-0.43520.1633
dt_cds_dtDecision Tree w/ Cond. Deseasonalize & Detrending1.19301.134636.910639.85180.07330.0769-0.81350.0933
lightgbm_cds_dtLight Gradient Boosting w/ Cond. Deseasonalize & Detrending1.20191.136237.235939.98270.07130.0746-0.60510.0767
omp_cds_dtOrthogonal Matching Pursuit w/ Cond. Deseasonalize & Detrending1.21711.147537.645740.30700.07240.0757-0.70570.0900
ada_cds_dtAdaBoost w/ Cond. Deseasonalize & Detrending1.24151.174538.487341.34660.07280.0765-0.57110.1167
rf_cds_dtRandom Forest w/ Cond. Deseasonalize & Detrending1.25741.183738.873641.54800.07530.0789-0.94580.1700
gbr_cds_dtGradient Boosting w/ Cond. Deseasonalize & Detrending1.27021.182039.300441.53550.07600.0797-0.83440.1167
xgboost_cds_dtExtreme Gradient Boosting w/ Cond. Deseasonalize & Detrending1.31981.204540.834242.30450.07920.0831-0.91920.1100
naiveNaive Forecaster1.56541.495148.444452.52320.09200.0981-1.83440.0267
snaiveSeasonal Naive Forecaster1.67411.534351.666753.73500.10520.1117-4.53880.0267
polytrendPolynomial Trend Forecaster2.15532.109666.981774.40480.12410.1350-4.25250.0233
crostonCroston2.45652.351376.395382.97940.13940.1562-4.58950.0200
grand_meansGrand Means Forecaster7.30656.5029226.0502228.38800.44690.5821-72.11830.0167
\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [ + "
AutoETS(seasonal='mul', sp=12, trend='add')
In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook.
On GitHub, the HTML representation is unable to render, please try loading this page with nbviewer.org.
" + ], + "text/plain": [ + "AutoETS(seasonal='mul', sp=12, trend='add')" + ] + }, + "execution_count": 10, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# 使用OOP 比较模型\n", + "exp.compare_models()" + ] + }, + { + "cell_type": "markdown", + "id": "340de1e2", + "metadata": {}, + "source": [ + "请注意,函数式 API 和 OOP API 之间的输出是一致的。 此notebook中的其余功能将仅使用函数式 API 来展示。\n", + "\n", + "___" + ] + }, + { + "cell_type": "markdown", + "id": "6a77ec0c", + "metadata": {}, + "source": [ + "## Analyze Model" + ] + }, + { + "cell_type": "markdown", + "id": "595ea108", + "metadata": {}, + "source": [ + "您可以使用 `plot_model` 函数来分析经过训练的模型在测试集上的性能。 在某些情况下可能需要重新训练模型。" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "id": "0ec7fad6", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + " \n", + " " + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "application/vnd.plotly.v1+json": { + "config": { + "plotlyServerURL": "https://plotly.com" + }, + "data": [ + { + "line": { + "color": "#1f77b4" + }, + "marker": { + "size": 5 + }, + "mode": "lines+markers", + "name": "Forecast | ETS", + "showlegend": true, + "type": "scatter", + "x": [ + "1960-10-01T00:00:00", + "1960-11-01T00:00:00", + "1960-12-01T00:00:00" + ], + "y": [ + 442.9862, + 388.2091, + 427.7009 + ] + }, + { + "line": { + "width": 0 + }, + "marker": { + "color": "#68BBE3" + }, + "mode": "lines", + "name": "Lower Interval", + "showlegend": false, + "type": "scatter", + "x": [ + "1960-10-01T00:00:00", + "1960-11-01T00:00:00", + "1960-12-01T00:00:00" + ], + "y": [ + 424.9511, + 371.5726, + 409.45 + ] + }, + { + "fill": "tonexty", + "fillcolor": "rgba(104,187,227,0.5)", + "line": { + "width": 0 + }, + "marker": { + "color": "#68BBE3" + }, + "mode": "lines", + "name": "Prediction Interval | ETS", + "showlegend": true, + "type": "scatter", + "x": [ + "1960-10-01T00:00:00", + "1960-11-01T00:00:00", + "1960-12-01T00:00:00" + ], + "y": [ + 461.5179, + 406.9327, + 448.098 + ] + }, + { + "marker": { + "color": "#3f3f3f", + "size": 5 + }, + "mode": "lines+markers", + "name": "Original", + "showlegend": true, + "type": "scatter", + "x": [ + "1949-01-01T00:00:00", + "1949-02-01T00:00:00", + "1949-03-01T00:00:00", + "1949-04-01T00:00:00", + "1949-05-01T00:00:00", + "1949-06-01T00:00:00", + "1949-07-01T00:00:00", + "1949-08-01T00:00:00", + "1949-09-01T00:00:00", + "1949-10-01T00:00:00", + "1949-11-01T00:00:00", + "1949-12-01T00:00:00", + "1950-01-01T00:00:00", + "1950-02-01T00:00:00", + "1950-03-01T00:00:00", + "1950-04-01T00:00:00", + "1950-05-01T00:00:00", + "1950-06-01T00:00:00", + "1950-07-01T00:00:00", + "1950-08-01T00:00:00", + "1950-09-01T00:00:00", + "1950-10-01T00:00:00", + "1950-11-01T00:00:00", + "1950-12-01T00:00:00", + "1951-01-01T00:00:00", + "1951-02-01T00:00:00", + "1951-03-01T00:00:00", + "1951-04-01T00:00:00", + "1951-05-01T00:00:00", + "1951-06-01T00:00:00", + "1951-07-01T00:00:00", + "1951-08-01T00:00:00", + "1951-09-01T00:00:00", + "1951-10-01T00:00:00", + "1951-11-01T00:00:00", + "1951-12-01T00:00:00", + "1952-01-01T00:00:00", + "1952-02-01T00:00:00", + "1952-03-01T00:00:00", + "1952-04-01T00:00:00", + "1952-05-01T00:00:00", + "1952-06-01T00:00:00", + "1952-07-01T00:00:00", + "1952-08-01T00:00:00", + "1952-09-01T00:00:00", + "1952-10-01T00:00:00", + "1952-11-01T00:00:00", + "1952-12-01T00:00:00", + "1953-01-01T00:00:00", + "1953-02-01T00:00:00", + "1953-03-01T00:00:00", + "1953-04-01T00:00:00", + "1953-05-01T00:00:00", + "1953-06-01T00:00:00", + "1953-07-01T00:00:00", + "1953-08-01T00:00:00", + "1953-09-01T00:00:00", + "1953-10-01T00:00:00", + "1953-11-01T00:00:00", + "1953-12-01T00:00:00", + "1954-01-01T00:00:00", + "1954-02-01T00:00:00", + "1954-03-01T00:00:00", + "1954-04-01T00:00:00", + "1954-05-01T00:00:00", + "1954-06-01T00:00:00", + "1954-07-01T00:00:00", + "1954-08-01T00:00:00", + "1954-09-01T00:00:00", + "1954-10-01T00:00:00", + "1954-11-01T00:00:00", + "1954-12-01T00:00:00", + "1955-01-01T00:00:00", + "1955-02-01T00:00:00", + "1955-03-01T00:00:00", + "1955-04-01T00:00:00", + "1955-05-01T00:00:00", + "1955-06-01T00:00:00", + "1955-07-01T00:00:00", + "1955-08-01T00:00:00", + "1955-09-01T00:00:00", + "1955-10-01T00:00:00", + "1955-11-01T00:00:00", + "1955-12-01T00:00:00", + "1956-01-01T00:00:00", + "1956-02-01T00:00:00", + "1956-03-01T00:00:00", + "1956-04-01T00:00:00", + "1956-05-01T00:00:00", + "1956-06-01T00:00:00", + "1956-07-01T00:00:00", + "1956-08-01T00:00:00", + "1956-09-01T00:00:00", + "1956-10-01T00:00:00", + "1956-11-01T00:00:00", + "1956-12-01T00:00:00", + "1957-01-01T00:00:00", + "1957-02-01T00:00:00", + "1957-03-01T00:00:00", + "1957-04-01T00:00:00", + "1957-05-01T00:00:00", + "1957-06-01T00:00:00", + "1957-07-01T00:00:00", + "1957-08-01T00:00:00", + "1957-09-01T00:00:00", + "1957-10-01T00:00:00", + "1957-11-01T00:00:00", + "1957-12-01T00:00:00", + "1958-01-01T00:00:00", + "1958-02-01T00:00:00", + "1958-03-01T00:00:00", + "1958-04-01T00:00:00", + "1958-05-01T00:00:00", + "1958-06-01T00:00:00", + "1958-07-01T00:00:00", + "1958-08-01T00:00:00", + "1958-09-01T00:00:00", + "1958-10-01T00:00:00", + "1958-11-01T00:00:00", + "1958-12-01T00:00:00", + "1959-01-01T00:00:00", + "1959-02-01T00:00:00", + "1959-03-01T00:00:00", + "1959-04-01T00:00:00", + "1959-05-01T00:00:00", + "1959-06-01T00:00:00", + "1959-07-01T00:00:00", + "1959-08-01T00:00:00", + "1959-09-01T00:00:00", + "1959-10-01T00:00:00", + "1959-11-01T00:00:00", + "1959-12-01T00:00:00", + "1960-01-01T00:00:00", + "1960-02-01T00:00:00", + "1960-03-01T00:00:00", + "1960-04-01T00:00:00", + "1960-05-01T00:00:00", + "1960-06-01T00:00:00", + "1960-07-01T00:00:00", + "1960-08-01T00:00:00", + "1960-09-01T00:00:00", + "1960-10-01T00:00:00", + "1960-11-01T00:00:00", + "1960-12-01T00:00:00" + ], + "y": [ + 112, + 118, + 132, + 129, + 121, + 135, + 148, + 148, + 136, + 119, + 104, + 118, + 115, + 126, + 141, + 135, + 125, + 149, + 170, + 170, + 158, + 133, + 114, + 140, + 145, + 150, + 178, + 163, + 172, + 178, + 199, + 199, + 184, + 162, + 146, + 166, + 171, + 180, + 193, + 181, + 183, + 218, + 230, + 242, + 209, + 191, + 172, + 194, + 196, + 196, + 236, + 235, + 229, + 243, + 264, + 272, + 237, + 211, + 180, + 201, + 204, + 188, + 235, + 227, + 234, + 264, + 302, + 293, + 259, + 229, + 203, + 229, + 242, + 233, + 267, + 269, + 270, + 315, + 364, + 347, + 312, + 274, + 237, + 278, + 284, + 277, + 317, + 313, + 318, + 374, + 413, + 405, + 355, + 306, + 271, + 306, + 315, + 301, + 356, + 348, + 355, + 422, + 465, + 467, + 404, + 347, + 305, + 336, + 340, + 318, + 362, + 348, + 363, + 435, + 491, + 505, + 404, + 359, + 310, + 337, + 360, + 342, + 406, + 396, + 420, + 472, + 548, + 559, + 463, + 407, + 362, + 405, + 417, + 391, + 419, + 461, + 472, + 535, + 622, + 606, + 508, + 461, + 390, + 432 + ] + } + ], + "layout": { + "showlegend": true, + "template": { + "data": { + "bar": [ + { + "error_x": { + "color": "rgb(51,51,51)" + }, + "error_y": { + "color": "rgb(51,51,51)" + }, + "marker": { + "line": { + "color": "rgb(237,237,237)", + "width": 0.5 + }, + "pattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + } + }, + "type": "bar" + } + ], + "barpolar": [ + { + "marker": { + "line": { + "color": "rgb(237,237,237)", + "width": 0.5 + }, + "pattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + } + }, + "type": "barpolar" + } + ], + "carpet": [ + { + "aaxis": { + "endlinecolor": "rgb(51,51,51)", + "gridcolor": "white", + "linecolor": "white", + "minorgridcolor": "white", + "startlinecolor": "rgb(51,51,51)" + }, + "baxis": { + "endlinecolor": "rgb(51,51,51)", + "gridcolor": "white", + "linecolor": "white", + "minorgridcolor": "white", + "startlinecolor": "rgb(51,51,51)" + }, + "type": "carpet" + } + ], + "choropleth": [ + { + "colorbar": { + "outlinewidth": 0, + "tickcolor": "rgb(237,237,237)", + "ticklen": 6, + "ticks": "inside" + }, + "type": "choropleth" + } + ], + "contour": [ + { + "colorbar": { + "outlinewidth": 0, + "tickcolor": "rgb(237,237,237)", + "ticklen": 6, + "ticks": "inside" + }, + "colorscale": [ + [ + 0, + "rgb(20,44,66)" + ], + [ + 1, + "rgb(90,179,244)" + ] + ], + "type": "contour" + } + ], + "contourcarpet": [ + { + "colorbar": { + "outlinewidth": 0, + "tickcolor": "rgb(237,237,237)", + "ticklen": 6, + "ticks": "inside" + }, + "type": "contourcarpet" + } + ], + "heatmap": [ + { + "colorbar": { + "outlinewidth": 0, + "tickcolor": "rgb(237,237,237)", + "ticklen": 6, + "ticks": "inside" + }, + "colorscale": [ + [ + 0, + "rgb(20,44,66)" + ], + [ + 1, + "rgb(90,179,244)" + ] + ], + "type": "heatmap" + } + ], + "heatmapgl": [ + { + "colorbar": { + "outlinewidth": 0, + "tickcolor": "rgb(237,237,237)", + "ticklen": 6, + "ticks": "inside" + }, + "colorscale": [ + [ + 0, + "rgb(20,44,66)" + ], + [ + 1, + "rgb(90,179,244)" + ] + ], + "type": "heatmapgl" + } + ], + "histogram": [ + { + "marker": { + "pattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + } + }, + "type": "histogram" + } + ], + "histogram2d": [ + { + "colorbar": { + "outlinewidth": 0, + "tickcolor": "rgb(237,237,237)", + "ticklen": 6, + "ticks": "inside" + }, + "colorscale": [ + [ + 0, + "rgb(20,44,66)" + ], + [ + 1, + "rgb(90,179,244)" + ] + ], + "type": "histogram2d" + } + ], + "histogram2dcontour": [ + { + "colorbar": { + "outlinewidth": 0, + "tickcolor": "rgb(237,237,237)", + "ticklen": 6, + "ticks": "inside" + }, + "colorscale": [ + [ + 0, + "rgb(20,44,66)" + ], + [ + 1, + "rgb(90,179,244)" + ] + ], + "type": "histogram2dcontour" + } + ], + "mesh3d": [ + { + "colorbar": { + "outlinewidth": 0, + "tickcolor": "rgb(237,237,237)", + "ticklen": 6, + "ticks": "inside" + }, + "type": "mesh3d" + } + ], + "parcoords": [ + { + "line": { + "colorbar": { + "outlinewidth": 0, + "tickcolor": "rgb(237,237,237)", + "ticklen": 6, + "ticks": "inside" + } + }, + "type": "parcoords" + } + ], + "pie": [ + { + "automargin": true, + "type": "pie" + } + ], + "scatter": [ + { + "fillpattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + }, + "type": "scatter" + } + ], + "scatter3d": [ + { + "line": { + "colorbar": { + "outlinewidth": 0, + "tickcolor": "rgb(237,237,237)", + "ticklen": 6, + "ticks": "inside" + } + }, + "marker": { + "colorbar": { + "outlinewidth": 0, + "tickcolor": "rgb(237,237,237)", + "ticklen": 6, + "ticks": "inside" + } + }, + "type": "scatter3d" + } + ], + "scattercarpet": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "tickcolor": "rgb(237,237,237)", + "ticklen": 6, + "ticks": "inside" + } + }, + "type": "scattercarpet" + } + ], + "scattergeo": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "tickcolor": "rgb(237,237,237)", + "ticklen": 6, + "ticks": "inside" + } + }, + "type": "scattergeo" + } + ], + "scattergl": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "tickcolor": "rgb(237,237,237)", + "ticklen": 6, + "ticks": "inside" + } + }, + "type": "scattergl" + } + ], + "scattermapbox": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "tickcolor": "rgb(237,237,237)", + "ticklen": 6, + "ticks": "inside" + } + }, + "type": "scattermapbox" + } + ], + "scatterpolar": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "tickcolor": "rgb(237,237,237)", + "ticklen": 6, + "ticks": "inside" + } + }, + "type": "scatterpolar" + } + ], + "scatterpolargl": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "tickcolor": "rgb(237,237,237)", + "ticklen": 6, + "ticks": "inside" + } + }, + "type": "scatterpolargl" + } + ], + "scatterternary": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "tickcolor": "rgb(237,237,237)", + "ticklen": 6, + "ticks": "inside" + } + }, + "type": "scatterternary" + } + ], + "surface": [ + { + "colorbar": { + "outlinewidth": 0, + "tickcolor": "rgb(237,237,237)", + "ticklen": 6, + "ticks": "inside" + }, + "colorscale": [ + [ + 0, + "rgb(20,44,66)" + ], + [ + 1, + "rgb(90,179,244)" + ] + ], + "type": "surface" + } + ], + "table": [ + { + "cells": { + "fill": { + "color": "rgb(237,237,237)" + }, + "line": { + "color": "white" + } + }, + "header": { + "fill": { + "color": "rgb(217,217,217)" + }, + "line": { + "color": "white" + } + }, + "type": "table" + } + ] + }, + "layout": { + "annotationdefaults": { + "arrowhead": 0, + "arrowwidth": 1 + }, + "autotypenumbers": "strict", + "coloraxis": { + "colorbar": { + "outlinewidth": 0, + "tickcolor": "rgb(237,237,237)", + "ticklen": 6, + "ticks": "inside" + } + }, + "colorscale": { + "sequential": [ + [ + 0, + "rgb(20,44,66)" + ], + [ + 1, + "rgb(90,179,244)" + ] + ], + "sequentialminus": [ + [ + 0, + "rgb(20,44,66)" + ], + [ + 1, + "rgb(90,179,244)" + ] + ] + }, + "colorway": [ + "#F8766D", + "#A3A500", + "#00BF7D", + "#00B0F6", + "#E76BF3" + ], + "font": { + "color": "rgb(51,51,51)" + }, + "geo": { + "bgcolor": "white", + "lakecolor": "white", + "landcolor": "rgb(237,237,237)", + "showlakes": true, + "showland": true, + "subunitcolor": "white" + }, + "hoverlabel": { + "align": "left" + }, + "hovermode": "closest", + "paper_bgcolor": "white", + "plot_bgcolor": "rgb(237,237,237)", + "polar": { + "angularaxis": { + "gridcolor": "white", + "linecolor": "white", + "showgrid": true, + "tickcolor": "rgb(51,51,51)", + "ticks": "outside" + }, + "bgcolor": "rgb(237,237,237)", + "radialaxis": { + "gridcolor": "white", + "linecolor": "white", + "showgrid": true, + "tickcolor": "rgb(51,51,51)", + "ticks": "outside" + } + }, + "scene": { + "xaxis": { + "backgroundcolor": "rgb(237,237,237)", + "gridcolor": "white", + "gridwidth": 2, + "linecolor": "white", + "showbackground": true, + "showgrid": true, + "tickcolor": "rgb(51,51,51)", + "ticks": "outside", + "zerolinecolor": "white" + }, + "yaxis": { + "backgroundcolor": "rgb(237,237,237)", + "gridcolor": "white", + "gridwidth": 2, + "linecolor": "white", + "showbackground": true, + "showgrid": true, + "tickcolor": "rgb(51,51,51)", + "ticks": "outside", + "zerolinecolor": "white" + }, + "zaxis": { + "backgroundcolor": "rgb(237,237,237)", + "gridcolor": "white", + "gridwidth": 2, + "linecolor": "white", + "showbackground": true, + "showgrid": true, + "tickcolor": "rgb(51,51,51)", + "ticks": "outside", + "zerolinecolor": "white" + } + }, + "shapedefaults": { + "fillcolor": "black", + "line": { + "width": 0 + }, + "opacity": 0.3 + }, + "ternary": { + "aaxis": { + "gridcolor": "white", + "linecolor": "white", + "showgrid": true, + "tickcolor": "rgb(51,51,51)", + "ticks": "outside" + }, + "baxis": { + "gridcolor": "white", + "linecolor": "white", + "showgrid": true, + "tickcolor": "rgb(51,51,51)", + "ticks": "outside" + }, + "bgcolor": "rgb(237,237,237)", + "caxis": { + "gridcolor": "white", + "linecolor": "white", + "showgrid": true, + "tickcolor": "rgb(51,51,51)", + "ticks": "outside" + } + }, + "xaxis": { + "automargin": true, + "gridcolor": "white", + "linecolor": "white", + "showgrid": true, + "tickcolor": "rgb(51,51,51)", + "ticks": "outside", + "title": { + "standoff": 15 + }, + "zerolinecolor": "white" + }, + "yaxis": { + "automargin": true, + "gridcolor": "white", + "linecolor": "white", + "showgrid": true, + "tickcolor": "rgb(51,51,51)", + "ticks": "outside", + "title": { + "standoff": 15 + }, + "zerolinecolor": "white" + } + } + }, + "title": { + "text": "Actual vs. 'Out-of-Sample' Forecast | Number of airline passengers" + }, + "xaxis": { + "title": { + "text": "Time" + } + }, + "yaxis": { + "title": { + "text": "Values" + } + } + } + }, + "text/html": [ + "
" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "# 绘制预测图\n", + "plot_model(best, plot = 'forecast')" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "id": "6c5be2b7", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + " \n", + " " + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "application/vnd.plotly.v1+json": { + "config": { + "plotlyServerURL": "https://plotly.com" + }, + "data": [ + { + "line": { + "color": "#1f77b4" + }, + "marker": { + "size": 5 + }, + "mode": "lines+markers", + "name": "Forecast | ETS", + "showlegend": true, + "type": "scatter", + "x": [ + "1960-10-01T00:00:00", + "1960-11-01T00:00:00", + "1960-12-01T00:00:00", + "1961-01-01T00:00:00", + "1961-02-01T00:00:00", + "1961-03-01T00:00:00", + "1961-04-01T00:00:00", + "1961-05-01T00:00:00", + "1961-06-01T00:00:00", + "1961-07-01T00:00:00", + "1961-08-01T00:00:00", + "1961-09-01T00:00:00", + "1961-10-01T00:00:00", + "1961-11-01T00:00:00", + "1961-12-01T00:00:00", + "1962-01-01T00:00:00", + "1962-02-01T00:00:00", + "1962-03-01T00:00:00", + "1962-04-01T00:00:00", + "1962-05-01T00:00:00", + "1962-06-01T00:00:00", + "1962-07-01T00:00:00", + "1962-08-01T00:00:00", + "1962-09-01T00:00:00", + "1962-10-01T00:00:00", + "1962-11-01T00:00:00", + "1962-12-01T00:00:00", + "1963-01-01T00:00:00", + "1963-02-01T00:00:00", + "1963-03-01T00:00:00", + "1963-04-01T00:00:00", + "1963-05-01T00:00:00", + "1963-06-01T00:00:00", + "1963-07-01T00:00:00", + "1963-08-01T00:00:00", + "1963-09-01T00:00:00" + ], + "y": [ + 442.9862, + 388.2091, + 427.7009, + 440.8288, + 414.1672, + 460.3095, + 489.8045, + 500.616, + 567.9572, + 657.4233, + 648.7133, + 541.5307, + 472.1916, + 413.6633, + 455.5921, + 469.4208, + 440.8854, + 489.8456, + 521.0661, + 532.3985, + 603.8253, + 698.724, + 689.2546, + 575.1983, + 501.397, + 439.1175, + 483.4833, + 498.0127, + 467.6037, + 519.3818, + 552.3276, + 564.1811, + 639.6934, + 740.0248, + 729.7959, + 608.8659 + ] + }, + { + "line": { + "width": 0 + }, + "marker": { + "color": "#68BBE3" + }, + "mode": "lines", + "name": "Lower Interval", + "showlegend": false, + "type": "scatter", + "x": [ + "1960-10-01T00:00:00", + "1960-11-01T00:00:00", + "1960-12-01T00:00:00", + "1961-01-01T00:00:00", + "1961-02-01T00:00:00", + "1961-03-01T00:00:00", + "1961-04-01T00:00:00", + "1961-05-01T00:00:00", + "1961-06-01T00:00:00", + "1961-07-01T00:00:00", + "1961-08-01T00:00:00", + "1961-09-01T00:00:00", + "1961-10-01T00:00:00", + "1961-11-01T00:00:00", + "1961-12-01T00:00:00", + "1962-01-01T00:00:00", + "1962-02-01T00:00:00", + "1962-03-01T00:00:00", + "1962-04-01T00:00:00", + "1962-05-01T00:00:00", + "1962-06-01T00:00:00", + "1962-07-01T00:00:00", + "1962-08-01T00:00:00", + "1962-09-01T00:00:00", + "1962-10-01T00:00:00", + "1962-11-01T00:00:00", + "1962-12-01T00:00:00", + "1963-01-01T00:00:00", + "1963-02-01T00:00:00", + "1963-03-01T00:00:00", + "1963-04-01T00:00:00", + "1963-05-01T00:00:00", + "1963-06-01T00:00:00", + "1963-07-01T00:00:00", + "1963-08-01T00:00:00", + "1963-09-01T00:00:00" + ], + "y": [ + 424.9511, + 371.5726, + 409.45, + 422.3821, + 394.2024, + 440.0158, + 466.8642, + 476.9509, + 542.7137, + 628.0535, + 621.176, + 518.085, + 442.3006, + 387.6366, + 426.3442, + 441.6405, + 411.9389, + 458.1427, + 488.4728, + 497.6479, + 565.7008, + 657.7688, + 648.9213, + 540.1729, + 461.8621, + 403.95, + 447.4011, + 461.6135, + 430.7421, + 477.0225, + 507.1223, + 519.685, + 595.2369, + 689.7752, + 679.7743, + 563.4676 + ] + }, + { + "fill": "tonexty", + "fillcolor": "rgba(104,187,227,0.5)", + "line": { + "width": 0 + }, + "marker": { + "color": "#68BBE3" + }, + "mode": "lines", + "name": "Prediction Interval | ETS", + "showlegend": true, + "type": "scatter", + "x": [ + "1960-10-01T00:00:00", + "1960-11-01T00:00:00", + "1960-12-01T00:00:00", + "1961-01-01T00:00:00", + "1961-02-01T00:00:00", + "1961-03-01T00:00:00", + "1961-04-01T00:00:00", + "1961-05-01T00:00:00", + "1961-06-01T00:00:00", + "1961-07-01T00:00:00", + "1961-08-01T00:00:00", + "1961-09-01T00:00:00", + "1961-10-01T00:00:00", + "1961-11-01T00:00:00", + "1961-12-01T00:00:00", + "1962-01-01T00:00:00", + "1962-02-01T00:00:00", + "1962-03-01T00:00:00", + "1962-04-01T00:00:00", + "1962-05-01T00:00:00", + "1962-06-01T00:00:00", + "1962-07-01T00:00:00", + "1962-08-01T00:00:00", + "1962-09-01T00:00:00", + "1962-10-01T00:00:00", + "1962-11-01T00:00:00", + "1962-12-01T00:00:00", + "1963-01-01T00:00:00", + "1963-02-01T00:00:00", + "1963-03-01T00:00:00", + "1963-04-01T00:00:00", + "1963-05-01T00:00:00", + "1963-06-01T00:00:00", + "1963-07-01T00:00:00", + "1963-08-01T00:00:00", + "1963-09-01T00:00:00" + ], + "y": [ + 460.167, + 407.0492, + 446.7903, + 459.6397, + 434.062, + 482.5441, + 512.5627, + 525.19, + 594.7906, + 687.4621, + 676.7587, + 567.8426, + 503.6261, + 443.1601, + 487.0991, + 500.9924, + 469.8886, + 521.6775, + 554.4375, + 568.9595, + 643.2014, + 741.7039, + 732.6646, + 612.8775, + 539.8041, + 476.5502, + 521.9675, + 534.8244, + 504.4501, + 558.287, + 594.6478, + 610.3517, + 689.4034, + 793.9931, + 782.3682, + 655.0312 + ] + }, + { + "marker": { + "color": "#3f3f3f", + "size": 5 + }, + "mode": "lines+markers", + "name": "Original", + "showlegend": true, + "type": "scatter", + "x": [ + "1949-01-01T00:00:00", + "1949-02-01T00:00:00", + "1949-03-01T00:00:00", + "1949-04-01T00:00:00", + "1949-05-01T00:00:00", + "1949-06-01T00:00:00", + "1949-07-01T00:00:00", + "1949-08-01T00:00:00", + "1949-09-01T00:00:00", + "1949-10-01T00:00:00", + "1949-11-01T00:00:00", + "1949-12-01T00:00:00", + "1950-01-01T00:00:00", + "1950-02-01T00:00:00", + "1950-03-01T00:00:00", + "1950-04-01T00:00:00", + "1950-05-01T00:00:00", + "1950-06-01T00:00:00", + "1950-07-01T00:00:00", + "1950-08-01T00:00:00", + "1950-09-01T00:00:00", + "1950-10-01T00:00:00", + "1950-11-01T00:00:00", + "1950-12-01T00:00:00", + "1951-01-01T00:00:00", + "1951-02-01T00:00:00", + "1951-03-01T00:00:00", + "1951-04-01T00:00:00", + "1951-05-01T00:00:00", + "1951-06-01T00:00:00", + "1951-07-01T00:00:00", + "1951-08-01T00:00:00", + "1951-09-01T00:00:00", + "1951-10-01T00:00:00", + "1951-11-01T00:00:00", + "1951-12-01T00:00:00", + "1952-01-01T00:00:00", + "1952-02-01T00:00:00", + "1952-03-01T00:00:00", + "1952-04-01T00:00:00", + "1952-05-01T00:00:00", + "1952-06-01T00:00:00", + "1952-07-01T00:00:00", + "1952-08-01T00:00:00", + "1952-09-01T00:00:00", + "1952-10-01T00:00:00", + "1952-11-01T00:00:00", + "1952-12-01T00:00:00", + "1953-01-01T00:00:00", + "1953-02-01T00:00:00", + "1953-03-01T00:00:00", + "1953-04-01T00:00:00", + "1953-05-01T00:00:00", + "1953-06-01T00:00:00", + "1953-07-01T00:00:00", + "1953-08-01T00:00:00", + "1953-09-01T00:00:00", + "1953-10-01T00:00:00", + "1953-11-01T00:00:00", + "1953-12-01T00:00:00", + "1954-01-01T00:00:00", + "1954-02-01T00:00:00", + "1954-03-01T00:00:00", + "1954-04-01T00:00:00", + "1954-05-01T00:00:00", + "1954-06-01T00:00:00", + "1954-07-01T00:00:00", + "1954-08-01T00:00:00", + "1954-09-01T00:00:00", + "1954-10-01T00:00:00", + "1954-11-01T00:00:00", + "1954-12-01T00:00:00", + "1955-01-01T00:00:00", + "1955-02-01T00:00:00", + "1955-03-01T00:00:00", + "1955-04-01T00:00:00", + "1955-05-01T00:00:00", + "1955-06-01T00:00:00", + "1955-07-01T00:00:00", + "1955-08-01T00:00:00", + "1955-09-01T00:00:00", + "1955-10-01T00:00:00", + "1955-11-01T00:00:00", + "1955-12-01T00:00:00", + "1956-01-01T00:00:00", + "1956-02-01T00:00:00", + "1956-03-01T00:00:00", + "1956-04-01T00:00:00", + "1956-05-01T00:00:00", + "1956-06-01T00:00:00", + "1956-07-01T00:00:00", + "1956-08-01T00:00:00", + "1956-09-01T00:00:00", + "1956-10-01T00:00:00", + "1956-11-01T00:00:00", + "1956-12-01T00:00:00", + "1957-01-01T00:00:00", + "1957-02-01T00:00:00", + "1957-03-01T00:00:00", + "1957-04-01T00:00:00", + "1957-05-01T00:00:00", + "1957-06-01T00:00:00", + "1957-07-01T00:00:00", + "1957-08-01T00:00:00", + "1957-09-01T00:00:00", + "1957-10-01T00:00:00", + "1957-11-01T00:00:00", + "1957-12-01T00:00:00", + "1958-01-01T00:00:00", + "1958-02-01T00:00:00", + "1958-03-01T00:00:00", + "1958-04-01T00:00:00", + "1958-05-01T00:00:00", + "1958-06-01T00:00:00", + "1958-07-01T00:00:00", + "1958-08-01T00:00:00", + "1958-09-01T00:00:00", + "1958-10-01T00:00:00", + "1958-11-01T00:00:00", + "1958-12-01T00:00:00", + "1959-01-01T00:00:00", + "1959-02-01T00:00:00", + "1959-03-01T00:00:00", + "1959-04-01T00:00:00", + "1959-05-01T00:00:00", + "1959-06-01T00:00:00", + "1959-07-01T00:00:00", + "1959-08-01T00:00:00", + "1959-09-01T00:00:00", + "1959-10-01T00:00:00", + "1959-11-01T00:00:00", + "1959-12-01T00:00:00", + "1960-01-01T00:00:00", + "1960-02-01T00:00:00", + "1960-03-01T00:00:00", + "1960-04-01T00:00:00", + "1960-05-01T00:00:00", + "1960-06-01T00:00:00", + "1960-07-01T00:00:00", + "1960-08-01T00:00:00", + "1960-09-01T00:00:00", + "1960-10-01T00:00:00", + "1960-11-01T00:00:00", + "1960-12-01T00:00:00" + ], + "y": [ + 112, + 118, + 132, + 129, + 121, + 135, + 148, + 148, + 136, + 119, + 104, + 118, + 115, + 126, + 141, + 135, + 125, + 149, + 170, + 170, + 158, + 133, + 114, + 140, + 145, + 150, + 178, + 163, + 172, + 178, + 199, + 199, + 184, + 162, + 146, + 166, + 171, + 180, + 193, + 181, + 183, + 218, + 230, + 242, + 209, + 191, + 172, + 194, + 196, + 196, + 236, + 235, + 229, + 243, + 264, + 272, + 237, + 211, + 180, + 201, + 204, + 188, + 235, + 227, + 234, + 264, + 302, + 293, + 259, + 229, + 203, + 229, + 242, + 233, + 267, + 269, + 270, + 315, + 364, + 347, + 312, + 274, + 237, + 278, + 284, + 277, + 317, + 313, + 318, + 374, + 413, + 405, + 355, + 306, + 271, + 306, + 315, + 301, + 356, + 348, + 355, + 422, + 465, + 467, + 404, + 347, + 305, + 336, + 340, + 318, + 362, + 348, + 363, + 435, + 491, + 505, + 404, + 359, + 310, + 337, + 360, + 342, + 406, + 396, + 420, + 472, + 548, + 559, + 463, + 407, + 362, + 405, + 417, + 391, + 419, + 461, + 472, + 535, + 622, + 606, + 508, + 461, + 390, + 432 + ] + } + ], + "layout": { + "showlegend": true, + "template": { + "data": { + "bar": [ + { + "error_x": { + "color": "rgb(51,51,51)" + }, + "error_y": { + "color": "rgb(51,51,51)" + }, + "marker": { + "line": { + "color": "rgb(237,237,237)", + "width": 0.5 + }, + "pattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + } + }, + "type": "bar" + } + ], + "barpolar": [ + { + "marker": { + "line": { + "color": "rgb(237,237,237)", + "width": 0.5 + }, + "pattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + } + }, + "type": "barpolar" + } + ], + "carpet": [ + { + "aaxis": { + "endlinecolor": "rgb(51,51,51)", + "gridcolor": "white", + "linecolor": "white", + "minorgridcolor": "white", + "startlinecolor": "rgb(51,51,51)" + }, + "baxis": { + "endlinecolor": "rgb(51,51,51)", + "gridcolor": "white", + "linecolor": "white", + "minorgridcolor": "white", + "startlinecolor": "rgb(51,51,51)" + }, + "type": "carpet" + } + ], + "choropleth": [ + { + "colorbar": { + "outlinewidth": 0, + "tickcolor": "rgb(237,237,237)", + "ticklen": 6, + "ticks": "inside" + }, + "type": "choropleth" + } + ], + "contour": [ + { + "colorbar": { + "outlinewidth": 0, + "tickcolor": "rgb(237,237,237)", + "ticklen": 6, + "ticks": "inside" + }, + "colorscale": [ + [ + 0, + "rgb(20,44,66)" + ], + [ + 1, + "rgb(90,179,244)" + ] + ], + "type": "contour" + } + ], + "contourcarpet": [ + { + "colorbar": { + "outlinewidth": 0, + "tickcolor": "rgb(237,237,237)", + "ticklen": 6, + "ticks": "inside" + }, + "type": "contourcarpet" + } + ], + "heatmap": [ + { + "colorbar": { + "outlinewidth": 0, + "tickcolor": "rgb(237,237,237)", + "ticklen": 6, + "ticks": "inside" + }, + "colorscale": [ + [ + 0, + "rgb(20,44,66)" + ], + [ + 1, + "rgb(90,179,244)" + ] + ], + "type": "heatmap" + } + ], + "heatmapgl": [ + { + "colorbar": { + "outlinewidth": 0, + "tickcolor": "rgb(237,237,237)", + "ticklen": 6, + "ticks": "inside" + }, + "colorscale": [ + [ + 0, + "rgb(20,44,66)" + ], + [ + 1, + "rgb(90,179,244)" + ] + ], + "type": "heatmapgl" + } + ], + "histogram": [ + { + "marker": { + "pattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + } + }, + "type": "histogram" + } + ], + "histogram2d": [ + { + "colorbar": { + "outlinewidth": 0, + "tickcolor": "rgb(237,237,237)", + "ticklen": 6, + "ticks": "inside" + }, + "colorscale": [ + [ + 0, + "rgb(20,44,66)" + ], + [ + 1, + "rgb(90,179,244)" + ] + ], + "type": "histogram2d" + } + ], + "histogram2dcontour": [ + { + "colorbar": { + "outlinewidth": 0, + "tickcolor": "rgb(237,237,237)", + "ticklen": 6, + "ticks": "inside" + }, + "colorscale": [ + [ + 0, + "rgb(20,44,66)" + ], + [ + 1, + "rgb(90,179,244)" + ] + ], + "type": "histogram2dcontour" + } + ], + "mesh3d": [ + { + "colorbar": { + "outlinewidth": 0, + "tickcolor": "rgb(237,237,237)", + "ticklen": 6, + "ticks": "inside" + }, + "type": "mesh3d" + } + ], + "parcoords": [ + { + "line": { + "colorbar": { + "outlinewidth": 0, + "tickcolor": "rgb(237,237,237)", + "ticklen": 6, + "ticks": "inside" + } + }, + "type": "parcoords" + } + ], + "pie": [ + { + "automargin": true, + "type": "pie" + } + ], + "scatter": [ + { + "fillpattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + }, + "type": "scatter" + } + ], + "scatter3d": [ + { + "line": { + "colorbar": { + "outlinewidth": 0, + "tickcolor": "rgb(237,237,237)", + "ticklen": 6, + "ticks": "inside" + } + }, + "marker": { + "colorbar": { + "outlinewidth": 0, + "tickcolor": "rgb(237,237,237)", + "ticklen": 6, + "ticks": "inside" + } + }, + "type": "scatter3d" + } + ], + "scattercarpet": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "tickcolor": "rgb(237,237,237)", + "ticklen": 6, + "ticks": "inside" + } + }, + "type": "scattercarpet" + } + ], + "scattergeo": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "tickcolor": "rgb(237,237,237)", + "ticklen": 6, + "ticks": "inside" + } + }, + "type": "scattergeo" + } + ], + "scattergl": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "tickcolor": "rgb(237,237,237)", + "ticklen": 6, + "ticks": "inside" + } + }, + "type": "scattergl" + } + ], + "scattermapbox": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "tickcolor": "rgb(237,237,237)", + "ticklen": 6, + "ticks": "inside" + } + }, + "type": "scattermapbox" + } + ], + "scatterpolar": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "tickcolor": "rgb(237,237,237)", + "ticklen": 6, + "ticks": "inside" + } + }, + "type": "scatterpolar" + } + ], + "scatterpolargl": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "tickcolor": "rgb(237,237,237)", + "ticklen": 6, + "ticks": "inside" + } + }, + "type": "scatterpolargl" + } + ], + "scatterternary": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "tickcolor": "rgb(237,237,237)", + "ticklen": 6, + "ticks": "inside" + } + }, + "type": "scatterternary" + } + ], + "surface": [ + { + "colorbar": { + "outlinewidth": 0, + "tickcolor": "rgb(237,237,237)", + "ticklen": 6, + "ticks": "inside" + }, + "colorscale": [ + [ + 0, + "rgb(20,44,66)" + ], + [ + 1, + "rgb(90,179,244)" + ] + ], + "type": "surface" + } + ], + "table": [ + { + "cells": { + "fill": { + "color": "rgb(237,237,237)" + }, + "line": { + "color": "white" + } + }, + "header": { + "fill": { + "color": "rgb(217,217,217)" + }, + "line": { + "color": "white" + } + }, + "type": "table" + } + ] + }, + "layout": { + "annotationdefaults": { + "arrowhead": 0, + "arrowwidth": 1 + }, + "autotypenumbers": "strict", + "coloraxis": { + "colorbar": { + "outlinewidth": 0, + "tickcolor": "rgb(237,237,237)", + "ticklen": 6, + "ticks": "inside" + } + }, + "colorscale": { + "sequential": [ + [ + 0, + "rgb(20,44,66)" + ], + [ + 1, + "rgb(90,179,244)" + ] + ], + "sequentialminus": [ + [ + 0, + "rgb(20,44,66)" + ], + [ + 1, + "rgb(90,179,244)" + ] + ] + }, + "colorway": [ + "#F8766D", + "#A3A500", + "#00BF7D", + "#00B0F6", + "#E76BF3" + ], + "font": { + "color": "rgb(51,51,51)" + }, + "geo": { + "bgcolor": "white", + "lakecolor": "white", + "landcolor": "rgb(237,237,237)", + "showlakes": true, + "showland": true, + "subunitcolor": "white" + }, + "hoverlabel": { + "align": "left" + }, + "hovermode": "closest", + "paper_bgcolor": "white", + "plot_bgcolor": "rgb(237,237,237)", + "polar": { + "angularaxis": { + "gridcolor": "white", + "linecolor": "white", + "showgrid": true, + "tickcolor": "rgb(51,51,51)", + "ticks": "outside" + }, + "bgcolor": "rgb(237,237,237)", + "radialaxis": { + "gridcolor": "white", + "linecolor": "white", + "showgrid": true, + "tickcolor": "rgb(51,51,51)", + "ticks": "outside" + } + }, + "scene": { + "xaxis": { + "backgroundcolor": "rgb(237,237,237)", + "gridcolor": "white", + "gridwidth": 2, + "linecolor": "white", + "showbackground": true, + "showgrid": true, + "tickcolor": "rgb(51,51,51)", + "ticks": "outside", + "zerolinecolor": "white" + }, + "yaxis": { + "backgroundcolor": "rgb(237,237,237)", + "gridcolor": "white", + "gridwidth": 2, + "linecolor": "white", + "showbackground": true, + "showgrid": true, + "tickcolor": "rgb(51,51,51)", + "ticks": "outside", + "zerolinecolor": "white" + }, + "zaxis": { + "backgroundcolor": "rgb(237,237,237)", + "gridcolor": "white", + "gridwidth": 2, + "linecolor": "white", + "showbackground": true, + "showgrid": true, + "tickcolor": "rgb(51,51,51)", + "ticks": "outside", + "zerolinecolor": "white" + } + }, + "shapedefaults": { + "fillcolor": "black", + "line": { + "width": 0 + }, + "opacity": 0.3 + }, + "ternary": { + "aaxis": { + "gridcolor": "white", + "linecolor": "white", + "showgrid": true, + "tickcolor": "rgb(51,51,51)", + "ticks": "outside" + }, + "baxis": { + "gridcolor": "white", + "linecolor": "white", + "showgrid": true, + "tickcolor": "rgb(51,51,51)", + "ticks": "outside" + }, + "bgcolor": "rgb(237,237,237)", + "caxis": { + "gridcolor": "white", + "linecolor": "white", + "showgrid": true, + "tickcolor": "rgb(51,51,51)", + "ticks": "outside" + } + }, + "xaxis": { + "automargin": true, + "gridcolor": "white", + "linecolor": "white", + "showgrid": true, + "tickcolor": "rgb(51,51,51)", + "ticks": "outside", + "title": { + "standoff": 15 + }, + "zerolinecolor": "white" + }, + "yaxis": { + "automargin": true, + "gridcolor": "white", + "linecolor": "white", + "showgrid": true, + "tickcolor": "rgb(51,51,51)", + "ticks": "outside", + "title": { + "standoff": 15 + }, + "zerolinecolor": "white" + } + } + }, + "title": { + "text": "Actual vs. 'Out-of-Sample' Forecast | Number of airline passengers" + }, + "xaxis": { + "title": { + "text": "Time" + } + }, + "yaxis": { + "title": { + "text": "Values" + } + } + } + }, + "text/html": [ + "
" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "# 绘制预测未来36个月的预测结果\n", + "plot_model(best, plot = 'forecast', data_kwargs = {'fh' : 36})" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "id": "9fc4b9b1", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + " \n", + " " + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "application/vnd.plotly.v1+json": { + "config": { + "plotlyServerURL": "https://plotly.com" + }, + "data": [ + { + "line": { + "color": "rgb(31, 119, 180)", + "width": 2 + }, + "marker": { + "color": "rgb(31, 119, 180)", + "size": 5 + }, + "mode": "lines+markers", + "name": "Number of airline passengers", + "type": "scattergl", + "x": [ + "1949-01-01T00:00:00", + "1949-02-01T00:00:00", + "1949-03-01T00:00:00", + "1949-04-01T00:00:00", + "1949-05-01T00:00:00", + "1949-06-01T00:00:00", + "1949-07-01T00:00:00", + "1949-08-01T00:00:00", + "1949-09-01T00:00:00", + "1949-10-01T00:00:00", + "1949-11-01T00:00:00", + "1949-12-01T00:00:00", + "1950-01-01T00:00:00", + "1950-02-01T00:00:00", + "1950-03-01T00:00:00", + "1950-04-01T00:00:00", + "1950-05-01T00:00:00", + "1950-06-01T00:00:00", + "1950-07-01T00:00:00", + "1950-08-01T00:00:00", + "1950-09-01T00:00:00", + "1950-10-01T00:00:00", + "1950-11-01T00:00:00", + "1950-12-01T00:00:00", + "1951-01-01T00:00:00", + "1951-02-01T00:00:00", + "1951-03-01T00:00:00", + "1951-04-01T00:00:00", + "1951-05-01T00:00:00", + "1951-06-01T00:00:00", + "1951-07-01T00:00:00", + "1951-08-01T00:00:00", + "1951-09-01T00:00:00", + "1951-10-01T00:00:00", + "1951-11-01T00:00:00", + "1951-12-01T00:00:00", + "1952-01-01T00:00:00", + "1952-02-01T00:00:00", + "1952-03-01T00:00:00", + "1952-04-01T00:00:00", + "1952-05-01T00:00:00", + "1952-06-01T00:00:00", + "1952-07-01T00:00:00", + "1952-08-01T00:00:00", + "1952-09-01T00:00:00", + "1952-10-01T00:00:00", + "1952-11-01T00:00:00", + "1952-12-01T00:00:00", + "1953-01-01T00:00:00", + "1953-02-01T00:00:00", + "1953-03-01T00:00:00", + "1953-04-01T00:00:00", + "1953-05-01T00:00:00", + "1953-06-01T00:00:00", + "1953-07-01T00:00:00", + "1953-08-01T00:00:00", + "1953-09-01T00:00:00", + "1953-10-01T00:00:00", + "1953-11-01T00:00:00", + "1953-12-01T00:00:00", + "1954-01-01T00:00:00", + "1954-02-01T00:00:00", + "1954-03-01T00:00:00", + "1954-04-01T00:00:00", + "1954-05-01T00:00:00", + "1954-06-01T00:00:00", + "1954-07-01T00:00:00", + "1954-08-01T00:00:00", + "1954-09-01T00:00:00", + "1954-10-01T00:00:00", + "1954-11-01T00:00:00", + "1954-12-01T00:00:00", + "1955-01-01T00:00:00", + "1955-02-01T00:00:00", + "1955-03-01T00:00:00", + "1955-04-01T00:00:00", + "1955-05-01T00:00:00", + "1955-06-01T00:00:00", + "1955-07-01T00:00:00", + "1955-08-01T00:00:00", + "1955-09-01T00:00:00", + "1955-10-01T00:00:00", + "1955-11-01T00:00:00", + "1955-12-01T00:00:00", + "1956-01-01T00:00:00", + "1956-02-01T00:00:00", + "1956-03-01T00:00:00", + "1956-04-01T00:00:00", + "1956-05-01T00:00:00", + "1956-06-01T00:00:00", + "1956-07-01T00:00:00", + "1956-08-01T00:00:00", + "1956-09-01T00:00:00", + "1956-10-01T00:00:00", + "1956-11-01T00:00:00", + "1956-12-01T00:00:00", + "1957-01-01T00:00:00", + "1957-02-01T00:00:00", + "1957-03-01T00:00:00", + "1957-04-01T00:00:00", + "1957-05-01T00:00:00", + "1957-06-01T00:00:00", + "1957-07-01T00:00:00", + "1957-08-01T00:00:00", + "1957-09-01T00:00:00", + "1957-10-01T00:00:00", + "1957-11-01T00:00:00", + "1957-12-01T00:00:00", + "1958-01-01T00:00:00", + "1958-02-01T00:00:00", + "1958-03-01T00:00:00", + "1958-04-01T00:00:00", + "1958-05-01T00:00:00", + "1958-06-01T00:00:00", + "1958-07-01T00:00:00", + "1958-08-01T00:00:00", + "1958-09-01T00:00:00", + "1958-10-01T00:00:00", + "1958-11-01T00:00:00", + "1958-12-01T00:00:00", + "1959-01-01T00:00:00", + "1959-02-01T00:00:00", + "1959-03-01T00:00:00", + "1959-04-01T00:00:00", + "1959-05-01T00:00:00", + "1959-06-01T00:00:00", + "1959-07-01T00:00:00", + "1959-08-01T00:00:00", + "1959-09-01T00:00:00", + "1959-10-01T00:00:00", + "1959-11-01T00:00:00", + "1959-12-01T00:00:00", + "1960-01-01T00:00:00", + "1960-02-01T00:00:00", + "1960-03-01T00:00:00", + "1960-04-01T00:00:00", + "1960-05-01T00:00:00", + "1960-06-01T00:00:00", + "1960-07-01T00:00:00", + "1960-08-01T00:00:00", + "1960-09-01T00:00:00", + "1960-10-01T00:00:00", + "1960-11-01T00:00:00", + "1960-12-01T00:00:00" + ], + "xaxis": "x", + "y": [ + 112, + 118, + 132, + 129, + 121, + 135, + 148, + 148, + 136, + 119, + 104, + 118, + 115, + 126, + 141, + 135, + 125, + 149, + 170, + 170, + 158, + 133, + 114, + 140, + 145, + 150, + 178, + 163, + 172, + 178, + 199, + 199, + 184, + 162, + 146, + 166, + 171, + 180, + 193, + 181, + 183, + 218, + 230, + 242, + 209, + 191, + 172, + 194, + 196, + 196, + 236, + 235, + 229, + 243, + 264, + 272, + 237, + 211, + 180, + 201, + 204, + 188, + 235, + 227, + 234, + 264, + 302, + 293, + 259, + 229, + 203, + 229, + 242, + 233, + 267, + 269, + 270, + 315, + 364, + 347, + 312, + 274, + 237, + 278, + 284, + 277, + 317, + 313, + 318, + 374, + 413, + 405, + 355, + 306, + 271, + 306, + 315, + 301, + 356, + 348, + 355, + 422, + 465, + 467, + 404, + 347, + 305, + 336, + 340, + 318, + 362, + 348, + 363, + 435, + 491, + 505, + 404, + 359, + 310, + 337, + 360, + 342, + 406, + 396, + 420, + 472, + 548, + 559, + 463, + 407, + 362, + 405, + 417, + 391, + 419, + 461, + 472, + 535, + 622, + 606, + 508, + 461, + 390, + 432 + ], + "yaxis": "y" + }, + { + "line": { + "color": "rgb(255, 127, 14)", + "width": 2 + }, + "marker": { + "color": "rgb(255, 127, 14)", + "size": 5 + }, + "mode": "lines+markers", + "name": "ETS", + "type": "scattergl", + "x": [ + "1949-01-01T00:00:00", + "1949-02-01T00:00:00", + "1949-03-01T00:00:00", + "1949-04-01T00:00:00", + "1949-05-01T00:00:00", + "1949-06-01T00:00:00", + "1949-07-01T00:00:00", + "1949-08-01T00:00:00", + "1949-09-01T00:00:00", + "1949-10-01T00:00:00", + "1949-11-01T00:00:00", + "1949-12-01T00:00:00", + "1950-01-01T00:00:00", + "1950-02-01T00:00:00", + "1950-03-01T00:00:00", + "1950-04-01T00:00:00", + "1950-05-01T00:00:00", + "1950-06-01T00:00:00", + "1950-07-01T00:00:00", + "1950-08-01T00:00:00", + "1950-09-01T00:00:00", + "1950-10-01T00:00:00", + "1950-11-01T00:00:00", + "1950-12-01T00:00:00", + "1951-01-01T00:00:00", + "1951-02-01T00:00:00", + "1951-03-01T00:00:00", + "1951-04-01T00:00:00", + "1951-05-01T00:00:00", + "1951-06-01T00:00:00", + "1951-07-01T00:00:00", + "1951-08-01T00:00:00", + "1951-09-01T00:00:00", + "1951-10-01T00:00:00", + "1951-11-01T00:00:00", + "1951-12-01T00:00:00", + "1952-01-01T00:00:00", + "1952-02-01T00:00:00", + "1952-03-01T00:00:00", + "1952-04-01T00:00:00", + "1952-05-01T00:00:00", + "1952-06-01T00:00:00", + "1952-07-01T00:00:00", + "1952-08-01T00:00:00", + "1952-09-01T00:00:00", + "1952-10-01T00:00:00", + "1952-11-01T00:00:00", + "1952-12-01T00:00:00", + "1953-01-01T00:00:00", + "1953-02-01T00:00:00", + "1953-03-01T00:00:00", + "1953-04-01T00:00:00", + "1953-05-01T00:00:00", + "1953-06-01T00:00:00", + "1953-07-01T00:00:00", + "1953-08-01T00:00:00", + "1953-09-01T00:00:00", + "1953-10-01T00:00:00", + "1953-11-01T00:00:00", + "1953-12-01T00:00:00", + "1954-01-01T00:00:00", + "1954-02-01T00:00:00", + "1954-03-01T00:00:00", + "1954-04-01T00:00:00", + "1954-05-01T00:00:00", + "1954-06-01T00:00:00", + "1954-07-01T00:00:00", + "1954-08-01T00:00:00", + "1954-09-01T00:00:00", + "1954-10-01T00:00:00", + "1954-11-01T00:00:00", + "1954-12-01T00:00:00", + "1955-01-01T00:00:00", + "1955-02-01T00:00:00", + "1955-03-01T00:00:00", + "1955-04-01T00:00:00", + "1955-05-01T00:00:00", + "1955-06-01T00:00:00", + "1955-07-01T00:00:00", + "1955-08-01T00:00:00", + "1955-09-01T00:00:00", + "1955-10-01T00:00:00", + "1955-11-01T00:00:00", + "1955-12-01T00:00:00", + "1956-01-01T00:00:00", + "1956-02-01T00:00:00", + "1956-03-01T00:00:00", + "1956-04-01T00:00:00", + "1956-05-01T00:00:00", + "1956-06-01T00:00:00", + "1956-07-01T00:00:00", + "1956-08-01T00:00:00", + "1956-09-01T00:00:00", + "1956-10-01T00:00:00", + "1956-11-01T00:00:00", + "1956-12-01T00:00:00", + "1957-01-01T00:00:00", + "1957-02-01T00:00:00", + "1957-03-01T00:00:00", + "1957-04-01T00:00:00", + "1957-05-01T00:00:00", + "1957-06-01T00:00:00", + "1957-07-01T00:00:00", + "1957-08-01T00:00:00", + "1957-09-01T00:00:00", + "1957-10-01T00:00:00", + "1957-11-01T00:00:00", + "1957-12-01T00:00:00", + "1958-01-01T00:00:00", + "1958-02-01T00:00:00", + "1958-03-01T00:00:00", + "1958-04-01T00:00:00", + "1958-05-01T00:00:00", + "1958-06-01T00:00:00", + "1958-07-01T00:00:00", + "1958-08-01T00:00:00", + "1958-09-01T00:00:00", + "1958-10-01T00:00:00", + "1958-11-01T00:00:00", + "1958-12-01T00:00:00", + "1959-01-01T00:00:00", + "1959-02-01T00:00:00", + "1959-03-01T00:00:00", + "1959-04-01T00:00:00", + "1959-05-01T00:00:00", + "1959-06-01T00:00:00", + "1959-07-01T00:00:00", + "1959-08-01T00:00:00", + "1959-09-01T00:00:00", + "1959-10-01T00:00:00", + "1959-11-01T00:00:00", + "1959-12-01T00:00:00", + "1960-01-01T00:00:00", + "1960-02-01T00:00:00", + "1960-03-01T00:00:00", + "1960-04-01T00:00:00", + "1960-05-01T00:00:00", + "1960-06-01T00:00:00", + "1960-07-01T00:00:00", + "1960-08-01T00:00:00", + "1960-09-01T00:00:00", + "1960-10-01T00:00:00", + "1960-11-01T00:00:00", + "1960-12-01T00:00:00" + ], + "xaxis": "x", + "y": [ + 0.5999000000000052, + -2.1293000000000006, + -2.765199999999993, + -1.4716999999999985, + -2.7787000000000006, + -2.0498000000000047, + -3.3649000000000058, + -3.4949000000000012, + -3.8529000000000053, + -4.464200000000005, + -6.406000000000006, + -8.676299999999998, + -14.42779999999999, + -6.138299999999987, + -5.300900000000013, + -6.441699999999997, + -6.585100000000011, + 4.155300000000011, + 8.721000000000004, + 4.970499999999987, + 3.774000000000001, + -4.397099999999995, + -7.053700000000006, + 2.3788000000000125, + 4.8770000000000095, + -6.09729999999999, + 4.261500000000012, + -6.673300000000012, + 14.869400000000013, + -11.187900000000013, + -7.8825999999999965, + -3.0745000000000005, + -0.973700000000008, + 4.605899999999991, + 7.251499999999993, + -4.661599999999993, + -1.4935999999999865, + -0.8351000000000113, + -17.891899999999993, + -9.824999999999989, + -6.737300000000005, + 17.973700000000008, + -2.116199999999992, + 10.363900000000001, + -7.975999999999999, + 4.922500000000014, + 6.303200000000004, + 0.7236000000000047, + -3.1952, + -12.436200000000014, + 9.397600000000011, + 17.114100000000008, + 1.3780999999999892, + -17.744100000000003, + -7.2952000000000226, + -5.210899999999981, + -5.018100000000004, + -5.338099999999997, + -10.466800000000006, + -10.091700000000003, + -7.22999999999999, + -25.662499999999994, + -6.81389999999999, + -4.986099999999993, + 8.699600000000004, + 14.877800000000008, + 24.818499999999972, + -2.2287999999999784, + 0.8301999999999907, + -2.807700000000011, + 2.1097000000000037, + 0.7752000000000123, + 8.099199999999996, + 4.686399999999992, + -19.8673, + -3.1207999999999743, + -4.183499999999981, + 14.0043, + 25.577099999999973, + 7.800299999999993, + 10.949599999999975, + 3.696900000000028, + -2.0392999999999972, + 9.63760000000002, + 1.419300000000021, + 6.3827, + -4.655599999999993, + -8.606800000000021, + -3.2110000000000127, + 8.353200000000015, + -1.0260000000000105, + 12.468500000000006, + 3.341099999999983, + -2.6345000000000027, + 3.8202999999999747, + -3.828700000000026, + -0.22320000000001983, + -3.3514999999999873, + 6.492000000000019, + -2.2993000000000166, + -0.4925999999999817, + 8.60669999999999, + 4.501199999999983, + 20.193600000000004, + 7.485299999999995, + 1.9603999999999928, + 1.102700000000027, + -9.387099999999975, + -11.875699999999995, + -15.792500000000018, + -23.24029999999999, + -22.587400000000002, + -7.464999999999975, + 1.309000000000026, + 13.850900000000024, + 29.694200000000023, + -13.681300000000022, + 4.402300000000025, + -2.5597999999999956, + -10.299800000000005, + 7.947400000000016, + 4.838000000000022, + 12.401999999999987, + 6.258800000000008, + 10.433499999999981, + -21.01679999999999, + 5.833999999999946, + 12.27679999999998, + 14.609300000000019, + 7.737199999999973, + 13.811199999999985, + 17.502200000000016, + 2.204999999999984, + -1.8133000000000266, + -40.91890000000001, + 27.346299999999985, + 7.155899999999974, + -0.021299999999996544, + 6.196299999999951, + -18.645999999999958, + 1.6895000000000095, + null, + null, + null + ], + "yaxis": "y" + } + ], + "layout": { + "showlegend": true, + "template": { + "data": { + "bar": [ + { + "error_x": { + "color": "rgb(51,51,51)" + }, + "error_y": { + "color": "rgb(51,51,51)" + }, + "marker": { + "line": { + "color": "rgb(237,237,237)", + "width": 0.5 + }, + "pattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + } + }, + "type": "bar" + } + ], + "barpolar": [ + { + "marker": { + "line": { + "color": "rgb(237,237,237)", + "width": 0.5 + }, + "pattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + } + }, + "type": "barpolar" + } + ], + "carpet": [ + { + "aaxis": { + "endlinecolor": "rgb(51,51,51)", + "gridcolor": "white", + "linecolor": "white", + "minorgridcolor": "white", + "startlinecolor": "rgb(51,51,51)" + }, + "baxis": { + "endlinecolor": "rgb(51,51,51)", + "gridcolor": "white", + "linecolor": "white", + "minorgridcolor": "white", + "startlinecolor": "rgb(51,51,51)" + }, + "type": "carpet" + } + ], + "choropleth": [ + { + "colorbar": { + "outlinewidth": 0, + "tickcolor": "rgb(237,237,237)", + "ticklen": 6, + "ticks": "inside" + }, + "type": "choropleth" + } + ], + "contour": [ + { + "colorbar": { + "outlinewidth": 0, + "tickcolor": "rgb(237,237,237)", + "ticklen": 6, + "ticks": "inside" + }, + "colorscale": [ + [ + 0, + "rgb(20,44,66)" + ], + [ + 1, + "rgb(90,179,244)" + ] + ], + "type": "contour" + } + ], + "contourcarpet": [ + { + "colorbar": { + "outlinewidth": 0, + "tickcolor": "rgb(237,237,237)", + "ticklen": 6, + "ticks": "inside" + }, + "type": "contourcarpet" + } + ], + "heatmap": [ + { + "colorbar": { + "outlinewidth": 0, + "tickcolor": "rgb(237,237,237)", + "ticklen": 6, + "ticks": "inside" + }, + "colorscale": [ + [ + 0, + "rgb(20,44,66)" + ], + [ + 1, + "rgb(90,179,244)" + ] + ], + "type": "heatmap" + } + ], + "heatmapgl": [ + { + "colorbar": { + "outlinewidth": 0, + "tickcolor": "rgb(237,237,237)", + "ticklen": 6, + "ticks": "inside" + }, + "colorscale": [ + [ + 0, + "rgb(20,44,66)" + ], + [ + 1, + "rgb(90,179,244)" + ] + ], + "type": "heatmapgl" + } + ], + "histogram": [ + { + "marker": { + "pattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + } + }, + "type": "histogram" + } + ], + "histogram2d": [ + { + "colorbar": { + "outlinewidth": 0, + "tickcolor": "rgb(237,237,237)", + "ticklen": 6, + "ticks": "inside" + }, + "colorscale": [ + [ + 0, + "rgb(20,44,66)" + ], + [ + 1, + "rgb(90,179,244)" + ] + ], + "type": "histogram2d" + } + ], + "histogram2dcontour": [ + { + "colorbar": { + "outlinewidth": 0, + "tickcolor": "rgb(237,237,237)", + "ticklen": 6, + "ticks": "inside" + }, + "colorscale": [ + [ + 0, + "rgb(20,44,66)" + ], + [ + 1, + "rgb(90,179,244)" + ] + ], + "type": "histogram2dcontour" + } + ], + "mesh3d": [ + { + "colorbar": { + "outlinewidth": 0, + "tickcolor": "rgb(237,237,237)", + "ticklen": 6, + "ticks": "inside" + }, + "type": "mesh3d" + } + ], + "parcoords": [ + { + "line": { + "colorbar": { + "outlinewidth": 0, + "tickcolor": "rgb(237,237,237)", + "ticklen": 6, + "ticks": "inside" + } + }, + "type": "parcoords" + } + ], + "pie": [ + { + "automargin": true, + "type": "pie" + } + ], + "scatter": [ + { + "fillpattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + }, + "type": "scatter" + } + ], + "scatter3d": [ + { + "line": { + "colorbar": { + "outlinewidth": 0, + "tickcolor": "rgb(237,237,237)", + "ticklen": 6, + "ticks": "inside" + } + }, + "marker": { + "colorbar": { + "outlinewidth": 0, + "tickcolor": "rgb(237,237,237)", + "ticklen": 6, + "ticks": "inside" + } + }, + "type": "scatter3d" + } + ], + "scattercarpet": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "tickcolor": "rgb(237,237,237)", + "ticklen": 6, + "ticks": "inside" + } + }, + "type": "scattercarpet" + } + ], + "scattergeo": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "tickcolor": "rgb(237,237,237)", + "ticklen": 6, + "ticks": "inside" + } + }, + "type": "scattergeo" + } + ], + "scattergl": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "tickcolor": "rgb(237,237,237)", + "ticklen": 6, + "ticks": "inside" + } + }, + "type": "scattergl" + } + ], + "scattermapbox": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "tickcolor": "rgb(237,237,237)", + "ticklen": 6, + "ticks": "inside" + } + }, + "type": "scattermapbox" + } + ], + "scatterpolar": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "tickcolor": "rgb(237,237,237)", + "ticklen": 6, + "ticks": "inside" + } + }, + "type": "scatterpolar" + } + ], + "scatterpolargl": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "tickcolor": "rgb(237,237,237)", + "ticklen": 6, + "ticks": "inside" + } + }, + "type": "scatterpolargl" + } + ], + "scatterternary": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "tickcolor": "rgb(237,237,237)", + "ticklen": 6, + "ticks": "inside" + } + }, + "type": "scatterternary" + } + ], + "surface": [ + { + "colorbar": { + "outlinewidth": 0, + "tickcolor": "rgb(237,237,237)", + "ticklen": 6, + "ticks": "inside" + }, + "colorscale": [ + [ + 0, + "rgb(20,44,66)" + ], + [ + 1, + "rgb(90,179,244)" + ] + ], + "type": "surface" + } + ], + "table": [ + { + "cells": { + "fill": { + "color": "rgb(237,237,237)" + }, + "line": { + "color": "white" + } + }, + "header": { + "fill": { + "color": "rgb(217,217,217)" + }, + "line": { + "color": "white" + } + }, + "type": "table" + } + ] + }, + "layout": { + "annotationdefaults": { + "arrowhead": 0, + "arrowwidth": 1 + }, + "autotypenumbers": "strict", + "coloraxis": { + "colorbar": { + "outlinewidth": 0, + "tickcolor": "rgb(237,237,237)", + "ticklen": 6, + "ticks": "inside" + } + }, + "colorscale": { + "sequential": [ + [ + 0, + "rgb(20,44,66)" + ], + [ + 1, + "rgb(90,179,244)" + ] + ], + "sequentialminus": [ + [ + 0, + "rgb(20,44,66)" + ], + [ + 1, + "rgb(90,179,244)" + ] + ] + }, + "colorway": [ + "#F8766D", + "#A3A500", + "#00BF7D", + "#00B0F6", + "#E76BF3" + ], + "font": { + "color": "rgb(51,51,51)" + }, + "geo": { + "bgcolor": "white", + "lakecolor": "white", + "landcolor": "rgb(237,237,237)", + "showlakes": true, + "showland": true, + "subunitcolor": "white" + }, + "hoverlabel": { + "align": "left" + }, + "hovermode": "closest", + "paper_bgcolor": "white", + "plot_bgcolor": "rgb(237,237,237)", + "polar": { + "angularaxis": { + "gridcolor": "white", + "linecolor": "white", + "showgrid": true, + "tickcolor": "rgb(51,51,51)", + "ticks": "outside" + }, + "bgcolor": "rgb(237,237,237)", + "radialaxis": { + "gridcolor": "white", + "linecolor": "white", + "showgrid": true, + "tickcolor": "rgb(51,51,51)", + "ticks": "outside" + } + }, + "scene": { + "xaxis": { + "backgroundcolor": "rgb(237,237,237)", + "gridcolor": "white", + "gridwidth": 2, + "linecolor": "white", + "showbackground": true, + "showgrid": true, + "tickcolor": "rgb(51,51,51)", + "ticks": "outside", + "zerolinecolor": "white" + }, + "yaxis": { + "backgroundcolor": "rgb(237,237,237)", + "gridcolor": "white", + "gridwidth": 2, + "linecolor": "white", + "showbackground": true, + "showgrid": true, + "tickcolor": "rgb(51,51,51)", + "ticks": "outside", + "zerolinecolor": "white" + }, + "zaxis": { + "backgroundcolor": "rgb(237,237,237)", + "gridcolor": "white", + "gridwidth": 2, + "linecolor": "white", + "showbackground": true, + "showgrid": true, + "tickcolor": "rgb(51,51,51)", + "ticks": "outside", + "zerolinecolor": "white" + } + }, + "shapedefaults": { + "fillcolor": "black", + "line": { + "width": 0 + }, + "opacity": 0.3 + }, + "ternary": { + "aaxis": { + "gridcolor": "white", + "linecolor": "white", + "showgrid": true, + "tickcolor": "rgb(51,51,51)", + "ticks": "outside" + }, + "baxis": { + "gridcolor": "white", + "linecolor": "white", + "showgrid": true, + "tickcolor": "rgb(51,51,51)", + "ticks": "outside" + }, + "bgcolor": "rgb(237,237,237)", + "caxis": { + "gridcolor": "white", + "linecolor": "white", + "showgrid": true, + "tickcolor": "rgb(51,51,51)", + "ticks": "outside" + } + }, + "xaxis": { + "automargin": true, + "gridcolor": "white", + "linecolor": "white", + "showgrid": true, + "tickcolor": "rgb(51,51,51)", + "ticks": "outside", + "title": { + "standoff": 15 + }, + "zerolinecolor": "white" + }, + "yaxis": { + "automargin": true, + "gridcolor": "white", + "linecolor": "white", + "showgrid": true, + "tickcolor": "rgb(51,51,51)", + "ticks": "outside", + "title": { + "standoff": 15 + }, + "zerolinecolor": "white" + } + } + }, + "title": { + "text": "Actual vs. Residuals" + }, + "xaxis": { + "anchor": "y", + "domain": [ + 0, + 1 + ] + }, + "yaxis": { + "anchor": "x", + "domain": [ + 0, + 1 + ] + } + } + }, + "text/html": [ + "
" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "# 残差图\n", + "plot_model(best, plot = 'residuals')" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "id": "da718984", + "metadata": {}, + "outputs": [], + "source": [ + "#查看所有可以绘制的图\n", + "#help(plot_model)" + ] + }, + { + "cell_type": "markdown", + "id": "6bd66179", + "metadata": {}, + "source": [ + "`plot_model` 函数的替代方法是 `evaluate_model`。 它只能在jupyter notebook中使用,因为它使用了 ipywidget。" + ] + }, + { + "cell_type": "markdown", + "id": "954cbeff", + "metadata": {}, + "source": [ + "## Prediction\n", + " \n", + "`predict_model` 函数返回 `y_pred`。 当data参数为“None”(默认)时,它使用“setup”函数中定义的“fh”。" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "id": "87c1a007", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
 ModelMASERMSSEMAERMSEMAPESMAPER2
0ETS0.25160.29628.034610.74220.01790.01820.8642
\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "# 对测试进行预测\n", + "holdout_pred = predict_model(best)" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "id": "5c01ac77", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
y_pred
1960-10442.9862
1960-11388.2091
1960-12427.7009
\n", + "
" + ], + "text/plain": [ + " y_pred\n", + "1960-10 442.9862\n", + "1960-11 388.2091\n", + "1960-12 427.7009" + ] + }, + "execution_count": 16, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# 显示预测结果\n", + "holdout_pred.head()" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "id": "766ed344", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
y_pred
1960-10442.9862
1960-11388.2091
1960-12427.7009
1961-01440.8288
1961-02414.1672
1961-03460.3095
1961-04489.8045
1961-05500.6160
1961-06567.9572
1961-07657.4233
1961-08648.7133
1961-09541.5307
1961-10472.1916
1961-11413.6633
1961-12455.5921
1962-01469.4208
1962-02440.8854
1962-03489.8456
1962-04521.0661
1962-05532.3985
1962-06603.8253
1962-07698.7240
1962-08689.2546
1962-09575.1983
1962-10501.3970
1962-11439.1175
1962-12483.4833
1963-01498.0127
1963-02467.6037
1963-03519.3818
1963-04552.3276
1963-05564.1811
1963-06639.6934
1963-07740.0248
1963-08729.7959
1963-09608.8659
\n", + "
" + ], + "text/plain": [ + " y_pred\n", + "1960-10 442.9862\n", + "1960-11 388.2091\n", + "1960-12 427.7009\n", + "1961-01 440.8288\n", + "1961-02 414.1672\n", + "1961-03 460.3095\n", + "1961-04 489.8045\n", + "1961-05 500.6160\n", + "1961-06 567.9572\n", + "1961-07 657.4233\n", + "1961-08 648.7133\n", + "1961-09 541.5307\n", + "1961-10 472.1916\n", + "1961-11 413.6633\n", + "1961-12 455.5921\n", + "1962-01 469.4208\n", + "1962-02 440.8854\n", + "1962-03 489.8456\n", + "1962-04 521.0661\n", + "1962-05 532.3985\n", + "1962-06 603.8253\n", + "1962-07 698.7240\n", + "1962-08 689.2546\n", + "1962-09 575.1983\n", + "1962-10 501.3970\n", + "1962-11 439.1175\n", + "1962-12 483.4833\n", + "1963-01 498.0127\n", + "1963-02 467.6037\n", + "1963-03 519.3818\n", + "1963-04 552.3276\n", + "1963-05 564.1811\n", + "1963-06 639.6934\n", + "1963-07 740.0248\n", + "1963-08 729.7959\n", + "1963-09 608.8659" + ] + }, + "execution_count": 17, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# 产生未来36个周期的预测结果\n", + "predict_model(best, fh = 36)" + ] + }, + { + "cell_type": "markdown", + "id": "e4384735", + "metadata": {}, + "source": [ + "## Save Model" + ] + }, + { + "cell_type": "markdown", + "id": "cd63f053", + "metadata": {}, + "source": [ + "最后,您可以使用 pycaret 的 `save_model` 函数将整个模型保存在磁盘上供以后使用。" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "id": "4181de41", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Transformation Pipeline and Model Successfully Saved\n" + ] + }, + { + "data": { + "text/plain": [ + "(ForecastingPipeline(steps=[('forecaster',\n", + " TransformedTargetForecaster(steps=[('model',\n", + " AutoETS(seasonal='mul',\n", + " sp=12,\n", + " trend='add'))]))]),\n", + " 'my_first_pipeline.pkl')" + ] + }, + "execution_count": 18, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# 保存模型\n", + "save_model(best, 'my_first_pipeline')" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "id": "40ed5152", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Transformation Pipeline and Model Successfully Loaded\n" + ] + }, + { + "data": { + "text/html": [ + "
ForecastingPipeline(steps=[('forecaster',\n",
+       "                            TransformedTargetForecaster(steps=[('model',\n",
+       "                                                                AutoETS(seasonal='mul',\n",
+       "                                                                        sp=12,\n",
+       "                                                                        trend='add'))]))])
In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook.
On GitHub, the HTML representation is unable to render, please try loading this page with nbviewer.org.
" + ], + "text/plain": [ + "ForecastingPipeline(steps=[('forecaster',\n", + " TransformedTargetForecaster(steps=[('model',\n", + " AutoETS(seasonal='mul',\n", + " sp=12,\n", + " trend='add'))]))])" + ] + }, + "execution_count": 19, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# 加载模型\n", + "loaded_best_pipeline = load_model('my_first_pipeline')\n", + "loaded_best_pipeline" + ] + }, + { + "cell_type": "markdown", + "id": "b2c7d62e", + "metadata": {}, + "source": [ + "# 👇 逐个函数的详细概述" + ] + }, + { + "cell_type": "markdown", + "id": "e05937f5", + "metadata": {}, + "source": [ + "## ✅ Setup\n", + "此函数初始化训练环境并创建转换管道。在 PyCaret 中执行任何其他函数之前必须调用setup函数。`Setup`只有一个必需参数,即`data`. 所有其他参数都是可选的。" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "id": "24e503be", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
 DescriptionValue
0session_id123
1TargetNumber of airline passengers
2ApproachUnivariate
3Exogenous VariablesNot Present
4Original data shape(144, 1)
5Transformed data shape(144, 1)
6Transformed train set shape(141, 1)
7Transformed test set shape(3, 1)
8Rows with missing values0.0%
9Fold GeneratorExpandingWindowSplitter
10Fold Number3
11Enforce Prediction IntervalFalse
12Splits used for hyperparametersall
13User Defined Seasonal Period(s)None
14Ignore Seasonality TestFalse
15Seasonality Detection Algoauto
16Max Period to Consider60
17Seasonal Period(s) Tested[12, 24, 36, 11, 48]
18Significant Seasonal Period(s)[12, 24, 36, 11, 48]
19Significant Seasonal Period(s) without Harmonics[48, 36, 11]
20Remove HarmonicsFalse
21Harmonics Order Methodharmonic_max
22Num Seasonalities to Use1
23All Seasonalities to Use[12]
24Primary Seasonality12
25Seasonality PresentTrue
26Target Strictly PositiveTrue
27Target White NoiseNo
28Recommended d1
29Recommended Seasonal D1
30PreprocessFalse
31CPU Jobs-1
32Use GPUFalse
33Log ExperimentFalse
34Experiment Namets-default-name
35USId85f
\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "s = setup(data, fh = 3, session_id = 123)" + ] + }, + { + "cell_type": "markdown", + "id": "924d198b", + "metadata": {}, + "source": [ + "要访问setup函数创建的所有内置变量,例如变换后的数据集、random_state 等,您可以使用`get_config`方法。" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "id": "76128b08", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{'USI',\n", + " 'X',\n", + " 'X_test',\n", + " 'X_test_transformed',\n", + " 'X_train',\n", + " 'X_train_transformed',\n", + " 'X_transformed',\n", + " '_available_plots',\n", + " '_ml_usecase',\n", + " 'all_sps_to_use',\n", + " 'approach_type',\n", + " 'candidate_sps',\n", + " 'data',\n", + " 'dataset',\n", + " 'dataset_transformed',\n", + " 'enforce_exogenous',\n", + " 'enforce_pi',\n", + " 'exogenous_present',\n", + " 'exp_id',\n", + " 'exp_name_log',\n", + " 'fh',\n", + " 'fold_generator',\n", + " 'fold_param',\n", + " 'gpu_n_jobs_param',\n", + " 'gpu_param',\n", + " 'html_param',\n", + " 'idx',\n", + " 'index_type',\n", + " 'is_multiclass',\n", + " 'log_plots_param',\n", + " 'logging_param',\n", + " 'memory',\n", + " 'model_engines',\n", + " 'n_jobs_param',\n", + " 'pipeline',\n", + " 'primary_sp_to_use',\n", + " 'seasonality_present',\n", + " 'seed',\n", + " 'significant_sps',\n", + " 'significant_sps_no_harmonics',\n", + " 'strictly_positive',\n", + " 'test',\n", + " 'test_transformed',\n", + " 'train',\n", + " 'train_transformed',\n", + " 'variable_and_property_keys',\n", + " 'variables',\n", + " 'y',\n", + " 'y_test',\n", + " 'y_test_transformed',\n", + " 'y_train',\n", + " 'y_train_transformed',\n", + " 'y_transformed'}" + ] + }, + "execution_count": 21, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# 查看所有可访问的内置变量\n", + "get_config()" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "id": "dbc43292", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "Period\n", + "1949-01 112.0\n", + "1949-02 118.0\n", + "1949-03 132.0\n", + "1949-04 129.0\n", + "1949-05 121.0\n", + " ... \n", + "1960-05 472.0\n", + "1960-06 535.0\n", + "1960-07 622.0\n", + "1960-08 606.0\n", + "1960-09 508.0\n", + "Freq: M, Name: Number of airline passengers, Length: 141, dtype: float64" + ] + }, + "execution_count": 22, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# 访问 y_train_transformed 内置变量\n", + "get_config('y_train_transformed')" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "id": "ef9cd061", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The current seed is: 123\n", + "The new seed is: 786\n" + ] + } + ], + "source": [ + "# 另一个例子: 访问 seed\n", + "print(\"The current seed is: {}\".format(get_config('seed')))\n", + "\n", + "# 我们使用 set_config 来改变 seed变量的值\n", + "set_config('seed', 786)\n", + "print(\"The new seed is: {}\".format(get_config('seed')))" + ] + }, + { + "cell_type": "markdown", + "id": "7afbe41d", + "metadata": {}, + "source": [ + "所有预处理配置和实验设置/参数都传递到`setup`函数中。要查看所有可用参数,请查看文档字符串:" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "id": "2885a14f", + "metadata": {}, + "outputs": [], + "source": [ + "# help(setup)" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "id": "34ae0fce", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
 DescriptionValue
0session_id123
1TargetNumber of airline passengers
2ApproachUnivariate
3Exogenous VariablesNot Present
4Original data shape(144, 1)
5Transformed data shape(144, 1)
6Transformed train set shape(141, 1)
7Transformed test set shape(3, 1)
8Rows with missing values0.0%
9Fold GeneratorExpandingWindowSplitter
10Fold Number3
11Enforce Prediction IntervalFalse
12Splits used for hyperparametersall
13User Defined Seasonal Period(s)None
14Ignore Seasonality TestFalse
15Seasonality Detection Algoauto
16Max Period to Consider60
17Seasonal Period(s) Tested[12, 24, 36, 11, 48]
18Significant Seasonal Period(s)[12, 24, 36, 11, 48]
19Significant Seasonal Period(s) without Harmonics[48, 36, 11]
20Remove HarmonicsFalse
21Harmonics Order Methodharmonic_max
22Num Seasonalities to Use1
23All Seasonalities to Use[12]
24Primary Seasonality12
25Seasonality PresentTrue
26Target Strictly PositiveTrue
27Target White NoiseNo
28Recommended d1
29Recommended Seasonal D1
30PreprocessTrue
31Numerical Imputation (Target)drift
32Transformation (Target)None
33Scaling (Target)None
34Feature Engineering (Target) - Reduced RegressionFalse
35CPU Jobs-1
36Use GPUFalse
37Log ExperimentFalse
38Experiment Namets-default-name
39USI7a02
\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "# 初始化 setup 设置fold_strategy = expanding\n", + "s = setup(data, fh = 3, session_id = 123,\n", + " fold_strategy = 'expanding', numeric_imputation_target = 'drift')" + ] + }, + { + "cell_type": "markdown", + "id": "36b8b803", + "metadata": {}, + "source": [ + "## ✅ Compare Models\n", + "\n", + "此函数使用交叉验证训练和评估模型库中所有可用模型的性能。 此函数的输出是具有平均交叉验证分数的评分表格。 可以使用`get_metrics`函数访问在 CV 期间评估的指标。 可以使用 `add_metric` 和 `remove_metric` 函数添加或删除自定义指标。" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "id": "a3350418", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [ + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
 ModelMASERMSSEMAERMSEMAPESMAPER2TT (Sec)
etsETS0.49120.554115.094319.31050.03180.0316-0.44640.1100
exp_smoothExponential Smoothing0.49290.556115.147719.37920.03200.0317-0.46040.1133
arimaARIMA0.69640.711021.375724.77740.04470.0456-0.54950.0967
auto_arimaAuto ARIMA0.71360.694521.938924.21370.04590.0464-0.545411.5833
par_cds_dtPassive Aggressive w/ Cond. Deseasonalize & Detrending0.72120.669622.179423.36730.04530.04680.02610.0833
lar_cds_dtLeast Angular Regressor w/ Cond. Deseasonalize & Detrending0.85020.826426.264628.99230.05130.05340.03650.0833
huber_cds_dtHuber w/ Cond. Deseasonalize & Detrending0.86580.836226.782629.39470.05160.05360.15010.0867
lr_cds_dtLinear w/ Cond. Deseasonalize & Detrending0.89040.872227.526630.62430.05340.0555-0.00920.1033
ridge_cds_dtRidge w/ Cond. Deseasonalize & Detrending0.89050.872227.527030.62460.05340.0555-0.00920.1000
en_cds_dtElastic Net w/ Cond. Deseasonalize & Detrending0.89440.874627.653530.71270.05350.0557-0.00630.1033
llar_cds_dtLasso Least Angular Regressor w/ Cond. Deseasonalize & Detrending0.89660.875827.722430.75800.05360.0558-0.00420.0867
lasso_cds_dtLasso w/ Cond. Deseasonalize & Detrending0.89660.875927.723130.75940.05360.0558-0.00400.1067
br_cds_dtBayesian Ridge w/ Cond. Deseasonalize & Detrending0.91560.887828.318831.18210.05470.0569-0.02090.0767
knn_cds_dtK Neighbors w/ Cond. Deseasonalize & Detrending1.06950.992433.150034.92770.06310.0656-0.16820.0967
thetaTheta Forecaster1.08391.039333.322336.25550.06860.0710-1.79260.0533
et_cds_dtExtra Trees w/ Cond. Deseasonalize & Detrending1.16941.088436.216038.27290.06940.0727-0.43520.1567
dt_cds_dtDecision Tree w/ Cond. Deseasonalize & Detrending1.19301.134636.910639.85180.07330.0769-0.81350.0833
lightgbm_cds_dtLight Gradient Boosting w/ Cond. Deseasonalize & Detrending1.20191.136237.235939.98270.07130.0746-0.60510.0867
omp_cds_dtOrthogonal Matching Pursuit w/ Cond. Deseasonalize & Detrending1.21711.147537.645740.30700.07240.0757-0.70570.0800
ada_cds_dtAdaBoost w/ Cond. Deseasonalize & Detrending1.24151.174538.487341.34660.07280.0765-0.57110.1133
rf_cds_dtRandom Forest w/ Cond. Deseasonalize & Detrending1.25741.183738.873641.54800.07530.0789-0.94580.1667
gbr_cds_dtGradient Boosting w/ Cond. Deseasonalize & Detrending1.27021.182039.300441.53550.07600.0797-0.83440.1033
xgboost_cds_dtExtreme Gradient Boosting w/ Cond. Deseasonalize & Detrending1.31981.204540.834242.30450.07920.0831-0.91920.1133
naiveNaive Forecaster1.56541.495148.444452.52320.09200.0981-1.83440.0433
snaiveSeasonal Naive Forecaster1.67411.534351.666753.73500.10520.1117-4.53880.0467
polytrendPolynomial Trend Forecaster2.15532.109666.981774.40480.12410.1350-4.25250.0367
crostonCroston2.45652.351376.395382.97940.13940.1562-4.58950.0400
grand_meansGrand Means Forecaster7.30656.5029226.0502228.38800.44690.5821-72.11830.0467
\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "best = compare_models()" + ] + }, + { + "cell_type": "markdown", + "id": "cd18dcf6", + "metadata": {}, + "source": [ + "`compare_models` 默认使用模型库中的所有模型(除了带有 `Turbo=False` 的模型)。 要查看所有可用模型,您可以使用函数 `models()`" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "id": "432e93d7", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
NameReferenceTurbo
ID
naiveNaive Forecastersktime.forecasting.naive.NaiveForecasterTrue
grand_meansGrand Means Forecastersktime.forecasting.naive.NaiveForecasterTrue
snaiveSeasonal Naive Forecastersktime.forecasting.naive.NaiveForecasterTrue
polytrendPolynomial Trend Forecastersktime.forecasting.trend.PolynomialTrendForeca...True
arimaARIMAsktime.forecasting.arima.ARIMATrue
auto_arimaAuto ARIMAsktime.forecasting.arima.AutoARIMATrue
exp_smoothExponential Smoothingsktime.forecasting.exp_smoothing.ExponentialSm...True
crostonCrostonsktime.forecasting.croston.CrostonTrue
etsETSsktime.forecasting.ets.AutoETSTrue
thetaTheta Forecastersktime.forecasting.theta.ThetaForecasterTrue
tbatsTBATSsktime.forecasting.tbats.TBATSFalse
batsBATSsktime.forecasting.bats.BATSFalse
lr_cds_dtLinear w/ Cond. Deseasonalize & Detrendingpycaret.containers.models.time_series.BaseCdsD...True
en_cds_dtElastic Net w/ Cond. Deseasonalize & Detrendingpycaret.containers.models.time_series.BaseCdsD...True
ridge_cds_dtRidge w/ Cond. Deseasonalize & Detrendingpycaret.containers.models.time_series.BaseCdsD...True
lasso_cds_dtLasso w/ Cond. Deseasonalize & Detrendingpycaret.containers.models.time_series.BaseCdsD...True
lar_cds_dtLeast Angular Regressor w/ Cond. Deseasonalize...pycaret.containers.models.time_series.BaseCdsD...True
llar_cds_dtLasso Least Angular Regressor w/ Cond. Deseaso...pycaret.containers.models.time_series.BaseCdsD...True
br_cds_dtBayesian Ridge w/ Cond. Deseasonalize & Detren...pycaret.containers.models.time_series.BaseCdsD...True
huber_cds_dtHuber w/ Cond. Deseasonalize & Detrendingpycaret.containers.models.time_series.BaseCdsD...True
par_cds_dtPassive Aggressive w/ Cond. Deseasonalize & De...pycaret.containers.models.time_series.BaseCdsD...True
omp_cds_dtOrthogonal Matching Pursuit w/ Cond. Deseasona...pycaret.containers.models.time_series.BaseCdsD...True
knn_cds_dtK Neighbors w/ Cond. Deseasonalize & Detrendingpycaret.containers.models.time_series.BaseCdsD...True
dt_cds_dtDecision Tree w/ Cond. Deseasonalize & Detrendingpycaret.containers.models.time_series.BaseCdsD...True
rf_cds_dtRandom Forest w/ Cond. Deseasonalize & Detrendingpycaret.containers.models.time_series.BaseCdsD...True
et_cds_dtExtra Trees w/ Cond. Deseasonalize & Detrendingpycaret.containers.models.time_series.BaseCdsD...True
gbr_cds_dtGradient Boosting w/ Cond. Deseasonalize & Det...pycaret.containers.models.time_series.BaseCdsD...True
ada_cds_dtAdaBoost w/ Cond. Deseasonalize & Detrendingpycaret.containers.models.time_series.BaseCdsD...True
xgboost_cds_dtExtreme Gradient Boosting w/ Cond. Deseasonali...pycaret.containers.models.time_series.BaseCdsD...True
lightgbm_cds_dtLight Gradient Boosting w/ Cond. Deseasonalize...pycaret.containers.models.time_series.BaseCdsD...True
\n", + "
" + ], + "text/plain": [ + " Name \\\n", + "ID \n", + "naive Naive Forecaster \n", + "grand_means Grand Means Forecaster \n", + "snaive Seasonal Naive Forecaster \n", + "polytrend Polynomial Trend Forecaster \n", + "arima ARIMA \n", + "auto_arima Auto ARIMA \n", + "exp_smooth Exponential Smoothing \n", + "croston Croston \n", + "ets ETS \n", + "theta Theta Forecaster \n", + "tbats TBATS \n", + "bats BATS \n", + "lr_cds_dt Linear w/ Cond. Deseasonalize & Detrending \n", + "en_cds_dt Elastic Net w/ Cond. Deseasonalize & Detrending \n", + "ridge_cds_dt Ridge w/ Cond. Deseasonalize & Detrending \n", + "lasso_cds_dt Lasso w/ Cond. Deseasonalize & Detrending \n", + "lar_cds_dt Least Angular Regressor w/ Cond. Deseasonalize... \n", + "llar_cds_dt Lasso Least Angular Regressor w/ Cond. Deseaso... \n", + "br_cds_dt Bayesian Ridge w/ Cond. Deseasonalize & Detren... \n", + "huber_cds_dt Huber w/ Cond. Deseasonalize & Detrending \n", + "par_cds_dt Passive Aggressive w/ Cond. Deseasonalize & De... \n", + "omp_cds_dt Orthogonal Matching Pursuit w/ Cond. Deseasona... \n", + "knn_cds_dt K Neighbors w/ Cond. Deseasonalize & Detrending \n", + "dt_cds_dt Decision Tree w/ Cond. Deseasonalize & Detrending \n", + "rf_cds_dt Random Forest w/ Cond. Deseasonalize & Detrending \n", + "et_cds_dt Extra Trees w/ Cond. Deseasonalize & Detrending \n", + "gbr_cds_dt Gradient Boosting w/ Cond. Deseasonalize & Det... \n", + "ada_cds_dt AdaBoost w/ Cond. Deseasonalize & Detrending \n", + "xgboost_cds_dt Extreme Gradient Boosting w/ Cond. Deseasonali... \n", + "lightgbm_cds_dt Light Gradient Boosting w/ Cond. Deseasonalize... \n", + "\n", + " Reference Turbo \n", + "ID \n", + "naive sktime.forecasting.naive.NaiveForecaster True \n", + "grand_means sktime.forecasting.naive.NaiveForecaster True \n", + "snaive sktime.forecasting.naive.NaiveForecaster True \n", + "polytrend sktime.forecasting.trend.PolynomialTrendForeca... True \n", + "arima sktime.forecasting.arima.ARIMA True \n", + "auto_arima sktime.forecasting.arima.AutoARIMA True \n", + "exp_smooth sktime.forecasting.exp_smoothing.ExponentialSm... True \n", + "croston sktime.forecasting.croston.Croston True \n", + "ets sktime.forecasting.ets.AutoETS True \n", + "theta sktime.forecasting.theta.ThetaForecaster True \n", + "tbats sktime.forecasting.tbats.TBATS False \n", + "bats sktime.forecasting.bats.BATS False \n", + "lr_cds_dt pycaret.containers.models.time_series.BaseCdsD... True \n", + "en_cds_dt pycaret.containers.models.time_series.BaseCdsD... True \n", + "ridge_cds_dt pycaret.containers.models.time_series.BaseCdsD... True \n", + "lasso_cds_dt pycaret.containers.models.time_series.BaseCdsD... True \n", + "lar_cds_dt pycaret.containers.models.time_series.BaseCdsD... True \n", + "llar_cds_dt pycaret.containers.models.time_series.BaseCdsD... True \n", + "br_cds_dt pycaret.containers.models.time_series.BaseCdsD... True \n", + "huber_cds_dt pycaret.containers.models.time_series.BaseCdsD... True \n", + "par_cds_dt pycaret.containers.models.time_series.BaseCdsD... True \n", + "omp_cds_dt pycaret.containers.models.time_series.BaseCdsD... True \n", + "knn_cds_dt pycaret.containers.models.time_series.BaseCdsD... True \n", + "dt_cds_dt pycaret.containers.models.time_series.BaseCdsD... True \n", + "rf_cds_dt pycaret.containers.models.time_series.BaseCdsD... True \n", + "et_cds_dt pycaret.containers.models.time_series.BaseCdsD... True \n", + "gbr_cds_dt pycaret.containers.models.time_series.BaseCdsD... True \n", + "ada_cds_dt pycaret.containers.models.time_series.BaseCdsD... True \n", + "xgboost_cds_dt pycaret.containers.models.time_series.BaseCdsD... True \n", + "lightgbm_cds_dt pycaret.containers.models.time_series.BaseCdsD... True " + ] + }, + "execution_count": 27, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# 查看所有可用模型\n", + "models()" + ] + }, + { + "cell_type": "markdown", + "id": "f588f54b", + "metadata": {}, + "source": [ + "您可以使用 `compare_models` 中的 `include` 和 `exclude` 参数仅训练特定模型或通过在 `exclude` 参数中传递模型 ID 将特定模型排除在训练之外。" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "id": "f2a7e578", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [ + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
 ModelMASERMSSEMAERMSEMAPESMAPER2TT (Sec)
etsETS0.49120.554115.094319.31050.03180.0316-0.44640.0900
arimaARIMA0.69640.711021.375724.77740.04470.0456-0.54950.0700
thetaTheta Forecaster1.08391.039333.322336.25550.06860.0710-1.79260.0333
naiveNaive Forecaster1.56541.495148.444452.52320.09200.0981-1.83440.0267
snaiveSeasonal Naive Forecaster1.67411.534351.666753.73500.10520.1117-4.53880.0267
polytrendPolynomial Trend Forecaster2.15532.109666.981774.40480.12410.1350-4.25250.0267
grand_meansGrand Means Forecaster7.30656.5029226.0502228.38800.44690.5821-72.11830.0300
\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "compare_ts_models = compare_models(include = ['ets', 'arima', 'theta', 'naive', 'snaive', 'grand_means', 'polytrend'])" + ] + }, + { + "cell_type": "code", + "execution_count": 29, + "id": "c15a467e", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
AutoETS(seasonal='mul', sp=12, trend='add')
In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook.
On GitHub, the HTML representation is unable to render, please try loading this page with nbviewer.org.
" + ], + "text/plain": [ + "AutoETS(seasonal='mul', sp=12, trend='add')" + ] + }, + "execution_count": 29, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "compare_ts_models" + ] + }, + { + "cell_type": "markdown", + "id": "af9ae6cd", + "metadata": {}, + "source": [ + "上面的函数返回经过训练的模型对象作为输出。 评分表格只显示不返回。 如果您需要访问评分表格,您可以使用`pull`函数来访问dataframe。" + ] + }, + { + "cell_type": "code", + "execution_count": 30, + "id": "fc529e25", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
ModelMASERMSSEMAERMSEMAPESMAPER2TT (Sec)
etsETS0.49120.554115.094319.31050.03180.0316-0.44640.0900
arimaARIMA0.69640.71121.375724.77740.04470.0456-0.54950.0700
thetaTheta Forecaster1.08391.039333.322336.25550.06860.071-1.79260.0333
naiveNaive Forecaster1.56541.495148.444452.52320.0920.0981-1.83440.0267
snaiveSeasonal Naive Forecaster1.67411.534351.666753.7350.10520.1117-4.53880.0267
polytrendPolynomial Trend Forecaster2.15532.109666.981774.40480.12410.135-4.25250.0267
grand_meansGrand Means Forecaster7.30656.5029226.0502228.3880.44690.5821-72.11830.0300
\n", + "
" + ], + "text/plain": [ + " Model MASE RMSSE MAE RMSE \\\n", + "ets ETS 0.4912 0.5541 15.0943 19.3105 \n", + "arima ARIMA 0.6964 0.711 21.3757 24.7774 \n", + "theta Theta Forecaster 1.0839 1.0393 33.3223 36.2555 \n", + "naive Naive Forecaster 1.5654 1.4951 48.4444 52.5232 \n", + "snaive Seasonal Naive Forecaster 1.6741 1.5343 51.6667 53.735 \n", + "polytrend Polynomial Trend Forecaster 2.1553 2.1096 66.9817 74.4048 \n", + "grand_means Grand Means Forecaster 7.3065 6.5029 226.0502 228.388 \n", + "\n", + " MAPE SMAPE R2 TT (Sec) \n", + "ets 0.0318 0.0316 -0.4464 0.0900 \n", + "arima 0.0447 0.0456 -0.5495 0.0700 \n", + "theta 0.0686 0.071 -1.7926 0.0333 \n", + "naive 0.092 0.0981 -1.8344 0.0267 \n", + "snaive 0.1052 0.1117 -4.5388 0.0267 \n", + "polytrend 0.1241 0.135 -4.2525 0.0267 \n", + "grand_means 0.4469 0.5821 -72.1183 0.0300 " + ] + }, + "execution_count": 30, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "compare_ts_models_results = pull()\n", + "compare_ts_models_results" + ] + }, + { + "cell_type": "markdown", + "id": "05a72fc2", + "metadata": {}, + "source": [ + "默认情况下,`compare_models`根据`sort`参数中定义的指标返回性能最佳的单个模型。 让我们更改代码以返回 3 个基于`MAE`的顶级模型。" + ] + }, + { + "cell_type": "code", + "execution_count": 31, + "id": "1066dd07", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [ + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
 ModelMASERMSSEMAERMSEMAPESMAPER2TT (Sec)
etsETS0.49120.554115.094319.31050.03180.0316-0.44640.1100
exp_smoothExponential Smoothing0.49290.556115.147719.37920.03200.0317-0.46040.0867
arimaARIMA0.69640.711021.375724.77740.04470.0456-0.54950.0767
auto_arimaAuto ARIMA0.71360.694521.938924.21370.04590.0464-0.545411.3167
par_cds_dtPassive Aggressive w/ Cond. Deseasonalize & Detrending0.72120.669622.179423.36730.04530.04680.02610.1033
lar_cds_dtLeast Angular Regressor w/ Cond. Deseasonalize & Detrending0.85020.826426.264628.99230.05130.05340.03650.1000
huber_cds_dtHuber w/ Cond. Deseasonalize & Detrending0.86580.836226.782629.39470.05160.05360.15010.1067
lr_cds_dtLinear w/ Cond. Deseasonalize & Detrending0.89040.872227.526630.62430.05340.0555-0.00920.0967
ridge_cds_dtRidge w/ Cond. Deseasonalize & Detrending0.89050.872227.527030.62460.05340.0555-0.00920.0967
en_cds_dtElastic Net w/ Cond. Deseasonalize & Detrending0.89440.874627.653530.71270.05350.0557-0.00630.1033
llar_cds_dtLasso Least Angular Regressor w/ Cond. Deseasonalize & Detrending0.89660.875827.722430.75800.05360.0558-0.00420.1033
lasso_cds_dtLasso w/ Cond. Deseasonalize & Detrending0.89660.875927.723130.75940.05360.0558-0.00400.1100
br_cds_dtBayesian Ridge w/ Cond. Deseasonalize & Detrending0.91560.887828.318831.18210.05470.0569-0.02090.1033
knn_cds_dtK Neighbors w/ Cond. Deseasonalize & Detrending1.06950.992433.150034.92770.06310.0656-0.16820.1133
thetaTheta Forecaster1.08391.039333.322336.25550.06860.0710-1.79260.0533
et_cds_dtExtra Trees w/ Cond. Deseasonalize & Detrending1.16941.088436.216038.27290.06940.0727-0.43520.1667
dt_cds_dtDecision Tree w/ Cond. Deseasonalize & Detrending1.19301.134636.910639.85180.07330.0769-0.81350.1000
lightgbm_cds_dtLight Gradient Boosting w/ Cond. Deseasonalize & Detrending1.20191.136237.235939.98270.07130.0746-0.60510.1100
omp_cds_dtOrthogonal Matching Pursuit w/ Cond. Deseasonalize & Detrending1.21711.147537.645740.30700.07240.0757-0.70570.1000
ada_cds_dtAdaBoost w/ Cond. Deseasonalize & Detrending1.24151.174538.487341.34660.07280.0765-0.57110.1300
rf_cds_dtRandom Forest w/ Cond. Deseasonalize & Detrending1.25741.183738.873641.54800.07530.0789-0.94580.1933
gbr_cds_dtGradient Boosting w/ Cond. Deseasonalize & Detrending1.27021.182039.300441.53550.07600.0797-0.83440.1233
xgboost_cds_dtExtreme Gradient Boosting w/ Cond. Deseasonalize & Detrending1.31981.204540.834242.30450.07920.0831-0.91920.1267
naiveNaive Forecaster1.56541.495148.444452.52320.09200.0981-1.83440.0267
snaiveSeasonal Naive Forecaster1.67411.534351.666753.73500.10520.1117-4.53880.0300
polytrendPolynomial Trend Forecaster2.15532.109666.981774.40480.12410.1350-4.25250.0300
crostonCroston2.45652.351376.395382.97940.13940.1562-4.58950.0400
grand_meansGrand Means Forecaster7.30656.5029226.0502228.38800.44690.5821-72.11830.0300
\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "best_mae_models_top3 = compare_models(sort = 'MAE', n_select = 3)" + ] + }, + { + "cell_type": "code", + "execution_count": 32, + "id": "aa259708", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "[AutoETS(seasonal='mul', sp=12, trend='add'),\n", + " ExponentialSmoothing(seasonal='mul', sp=12, trend='add'),\n", + " ARIMA(seasonal_order=(0, 1, 0, 12))]" + ] + }, + "execution_count": 32, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# 列出前3个MAE指标最优的模型\n", + "best_mae_models_top3" + ] + }, + { + "cell_type": "markdown", + "id": "1d91d27e", + "metadata": {}, + "source": [ + "您可能会发现在`compare_models`中非常有用的其他一些参数是:\n", + "\n", + "- fold\n", + "- cross_validation\n", + "- budget_time\n", + "- errors\n", + "- parallel\n", + "- engine\n", + "\n", + "您可以查看函数的文档字符串以获取更多信息。" + ] + }, + { + "cell_type": "code", + "execution_count": 33, + "id": "f0c49e0b", + "metadata": {}, + "outputs": [], + "source": [ + "# help(compare_models)" + ] + }, + { + "cell_type": "markdown", + "id": "f8b75e77", + "metadata": {}, + "source": [ + "## ✅ 检查统计数据\n", + "`check_stats`函数用于获取汇总统计数据并对原始数据或模型残差执行统计检测。" + ] + }, + { + "cell_type": "code", + "execution_count": 34, + "id": "a5990dc3", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
TestTest NameDataPropertySettingValue
0SummaryStatisticsTransformedLength144.0
1SummaryStatisticsTransformed# Missing Values0.0
2SummaryStatisticsTransformedMean280.298611
3SummaryStatisticsTransformedMedian265.5
4SummaryStatisticsTransformedStandard Deviation119.966317
5SummaryStatisticsTransformedVariance14391.917201
6SummaryStatisticsTransformedKurtosis-0.364942
7SummaryStatisticsTransformedSkewness0.58316
8SummaryStatisticsTransformed# Distinct Values118.0
9White NoiseLjung-BoxTransformedTest Statictic{'alpha': 0.05, 'K': 24}1606.083817
10White NoiseLjung-BoxTransformedTest Statictic{'alpha': 0.05, 'K': 48}1933.155822
11White NoiseLjung-BoxTransformedp-value{'alpha': 0.05, 'K': 24}0.0
12White NoiseLjung-BoxTransformedp-value{'alpha': 0.05, 'K': 48}0.0
13White NoiseLjung-BoxTransformedWhite Noise{'alpha': 0.05, 'K': 24}False
14White NoiseLjung-BoxTransformedWhite Noise{'alpha': 0.05, 'K': 48}False
15StationarityADFTransformedStationarity{'alpha': 0.05}False
16StationarityADFTransformedp-value{'alpha': 0.05}0.99188
17StationarityADFTransformedTest Statistic{'alpha': 0.05}0.815369
18StationarityADFTransformedCritical Value 1%{'alpha': 0.05}-3.481682
19StationarityADFTransformedCritical Value 5%{'alpha': 0.05}-2.884042
20StationarityADFTransformedCritical Value 10%{'alpha': 0.05}-2.57877
21StationarityKPSSTransformedTrend Stationarity{'alpha': 0.05}True
22StationarityKPSSTransformedp-value{'alpha': 0.05}0.1
23StationarityKPSSTransformedTest Statistic{'alpha': 0.05}0.09615
24StationarityKPSSTransformedCritical Value 10%{'alpha': 0.05}0.119
25StationarityKPSSTransformedCritical Value 5%{'alpha': 0.05}0.146
26StationarityKPSSTransformedCritical Value 2.5%{'alpha': 0.05}0.176
27StationarityKPSSTransformedCritical Value 1%{'alpha': 0.05}0.216
28NormalityShapiroTransformedNormality{'alpha': 0.05}False
29NormalityShapiroTransformedp-value{'alpha': 0.05}0.000068
\n", + "
" + ], + "text/plain": [ + " Test Test Name Data Property \\\n", + "0 Summary Statistics Transformed Length \n", + "1 Summary Statistics Transformed # Missing Values \n", + "2 Summary Statistics Transformed Mean \n", + "3 Summary Statistics Transformed Median \n", + "4 Summary Statistics Transformed Standard Deviation \n", + "5 Summary Statistics Transformed Variance \n", + "6 Summary Statistics Transformed Kurtosis \n", + "7 Summary Statistics Transformed Skewness \n", + "8 Summary Statistics Transformed # Distinct Values \n", + "9 White Noise Ljung-Box Transformed Test Statictic \n", + "10 White Noise Ljung-Box Transformed Test Statictic \n", + "11 White Noise Ljung-Box Transformed p-value \n", + "12 White Noise Ljung-Box Transformed p-value \n", + "13 White Noise Ljung-Box Transformed White Noise \n", + "14 White Noise Ljung-Box Transformed White Noise \n", + "15 Stationarity ADF Transformed Stationarity \n", + "16 Stationarity ADF Transformed p-value \n", + "17 Stationarity ADF Transformed Test Statistic \n", + "18 Stationarity ADF Transformed Critical Value 1% \n", + "19 Stationarity ADF Transformed Critical Value 5% \n", + "20 Stationarity ADF Transformed Critical Value 10% \n", + "21 Stationarity KPSS Transformed Trend Stationarity \n", + "22 Stationarity KPSS Transformed p-value \n", + "23 Stationarity KPSS Transformed Test Statistic \n", + "24 Stationarity KPSS Transformed Critical Value 10% \n", + "25 Stationarity KPSS Transformed Critical Value 5% \n", + "26 Stationarity KPSS Transformed Critical Value 2.5% \n", + "27 Stationarity KPSS Transformed Critical Value 1% \n", + "28 Normality Shapiro Transformed Normality \n", + "29 Normality Shapiro Transformed p-value \n", + "\n", + " Setting Value \n", + "0 144.0 \n", + "1 0.0 \n", + "2 280.298611 \n", + "3 265.5 \n", + "4 119.966317 \n", + "5 14391.917201 \n", + "6 -0.364942 \n", + "7 0.58316 \n", + "8 118.0 \n", + "9 {'alpha': 0.05, 'K': 24} 1606.083817 \n", + "10 {'alpha': 0.05, 'K': 48} 1933.155822 \n", + "11 {'alpha': 0.05, 'K': 24} 0.0 \n", + "12 {'alpha': 0.05, 'K': 48} 0.0 \n", + "13 {'alpha': 0.05, 'K': 24} False \n", + "14 {'alpha': 0.05, 'K': 48} False \n", + "15 {'alpha': 0.05} False \n", + "16 {'alpha': 0.05} 0.99188 \n", + "17 {'alpha': 0.05} 0.815369 \n", + "18 {'alpha': 0.05} -3.481682 \n", + "19 {'alpha': 0.05} -2.884042 \n", + "20 {'alpha': 0.05} -2.57877 \n", + "21 {'alpha': 0.05} True \n", + "22 {'alpha': 0.05} 0.1 \n", + "23 {'alpha': 0.05} 0.09615 \n", + "24 {'alpha': 0.05} 0.119 \n", + "25 {'alpha': 0.05} 0.146 \n", + "26 {'alpha': 0.05} 0.176 \n", + "27 {'alpha': 0.05} 0.216 \n", + "28 {'alpha': 0.05} False \n", + "29 {'alpha': 0.05} 0.000068 " + ] + }, + "execution_count": 34, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# 对原始数据进行统计检测\n", + "check_stats()" + ] + }, + { + "cell_type": "code", + "execution_count": 35, + "id": "4aae2067", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
TestTest NameDataPropertySettingValue
0SummaryStatisticsResidualLength141.0
1SummaryStatisticsResidual# Missing Values0.0
2SummaryStatisticsResidualMean-0.040882
3SummaryStatisticsResidualMedian-0.9737
4SummaryStatisticsResidualStandard Deviation10.584861
5SummaryStatisticsResidualVariance112.039282
6SummaryStatisticsResidualKurtosis1.564369
7SummaryStatisticsResidualSkewness-0.180448
8SummaryStatisticsResidual# Distinct Values141.0
9White NoiseLjung-BoxResidualTest Statictic{'alpha': 0.05, 'K': 24}41.375602
10White NoiseLjung-BoxResidualTest Statictic{'alpha': 0.05, 'K': 48}62.2296
11White NoiseLjung-BoxResidualp-value{'alpha': 0.05, 'K': 24}0.015143
12White NoiseLjung-BoxResidualp-value{'alpha': 0.05, 'K': 48}0.081358
13White NoiseLjung-BoxResidualWhite Noise{'alpha': 0.05, 'K': 24}False
14White NoiseLjung-BoxResidualWhite Noise{'alpha': 0.05, 'K': 48}True
15StationarityADFResidualStationarity{'alpha': 0.05}True
16StationarityADFResidualp-value{'alpha': 0.05}0.000377
17StationarityADFResidualTest Statistic{'alpha': 0.05}-4.341133
18StationarityADFResidualCritical Value 1%{'alpha': 0.05}-3.481282
19StationarityADFResidualCritical Value 5%{'alpha': 0.05}-2.883868
20StationarityADFResidualCritical Value 10%{'alpha': 0.05}-2.578677
21StationarityKPSSResidualTrend Stationarity{'alpha': 0.05}True
22StationarityKPSSResidualp-value{'alpha': 0.05}0.1
23StationarityKPSSResidualTest Statistic{'alpha': 0.05}0.036132
24StationarityKPSSResidualCritical Value 10%{'alpha': 0.05}0.119
25StationarityKPSSResidualCritical Value 5%{'alpha': 0.05}0.146
26StationarityKPSSResidualCritical Value 2.5%{'alpha': 0.05}0.176
27StationarityKPSSResidualCritical Value 1%{'alpha': 0.05}0.216
28NormalityShapiroResidualNormality{'alpha': 0.05}False
29NormalityShapiroResidualp-value{'alpha': 0.05}0.026096
\n", + "
" + ], + "text/plain": [ + " Test Test Name Data Property \\\n", + "0 Summary Statistics Residual Length \n", + "1 Summary Statistics Residual # Missing Values \n", + "2 Summary Statistics Residual Mean \n", + "3 Summary Statistics Residual Median \n", + "4 Summary Statistics Residual Standard Deviation \n", + "5 Summary Statistics Residual Variance \n", + "6 Summary Statistics Residual Kurtosis \n", + "7 Summary Statistics Residual Skewness \n", + "8 Summary Statistics Residual # Distinct Values \n", + "9 White Noise Ljung-Box Residual Test Statictic \n", + "10 White Noise Ljung-Box Residual Test Statictic \n", + "11 White Noise Ljung-Box Residual p-value \n", + "12 White Noise Ljung-Box Residual p-value \n", + "13 White Noise Ljung-Box Residual White Noise \n", + "14 White Noise Ljung-Box Residual White Noise \n", + "15 Stationarity ADF Residual Stationarity \n", + "16 Stationarity ADF Residual p-value \n", + "17 Stationarity ADF Residual Test Statistic \n", + "18 Stationarity ADF Residual Critical Value 1% \n", + "19 Stationarity ADF Residual Critical Value 5% \n", + "20 Stationarity ADF Residual Critical Value 10% \n", + "21 Stationarity KPSS Residual Trend Stationarity \n", + "22 Stationarity KPSS Residual p-value \n", + "23 Stationarity KPSS Residual Test Statistic \n", + "24 Stationarity KPSS Residual Critical Value 10% \n", + "25 Stationarity KPSS Residual Critical Value 5% \n", + "26 Stationarity KPSS Residual Critical Value 2.5% \n", + "27 Stationarity KPSS Residual Critical Value 1% \n", + "28 Normality Shapiro Residual Normality \n", + "29 Normality Shapiro Residual p-value \n", + "\n", + " Setting Value \n", + "0 141.0 \n", + "1 0.0 \n", + "2 -0.040882 \n", + "3 -0.9737 \n", + "4 10.584861 \n", + "5 112.039282 \n", + "6 1.564369 \n", + "7 -0.180448 \n", + "8 141.0 \n", + "9 {'alpha': 0.05, 'K': 24} 41.375602 \n", + "10 {'alpha': 0.05, 'K': 48} 62.2296 \n", + "11 {'alpha': 0.05, 'K': 24} 0.015143 \n", + "12 {'alpha': 0.05, 'K': 48} 0.081358 \n", + "13 {'alpha': 0.05, 'K': 24} False \n", + "14 {'alpha': 0.05, 'K': 48} True \n", + "15 {'alpha': 0.05} True \n", + "16 {'alpha': 0.05} 0.000377 \n", + "17 {'alpha': 0.05} -4.341133 \n", + "18 {'alpha': 0.05} -3.481282 \n", + "19 {'alpha': 0.05} -2.883868 \n", + "20 {'alpha': 0.05} -2.578677 \n", + "21 {'alpha': 0.05} True \n", + "22 {'alpha': 0.05} 0.1 \n", + "23 {'alpha': 0.05} 0.036132 \n", + "24 {'alpha': 0.05} 0.119 \n", + "25 {'alpha': 0.05} 0.146 \n", + "26 {'alpha': 0.05} 0.176 \n", + "27 {'alpha': 0.05} 0.216 \n", + "28 {'alpha': 0.05} False \n", + "29 {'alpha': 0.05} 0.026096 " + ] + }, + "execution_count": 35, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# 对最优模型的残差进行统计检测\n", + "check_stats(estimator = best)" + ] + }, + { + "cell_type": "markdown", + "id": "9e6c47cb", + "metadata": {}, + "source": [ + "## ✅ 实验日志记录\n", + "PyCaret 集成了许多不同类型的实验日志记录器(默认 = 'mlflow')。要在 PyCaret 中打开实验跟踪,您可以设置`log_experiment`和`experiment_name`参数。它将根据定义的记录器自动跟踪所有指标、超参数等。" + ] + }, + { + "cell_type": "code", + "execution_count": 36, + "id": "1af63fd0", + "metadata": {}, + "outputs": [], + "source": [ + "# from pycaret.time_series import *\n", + "# s = setup(data, fh = 3, session_id = 123, log_experiment='mlflow', experiment_name='airline_experiment')" + ] + }, + { + "cell_type": "code", + "execution_count": 37, + "id": "42cd6120", + "metadata": {}, + "outputs": [], + "source": [ + "# compare models\n", + "# best = compare_models()" + ] + }, + { + "cell_type": "code", + "execution_count": 38, + "id": "adc82ce5", + "metadata": {}, + "outputs": [], + "source": [ + "# start mlflow server on localhost:5000\n", + "# !mlflow ui" + ] + }, + { + "cell_type": "markdown", + "id": "a06f9df7", + "metadata": {}, + "source": [ + "默认情况下,PyCaret 使用 `MLFlow` 记录器,可以使用 `log_experiment` 参数进行更改。 以下记录器可用:\n", + " \n", + " - mlflow\n", + " - wandb\n", + " - comet_ml\n", + " - dagshub\n", + " \n", + "您可能会发现有用的其他日志记录相关参数是:\n", + "\n", + "- experiment_custom_tags\n", + "- log_plots\n", + "- log_data\n", + "- log_profile\n", + "\n", + "有关更多信息,请查看 `setup` 函数的文档字符串。" + ] + }, + { + "cell_type": "code", + "execution_count": 39, + "id": "2f8b6aa1", + "metadata": {}, + "outputs": [], + "source": [ + "# help(setup)" + ] + }, + { + "cell_type": "markdown", + "id": "6ce0b555", + "metadata": {}, + "source": [ + "## ✅ Create Model\n", + "\n", + "此函数使用交叉验证训练和评估给定估计器的性能。 此函数的输出是一个评分表格,其中包含按fold计算的 CV 分数。 可以使用`get_metrics`函数访问在 CV 期间评估的指标。 可以使用 `add_metric` 和 `remove_metric` 函数添加或删除自定义指标。 可以使用模型函数访问所有可用模型。" + ] + }, + { + "cell_type": "code", + "execution_count": 40, + "id": "837cebfa", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
NameReferenceTurbo
ID
naiveNaive Forecastersktime.forecasting.naive.NaiveForecasterTrue
grand_meansGrand Means Forecastersktime.forecasting.naive.NaiveForecasterTrue
snaiveSeasonal Naive Forecastersktime.forecasting.naive.NaiveForecasterTrue
polytrendPolynomial Trend Forecastersktime.forecasting.trend.PolynomialTrendForeca...True
arimaARIMAsktime.forecasting.arima.ARIMATrue
auto_arimaAuto ARIMAsktime.forecasting.arima.AutoARIMATrue
exp_smoothExponential Smoothingsktime.forecasting.exp_smoothing.ExponentialSm...True
crostonCrostonsktime.forecasting.croston.CrostonTrue
etsETSsktime.forecasting.ets.AutoETSTrue
thetaTheta Forecastersktime.forecasting.theta.ThetaForecasterTrue
tbatsTBATSsktime.forecasting.tbats.TBATSFalse
batsBATSsktime.forecasting.bats.BATSFalse
lr_cds_dtLinear w/ Cond. Deseasonalize & Detrendingpycaret.containers.models.time_series.BaseCdsD...True
en_cds_dtElastic Net w/ Cond. Deseasonalize & Detrendingpycaret.containers.models.time_series.BaseCdsD...True
ridge_cds_dtRidge w/ Cond. Deseasonalize & Detrendingpycaret.containers.models.time_series.BaseCdsD...True
lasso_cds_dtLasso w/ Cond. Deseasonalize & Detrendingpycaret.containers.models.time_series.BaseCdsD...True
lar_cds_dtLeast Angular Regressor w/ Cond. Deseasonalize...pycaret.containers.models.time_series.BaseCdsD...True
llar_cds_dtLasso Least Angular Regressor w/ Cond. Deseaso...pycaret.containers.models.time_series.BaseCdsD...True
br_cds_dtBayesian Ridge w/ Cond. Deseasonalize & Detren...pycaret.containers.models.time_series.BaseCdsD...True
huber_cds_dtHuber w/ Cond. Deseasonalize & Detrendingpycaret.containers.models.time_series.BaseCdsD...True
par_cds_dtPassive Aggressive w/ Cond. Deseasonalize & De...pycaret.containers.models.time_series.BaseCdsD...True
omp_cds_dtOrthogonal Matching Pursuit w/ Cond. Deseasona...pycaret.containers.models.time_series.BaseCdsD...True
knn_cds_dtK Neighbors w/ Cond. Deseasonalize & Detrendingpycaret.containers.models.time_series.BaseCdsD...True
dt_cds_dtDecision Tree w/ Cond. Deseasonalize & Detrendingpycaret.containers.models.time_series.BaseCdsD...True
rf_cds_dtRandom Forest w/ Cond. Deseasonalize & Detrendingpycaret.containers.models.time_series.BaseCdsD...True
et_cds_dtExtra Trees w/ Cond. Deseasonalize & Detrendingpycaret.containers.models.time_series.BaseCdsD...True
gbr_cds_dtGradient Boosting w/ Cond. Deseasonalize & Det...pycaret.containers.models.time_series.BaseCdsD...True
ada_cds_dtAdaBoost w/ Cond. Deseasonalize & Detrendingpycaret.containers.models.time_series.BaseCdsD...True
xgboost_cds_dtExtreme Gradient Boosting w/ Cond. Deseasonali...pycaret.containers.models.time_series.BaseCdsD...True
lightgbm_cds_dtLight Gradient Boosting w/ Cond. Deseasonalize...pycaret.containers.models.time_series.BaseCdsD...True
\n", + "
" + ], + "text/plain": [ + " Name \\\n", + "ID \n", + "naive Naive Forecaster \n", + "grand_means Grand Means Forecaster \n", + "snaive Seasonal Naive Forecaster \n", + "polytrend Polynomial Trend Forecaster \n", + "arima ARIMA \n", + "auto_arima Auto ARIMA \n", + "exp_smooth Exponential Smoothing \n", + "croston Croston \n", + "ets ETS \n", + "theta Theta Forecaster \n", + "tbats TBATS \n", + "bats BATS \n", + "lr_cds_dt Linear w/ Cond. Deseasonalize & Detrending \n", + "en_cds_dt Elastic Net w/ Cond. Deseasonalize & Detrending \n", + "ridge_cds_dt Ridge w/ Cond. Deseasonalize & Detrending \n", + "lasso_cds_dt Lasso w/ Cond. Deseasonalize & Detrending \n", + "lar_cds_dt Least Angular Regressor w/ Cond. Deseasonalize... \n", + "llar_cds_dt Lasso Least Angular Regressor w/ Cond. Deseaso... \n", + "br_cds_dt Bayesian Ridge w/ Cond. Deseasonalize & Detren... \n", + "huber_cds_dt Huber w/ Cond. Deseasonalize & Detrending \n", + "par_cds_dt Passive Aggressive w/ Cond. Deseasonalize & De... \n", + "omp_cds_dt Orthogonal Matching Pursuit w/ Cond. Deseasona... \n", + "knn_cds_dt K Neighbors w/ Cond. Deseasonalize & Detrending \n", + "dt_cds_dt Decision Tree w/ Cond. Deseasonalize & Detrending \n", + "rf_cds_dt Random Forest w/ Cond. Deseasonalize & Detrending \n", + "et_cds_dt Extra Trees w/ Cond. Deseasonalize & Detrending \n", + "gbr_cds_dt Gradient Boosting w/ Cond. Deseasonalize & Det... \n", + "ada_cds_dt AdaBoost w/ Cond. Deseasonalize & Detrending \n", + "xgboost_cds_dt Extreme Gradient Boosting w/ Cond. Deseasonali... \n", + "lightgbm_cds_dt Light Gradient Boosting w/ Cond. Deseasonalize... \n", + "\n", + " Reference Turbo \n", + "ID \n", + "naive sktime.forecasting.naive.NaiveForecaster True \n", + "grand_means sktime.forecasting.naive.NaiveForecaster True \n", + "snaive sktime.forecasting.naive.NaiveForecaster True \n", + "polytrend sktime.forecasting.trend.PolynomialTrendForeca... True \n", + "arima sktime.forecasting.arima.ARIMA True \n", + "auto_arima sktime.forecasting.arima.AutoARIMA True \n", + "exp_smooth sktime.forecasting.exp_smoothing.ExponentialSm... True \n", + "croston sktime.forecasting.croston.Croston True \n", + "ets sktime.forecasting.ets.AutoETS True \n", + "theta sktime.forecasting.theta.ThetaForecaster True \n", + "tbats sktime.forecasting.tbats.TBATS False \n", + "bats sktime.forecasting.bats.BATS False \n", + "lr_cds_dt pycaret.containers.models.time_series.BaseCdsD... True \n", + "en_cds_dt pycaret.containers.models.time_series.BaseCdsD... True \n", + "ridge_cds_dt pycaret.containers.models.time_series.BaseCdsD... True \n", + "lasso_cds_dt pycaret.containers.models.time_series.BaseCdsD... True \n", + "lar_cds_dt pycaret.containers.models.time_series.BaseCdsD... True \n", + "llar_cds_dt pycaret.containers.models.time_series.BaseCdsD... True \n", + "br_cds_dt pycaret.containers.models.time_series.BaseCdsD... True \n", + "huber_cds_dt pycaret.containers.models.time_series.BaseCdsD... True \n", + "par_cds_dt pycaret.containers.models.time_series.BaseCdsD... True \n", + "omp_cds_dt pycaret.containers.models.time_series.BaseCdsD... True \n", + "knn_cds_dt pycaret.containers.models.time_series.BaseCdsD... True \n", + "dt_cds_dt pycaret.containers.models.time_series.BaseCdsD... True \n", + "rf_cds_dt pycaret.containers.models.time_series.BaseCdsD... True \n", + "et_cds_dt pycaret.containers.models.time_series.BaseCdsD... True \n", + "gbr_cds_dt pycaret.containers.models.time_series.BaseCdsD... True \n", + "ada_cds_dt pycaret.containers.models.time_series.BaseCdsD... True \n", + "xgboost_cds_dt pycaret.containers.models.time_series.BaseCdsD... True \n", + "lightgbm_cds_dt pycaret.containers.models.time_series.BaseCdsD... True " + ] + }, + "execution_count": 40, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# 查看所有可用的模型\n", + "models()" + ] + }, + { + "cell_type": "code", + "execution_count": 41, + "id": "16641cab", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [ + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
 cutoffMASERMSSEMAERMSEMAPESMAPER2
01959-120.50830.723715.476625.00400.03710.0354-2.8434
11960-030.68560.626221.031921.79880.04370.04480.5529
21960-060.27970.31238.774311.12860.01470.01460.9512
MeanNaT0.49120.554115.094319.31050.03180.0316-0.4464
SDNaT0.16620.17555.01155.93160.01240.01261.7027
\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "# 训练 ets 模型 默认参数 fold=3\n", + "ets = create_model('ets')" + ] + }, + { + "cell_type": "markdown", + "id": "074b4572", + "metadata": {}, + "source": [ + "上面的函数返回经过训练的模型对象作为输出。评分网格只显示不返回。如果您需要访问评分网格,您可以使用`pull`函数来访问dataframe。" + ] + }, + { + "cell_type": "code", + "execution_count": 42, + "id": "fe277e1b", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n" + ] + }, + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
cutoffMASERMSSEMAERMSEMAPESMAPER2
01959-120.50830.723715.476625.00400.03710.0354-2.8434
11960-030.68560.626221.031921.79880.04370.04480.5529
21960-060.27970.31238.774311.12860.01470.01460.9512
MeanNaT0.49120.554115.094319.31050.03180.0316-0.4464
SDNaT0.16620.17555.01155.93160.01240.01261.7027
\n", + "
" + ], + "text/plain": [ + " cutoff MASE RMSSE MAE RMSE MAPE SMAPE R2\n", + "0 1959-12 0.5083 0.7237 15.4766 25.0040 0.0371 0.0354 -2.8434\n", + "1 1960-03 0.6856 0.6262 21.0319 21.7988 0.0437 0.0448 0.5529\n", + "2 1960-06 0.2797 0.3123 8.7743 11.1286 0.0147 0.0146 0.9512\n", + "Mean NaT 0.4912 0.5541 15.0943 19.3105 0.0318 0.0316 -0.4464\n", + "SD NaT 0.1662 0.1755 5.0115 5.9316 0.0124 0.0126 1.7027" + ] + }, + "execution_count": 42, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "ets_results = pull()\n", + "print(type(ets_results))\n", + "ets_results" + ] + }, + { + "cell_type": "code", + "execution_count": 43, + "id": "148a74c4", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [ + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
 cutoffMASERMSSEMAERMSEMAPESMAPER2
01959-060.81520.821223.711427.07770.04360.04480.6016
11959-090.16220.17234.83395.82160.01270.01280.9213
21959-120.67880.785720.670027.14320.05010.0481-3.5292
31960-032.03771.803762.507562.78740.12760.1363-2.7090
41960-060.53520.528716.789518.83590.02820.02860.8603
MeanNaT0.84580.822325.702428.33320.05240.0541-0.7710
SDNaT0.63460.542819.487618.90530.03970.04301.9377
\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "# 使用参数 fold=5 训练 theta模型\n", + "theta = create_model('theta', fold=5)" + ] + }, + { + "cell_type": "code", + "execution_count": 44, + "id": "5a8906a8", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [ + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
 cutoffMASERMSSEMAERMSEMAPESMAPER2
01959-061.95971.965857.003364.82140.10460.1117-1.2833
11959-092.55282.333776.059278.85910.19790.1784-13.4324
21959-120.39800.368612.120612.73510.03000.02980.0030
31960-032.16882.116366.526273.66880.13240.1436-4.1060
41960-061.95521.829161.339165.16820.10340.1083-0.6723
MeanNaT1.80691.722754.609759.05050.11360.1143-3.8982
SDNaT0.73720.697422.173923.75680.05410.04934.9680
\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [ + "
ThetaForecaster(deseasonalize=False, sp=12)
In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook.
On GitHub, the HTML representation is unable to render, please try loading this page with nbviewer.org.
" + ], + "text/plain": [ + "ThetaForecaster(deseasonalize=False, sp=12)" + ] + }, + "execution_count": 44, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# 训练 theta 模型指定模型参数\n", + "create_model('theta', deseasonalize = False, fold=5)" + ] + }, + { + "cell_type": "markdown", + "id": "08634e9e", + "metadata": {}, + "source": [ + "您可能会发现非常有用的其他一些参数`create_model`是:\n", + "\n", + "- cross_validation\n", + "- engine\n", + "- fit_kwargs\n", + "\n", + "您可以查看函数的文档字符串以获取更多信息。" + ] + }, + { + "cell_type": "code", + "execution_count": 45, + "id": "3fb32c74", + "metadata": {}, + "outputs": [], + "source": [ + "# help(create_model)" + ] + }, + { + "cell_type": "markdown", + "id": "d5378836", + "metadata": {}, + "source": [ + "## ✅ Tune Model\n", + "\n", + "该`tune_model`函数调整模型的超参数。此函数的输出是一个评分表格,其中包含按fold交叉验证的分数。根据优化参数中定义的指标选择最佳模型。可以使用该函数访问在交叉验证期间评估的指标`get_metrics`。`add_metric`可以使用和函数添加或删除自定义指标`remove_metric`。" + ] + }, + { + "cell_type": "code", + "execution_count": 46, + "id": "402597f2", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [ + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
 cutoffMASERMSSEMAERMSEMAPESMAPER2
01959-120.50390.545915.343418.85930.03770.0388-1.1865
11960-031.55661.374747.748947.85260.09840.1036-1.1544
21960-061.51851.483247.639552.84330.08380.0884-0.0996
MeanNaT1.19301.134636.910639.85180.07330.0769-0.8135
SDNaT0.48750.418615.250414.98310.02590.02770.5050
\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "# 使用默认参数训练 dt 模型\n", + "dt = create_model('dt_cds_dt')" + ] + }, + { + "cell_type": "code", + "execution_count": 47, + "id": "90dc451d", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [ + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
 cutoffMASERMSSEMAERMSEMAPESMAPER2
01959-120.63690.782219.393827.02250.04700.0450-3.4890
11960-031.30051.163939.893840.51550.08190.0856-0.5444
21960-060.95610.978829.997134.87420.04950.05120.5211
MeanNaT0.96450.975029.761634.13740.05950.0606-1.1708
SDNaT0.27100.15598.37075.53310.01590.01781.6960
\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Fitting 3 folds for each of 10 candidates, totalling 30 fits\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "[Parallel(n_jobs=-1)]: Using backend LokyBackend with 32 concurrent workers.\n", + "[Parallel(n_jobs=-1)]: Done 30 out of 30 | elapsed: 0.6s finished\n" + ] + } + ], + "source": [ + "# 调整 dt 的超参数\n", + "tuned_dt = tune_model(dt)" + ] + }, + { + "cell_type": "markdown", + "id": "805b66b9", + "metadata": {}, + "source": [ + "可以在参数中定义要优化的指标`optimize`(默认值 = 'MASE')。此外,可以使用`custom_grid`参数传递自定义调整表格。" + ] + }, + { + "cell_type": "code", + "execution_count": 48, + "id": "cca8e640", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
BaseCdsDtForecaster(fe_target_rr=[WindowSummarizer(lag_feature={'lag': [12, 11,\n",
+       "                                                                        10, 9,\n",
+       "                                                                        8, 7, 6,\n",
+       "                                                                        5, 4, 3,\n",
+       "                                                                        2, 1]},\n",
+       "                                                   n_jobs=1)],\n",
+       "                    regressor=DecisionTreeRegressor(random_state=123), sp=12,\n",
+       "                    window_length=12)
In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook.
On GitHub, the HTML representation is unable to render, please try loading this page with nbviewer.org.
" + ], + "text/plain": [ + "BaseCdsDtForecaster(fe_target_rr=[WindowSummarizer(lag_feature={'lag': [12, 11,\n", + " 10, 9,\n", + " 8, 7, 6,\n", + " 5, 4, 3,\n", + " 2, 1]},\n", + " n_jobs=1)],\n", + " regressor=DecisionTreeRegressor(random_state=123), sp=12,\n", + " window_length=12)" + ] + }, + "execution_count": 48, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "dt" + ] + }, + { + "cell_type": "code", + "execution_count": 49, + "id": "31e050ff", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [ + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
 cutoffMASERMSSEMAERMSEMAPESMAPER2
01959-120.54660.581516.645020.09100.04090.0421-1.4814
11960-031.27771.138839.194539.64190.07990.0833-0.4785
21960-061.67421.526252.523454.37720.09060.0952-0.1643
MeanNaT1.16621.082236.121038.03670.07050.0735-0.7081
SDNaT0.46700.387714.807714.04320.02140.02270.5617
\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Fitting 3 folds for each of 7 candidates, totalling 21 fits\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "[Parallel(n_jobs=-1)]: Using backend LokyBackend with 32 concurrent workers.\n", + "[Parallel(n_jobs=-1)]: Done 2 out of 21 | elapsed: 0.4s remaining: 3.8s\n", + "[Parallel(n_jobs=-1)]: Done 21 out of 21 | elapsed: 0.5s finished\n" + ] + } + ], + "source": [ + "# 定义超参数调试 grid\n", + "dt_grid = {'regressor__max_depth' : [None, 2, 4, 6, 8, 10, 12]}\n", + "\n", + "# 使用自定义网格和指标= MAE 来调整模型 \n", + "tuned_dt = tune_model(dt, custom_grid = dt_grid, optimize = 'MAE')" + ] + }, + { + "cell_type": "code", + "execution_count": 50, + "id": "a19788f5", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
BaseCdsDtForecaster(fe_target_rr=[WindowSummarizer(lag_feature={'lag': [12, 11,\n",
+       "                                                                        10, 9,\n",
+       "                                                                        8, 7, 6,\n",
+       "                                                                        5, 4, 3,\n",
+       "                                                                        2, 1]},\n",
+       "                                                   n_jobs=1)],\n",
+       "                    regressor=DecisionTreeRegressor(max_depth=4,\n",
+       "                                                    random_state=123),\n",
+       "                    sp=12, window_length=12)
In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook.
On GitHub, the HTML representation is unable to render, please try loading this page with nbviewer.org.
" + ], + "text/plain": [ + "BaseCdsDtForecaster(fe_target_rr=[WindowSummarizer(lag_feature={'lag': [12, 11,\n", + " 10, 9,\n", + " 8, 7, 6,\n", + " 5, 4, 3,\n", + " 2, 1]},\n", + " n_jobs=1)],\n", + " regressor=DecisionTreeRegressor(max_depth=4,\n", + " random_state=123),\n", + " sp=12, window_length=12)" + ] + }, + "execution_count": 50, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "#查看 tuned_dt 参数\n", + "tuned_dt" + ] + }, + { + "cell_type": "code", + "execution_count": 51, + "id": "6cca514b", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [ + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
 cutoffMASERMSSEMAERMSEMAPESMAPER2
01959-120.63690.782219.393827.02250.04700.0450-3.4890
11960-031.30051.163939.893840.51550.08190.0856-0.5444
21960-060.95610.978829.997134.87420.04950.05120.5211
MeanNaT0.96450.975029.761634.13740.05950.0606-1.1708
SDNaT0.27100.15598.37075.53310.01590.01781.6960
\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Fitting 3 folds for each of 10 candidates, totalling 30 fits\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "[Parallel(n_jobs=-1)]: Using backend LokyBackend with 32 concurrent workers.\n", + "[Parallel(n_jobs=-1)]: Done 30 out of 30 | elapsed: 0.6s finished\n" + ] + } + ], + "source": [ + "# 要访问调试器对象,您可以设置 return_tuner = True\n", + "tuned_dt, tuner = tune_model(dt, return_tuner=True)" + ] + }, + { + "cell_type": "code", + "execution_count": 52, + "id": "80cbb4a6", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
BaseCdsDtForecaster(degree=3, deseasonal_model='multiplicative',\n",
+       "                    fe_target_rr=[WindowSummarizer(lag_feature={'lag': [12, 11,\n",
+       "                                                                        10, 9,\n",
+       "                                                                        8, 7, 6,\n",
+       "                                                                        5, 4, 3,\n",
+       "                                                                        2, 1]},\n",
+       "                                                   n_jobs=1)],\n",
+       "                    regressor=DecisionTreeRegressor(max_depth=9,\n",
+       "                                                    max_features='log2',\n",
+       "                                                    min_impurity_decrease=0.005742993267225779,\n",
+       "                                                    min_samples_leaf=5,\n",
+       "                                                    min_samples_split=4,\n",
+       "                                                    random_state=123),\n",
+       "                    sp=12, window_length=22)
In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook.
On GitHub, the HTML representation is unable to render, please try loading this page with nbviewer.org.
" + ], + "text/plain": [ + "BaseCdsDtForecaster(degree=3, deseasonal_model='multiplicative',\n", + " fe_target_rr=[WindowSummarizer(lag_feature={'lag': [12, 11,\n", + " 10, 9,\n", + " 8, 7, 6,\n", + " 5, 4, 3,\n", + " 2, 1]},\n", + " n_jobs=1)],\n", + " regressor=DecisionTreeRegressor(max_depth=9,\n", + " max_features='log2',\n", + " min_impurity_decrease=0.005742993267225779,\n", + " min_samples_leaf=5,\n", + " min_samples_split=4,\n", + " random_state=123),\n", + " sp=12, window_length=22)" + ] + }, + "execution_count": 52, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# 模型对象\n", + "tuned_dt" + ] + }, + { + "cell_type": "code", + "execution_count": 53, + "id": "7d5e49ca", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "" + ] + }, + "execution_count": 53, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# 调试器对象\n", + "tuner" + ] + }, + { + "cell_type": "markdown", + "id": "a1e2875b", + "metadata": {}, + "source": [ + "有关所有可用的更多详细信息`search_library` ,`search_algorithm`请查看文档字符串。您可能会发现非常有用的`tune_model`中的其他一些参数是:\n", + "\n", + "- choose_better\n", + "- custom_scorer\n", + "- n_iter\n", + "- search_algorithm\n", + "- optimize\n", + "\n", + "您可以查看函数的文档字符串以获取更多信息。" + ] + }, + { + "cell_type": "code", + "execution_count": 54, + "id": "94f9c86e", + "metadata": {}, + "outputs": [], + "source": [ + "# help(tune_model)" + ] + }, + { + "cell_type": "markdown", + "id": "ea8a9a4e", + "metadata": {}, + "source": [ + "## ✅ Blend Models" + ] + }, + { + "cell_type": "markdown", + "id": "2ede29c4", + "metadata": {}, + "source": [ + "blend_models是一种集成模型的方法,此方法训练一个`EnsembleForecaster`为在 estimator_list 参数中传递的多个特定模型。此函数的输出是一个评分表格,其中包含按fold计算的 CV 分数。可以使用该函数访问在 CV 期间评估的指标`get_metrics`。`add_metric`可以使用和函数添加或删除自定义指标`remove_metric`。" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "948d24c3", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": 55, + "id": "61a7a1c5", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "[AutoETS(seasonal='mul', sp=12, trend='add'),\n", + " ExponentialSmoothing(seasonal='mul', sp=12, trend='add'),\n", + " ARIMA(seasonal_order=(0, 1, 0, 12))]" + ] + }, + "execution_count": 55, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# 基于最优 mae 的前 3 个模型\n", + "best_mae_models_top3" + ] + }, + { + "cell_type": "code", + "execution_count": 56, + "id": "04f65f2f", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [ + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
 cutoffMASERMSSEMAERMSEMAPESMAPER2
01959-120.51320.694915.626424.00880.03750.0360-2.5436
11960-030.90230.811427.676928.24480.05720.05900.2494
21960-060.26500.26748.31449.52560.01380.01380.9643
MeanNaT0.56020.591217.205920.59310.03620.0362-0.4433
SDNaT0.26230.23397.98328.01470.01770.01851.5135
\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [ + "
_EnsembleForecasterWithVoting(forecasters=[('ETS',\n",
+       "                                            AutoETS(seasonal='mul', sp=12,\n",
+       "                                                    trend='add')),\n",
+       "                                           ('Exponential Smoothing',\n",
+       "                                            ExponentialSmoothing(seasonal='mul',\n",
+       "                                                                 sp=12,\n",
+       "                                                                 trend='add')),\n",
+       "                                           ('ARIMA',\n",
+       "                                            ARIMA(seasonal_order=(0, 1, 0,\n",
+       "                                                                  12)))],\n",
+       "                              n_jobs=-1)
In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook.
On GitHub, the HTML representation is unable to render, please try loading this page with nbviewer.org.
" + ], + "text/plain": [ + "_EnsembleForecasterWithVoting(forecasters=[('ETS',\n", + " AutoETS(seasonal='mul', sp=12,\n", + " trend='add')),\n", + " ('Exponential Smoothing',\n", + " ExponentialSmoothing(seasonal='mul',\n", + " sp=12,\n", + " trend='add')),\n", + " ('ARIMA',\n", + " ARIMA(seasonal_order=(0, 1, 0,\n", + " 12)))],\n", + " n_jobs=-1)" + ] + }, + "execution_count": 56, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# 混合(blend) 前3个模型\n", + "blend_models(best_mae_models_top3)" + ] + }, + { + "cell_type": "markdown", + "id": "9e788c9c", + "metadata": {}, + "source": [ + "您可能会发现`blend_models`非常有用的其他一些参数是:\n", + "\n", + "\n", + "- choose_better\n", + "- method\n", + "- weights\n", + "- fit_kwargs\n", + "- optimize\n", + "\n", + "您可以查看函数的文档字符串以获取更多信息。" + ] + }, + { + "cell_type": "code", + "execution_count": 57, + "id": "99b549a6", + "metadata": {}, + "outputs": [], + "source": [ + "# help(blend_models)" + ] + }, + { + "cell_type": "markdown", + "id": "279a3127", + "metadata": {}, + "source": [ + "## ✅ 模型绘图" + ] + }, + { + "cell_type": "markdown", + "id": "862bd3e9", + "metadata": {}, + "source": [ + "此函数分析训练模型在保留集上的性能。在某些情况下可能需要重新训练模型。" + ] + }, + { + "cell_type": "code", + "execution_count": 58, + "id": "9c8da9b4", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + " \n", + " " + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "application/vnd.plotly.v1+json": { + "config": { + "plotlyServerURL": "https://plotly.com" + }, + "data": [ + { + "line": { + "color": "#1f77b4" + }, + "marker": { + "size": 5 + }, + "mode": "lines+markers", + "name": "Forecast | ETS", + "showlegend": true, + "type": "scatter", + "x": [ + "1960-10-01T00:00:00", + "1960-11-01T00:00:00", + "1960-12-01T00:00:00" + ], + "y": [ + 442.9862, + 388.2091, + 427.7009 + ] + }, + { + "line": { + "width": 0 + }, + "marker": { + "color": "#68BBE3" + }, + "mode": "lines", + "name": "Lower Interval", + "showlegend": false, + "type": "scatter", + "x": [ + "1960-10-01T00:00:00", + "1960-11-01T00:00:00", + "1960-12-01T00:00:00" + ], + "y": [ + 424.9511, + 371.5726, + 409.45 + ] + }, + { + "fill": "tonexty", + "fillcolor": "rgba(104,187,227,0.5)", + "line": { + "width": 0 + }, + "marker": { + "color": "#68BBE3" + }, + "mode": "lines", + "name": "Prediction Interval | ETS", + "showlegend": true, + "type": "scatter", + "x": [ + "1960-10-01T00:00:00", + "1960-11-01T00:00:00", + "1960-12-01T00:00:00" + ], + "y": [ + 461.5179, + 406.9327, + 448.098 + ] + }, + { + "marker": { + "color": "#3f3f3f", + "size": 5 + }, + "mode": "lines+markers", + "name": "Original", + "showlegend": true, + "type": "scatter", + "x": [ + "1949-01-01T00:00:00", + "1949-02-01T00:00:00", + "1949-03-01T00:00:00", + "1949-04-01T00:00:00", + "1949-05-01T00:00:00", + "1949-06-01T00:00:00", + "1949-07-01T00:00:00", + "1949-08-01T00:00:00", + "1949-09-01T00:00:00", + "1949-10-01T00:00:00", + "1949-11-01T00:00:00", + "1949-12-01T00:00:00", + "1950-01-01T00:00:00", + "1950-02-01T00:00:00", + "1950-03-01T00:00:00", + "1950-04-01T00:00:00", + "1950-05-01T00:00:00", + "1950-06-01T00:00:00", + "1950-07-01T00:00:00", + "1950-08-01T00:00:00", + "1950-09-01T00:00:00", + "1950-10-01T00:00:00", + "1950-11-01T00:00:00", + "1950-12-01T00:00:00", + "1951-01-01T00:00:00", + "1951-02-01T00:00:00", + "1951-03-01T00:00:00", + "1951-04-01T00:00:00", + "1951-05-01T00:00:00", + "1951-06-01T00:00:00", + "1951-07-01T00:00:00", + "1951-08-01T00:00:00", + "1951-09-01T00:00:00", + "1951-10-01T00:00:00", + "1951-11-01T00:00:00", + "1951-12-01T00:00:00", + "1952-01-01T00:00:00", + "1952-02-01T00:00:00", + "1952-03-01T00:00:00", + "1952-04-01T00:00:00", + "1952-05-01T00:00:00", + "1952-06-01T00:00:00", + "1952-07-01T00:00:00", + "1952-08-01T00:00:00", + "1952-09-01T00:00:00", + "1952-10-01T00:00:00", + "1952-11-01T00:00:00", + "1952-12-01T00:00:00", + "1953-01-01T00:00:00", + "1953-02-01T00:00:00", + "1953-03-01T00:00:00", + "1953-04-01T00:00:00", + "1953-05-01T00:00:00", + "1953-06-01T00:00:00", + "1953-07-01T00:00:00", + "1953-08-01T00:00:00", + "1953-09-01T00:00:00", + "1953-10-01T00:00:00", + "1953-11-01T00:00:00", + "1953-12-01T00:00:00", + "1954-01-01T00:00:00", + "1954-02-01T00:00:00", + "1954-03-01T00:00:00", + "1954-04-01T00:00:00", + "1954-05-01T00:00:00", + "1954-06-01T00:00:00", + "1954-07-01T00:00:00", + "1954-08-01T00:00:00", + "1954-09-01T00:00:00", + "1954-10-01T00:00:00", + "1954-11-01T00:00:00", + "1954-12-01T00:00:00", + "1955-01-01T00:00:00", + "1955-02-01T00:00:00", + "1955-03-01T00:00:00", + "1955-04-01T00:00:00", + "1955-05-01T00:00:00", + "1955-06-01T00:00:00", + "1955-07-01T00:00:00", + "1955-08-01T00:00:00", + "1955-09-01T00:00:00", + "1955-10-01T00:00:00", + "1955-11-01T00:00:00", + "1955-12-01T00:00:00", + "1956-01-01T00:00:00", + "1956-02-01T00:00:00", + "1956-03-01T00:00:00", + "1956-04-01T00:00:00", + "1956-05-01T00:00:00", + "1956-06-01T00:00:00", + "1956-07-01T00:00:00", + "1956-08-01T00:00:00", + "1956-09-01T00:00:00", + "1956-10-01T00:00:00", + "1956-11-01T00:00:00", + "1956-12-01T00:00:00", + "1957-01-01T00:00:00", + "1957-02-01T00:00:00", + "1957-03-01T00:00:00", + "1957-04-01T00:00:00", + "1957-05-01T00:00:00", + "1957-06-01T00:00:00", + "1957-07-01T00:00:00", + "1957-08-01T00:00:00", + "1957-09-01T00:00:00", + "1957-10-01T00:00:00", + "1957-11-01T00:00:00", + "1957-12-01T00:00:00", + "1958-01-01T00:00:00", + "1958-02-01T00:00:00", + "1958-03-01T00:00:00", + "1958-04-01T00:00:00", + "1958-05-01T00:00:00", + "1958-06-01T00:00:00", + "1958-07-01T00:00:00", + "1958-08-01T00:00:00", + "1958-09-01T00:00:00", + "1958-10-01T00:00:00", + "1958-11-01T00:00:00", + "1958-12-01T00:00:00", + "1959-01-01T00:00:00", + "1959-02-01T00:00:00", + "1959-03-01T00:00:00", + "1959-04-01T00:00:00", + "1959-05-01T00:00:00", + "1959-06-01T00:00:00", + "1959-07-01T00:00:00", + "1959-08-01T00:00:00", + "1959-09-01T00:00:00", + "1959-10-01T00:00:00", + "1959-11-01T00:00:00", + "1959-12-01T00:00:00", + "1960-01-01T00:00:00", + "1960-02-01T00:00:00", + "1960-03-01T00:00:00", + "1960-04-01T00:00:00", + "1960-05-01T00:00:00", + "1960-06-01T00:00:00", + "1960-07-01T00:00:00", + "1960-08-01T00:00:00", + "1960-09-01T00:00:00", + "1960-10-01T00:00:00", + "1960-11-01T00:00:00", + "1960-12-01T00:00:00" + ], + "y": [ + 112, + 118, + 132, + 129, + 121, + 135, + 148, + 148, + 136, + 119, + 104, + 118, + 115, + 126, + 141, + 135, + 125, + 149, + 170, + 170, + 158, + 133, + 114, + 140, + 145, + 150, + 178, + 163, + 172, + 178, + 199, + 199, + 184, + 162, + 146, + 166, + 171, + 180, + 193, + 181, + 183, + 218, + 230, + 242, + 209, + 191, + 172, + 194, + 196, + 196, + 236, + 235, + 229, + 243, + 264, + 272, + 237, + 211, + 180, + 201, + 204, + 188, + 235, + 227, + 234, + 264, + 302, + 293, + 259, + 229, + 203, + 229, + 242, + 233, + 267, + 269, + 270, + 315, + 364, + 347, + 312, + 274, + 237, + 278, + 284, + 277, + 317, + 313, + 318, + 374, + 413, + 405, + 355, + 306, + 271, + 306, + 315, + 301, + 356, + 348, + 355, + 422, + 465, + 467, + 404, + 347, + 305, + 336, + 340, + 318, + 362, + 348, + 363, + 435, + 491, + 505, + 404, + 359, + 310, + 337, + 360, + 342, + 406, + 396, + 420, + 472, + 548, + 559, + 463, + 407, + 362, + 405, + 417, + 391, + 419, + 461, + 472, + 535, + 622, + 606, + 508, + 461, + 390, + 432 + ] + } + ], + "layout": { + "showlegend": true, + "template": { + "data": { + "bar": [ + { + "error_x": { + "color": "rgb(51,51,51)" + }, + "error_y": { + "color": "rgb(51,51,51)" + }, + "marker": { + "line": { + "color": "rgb(237,237,237)", + "width": 0.5 + }, + "pattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + } + }, + "type": "bar" + } + ], + "barpolar": [ + { + "marker": { + "line": { + "color": "rgb(237,237,237)", + "width": 0.5 + }, + "pattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + } + }, + "type": "barpolar" + } + ], + "carpet": [ + { + "aaxis": { + "endlinecolor": "rgb(51,51,51)", + "gridcolor": "white", + "linecolor": "white", + "minorgridcolor": "white", + "startlinecolor": "rgb(51,51,51)" + }, + "baxis": { + "endlinecolor": "rgb(51,51,51)", + "gridcolor": "white", + "linecolor": "white", + "minorgridcolor": "white", + "startlinecolor": "rgb(51,51,51)" + }, + "type": "carpet" + } + ], + "choropleth": [ + { + "colorbar": { + "outlinewidth": 0, + "tickcolor": "rgb(237,237,237)", + "ticklen": 6, + "ticks": "inside" + }, + "type": "choropleth" + } + ], + "contour": [ + { + "colorbar": { + "outlinewidth": 0, + "tickcolor": "rgb(237,237,237)", + "ticklen": 6, + "ticks": "inside" + }, + "colorscale": [ + [ + 0, + "rgb(20,44,66)" + ], + [ + 1, + "rgb(90,179,244)" + ] + ], + "type": "contour" + } + ], + "contourcarpet": [ + { + "colorbar": { + "outlinewidth": 0, + "tickcolor": "rgb(237,237,237)", + "ticklen": 6, + "ticks": "inside" + }, + "type": "contourcarpet" + } + ], + "heatmap": [ + { + "colorbar": { + "outlinewidth": 0, + "tickcolor": "rgb(237,237,237)", + "ticklen": 6, + "ticks": "inside" + }, + "colorscale": [ + [ + 0, + "rgb(20,44,66)" + ], + [ + 1, + "rgb(90,179,244)" + ] + ], + "type": "heatmap" + } + ], + "heatmapgl": [ + { + "colorbar": { + "outlinewidth": 0, + "tickcolor": "rgb(237,237,237)", + "ticklen": 6, + "ticks": "inside" + }, + "colorscale": [ + [ + 0, + "rgb(20,44,66)" + ], + [ + 1, + "rgb(90,179,244)" + ] + ], + "type": "heatmapgl" + } + ], + "histogram": [ + { + "marker": { + "pattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + } + }, + "type": "histogram" + } + ], + "histogram2d": [ + { + "colorbar": { + "outlinewidth": 0, + "tickcolor": "rgb(237,237,237)", + "ticklen": 6, + "ticks": "inside" + }, + "colorscale": [ + [ + 0, + "rgb(20,44,66)" + ], + [ + 1, + "rgb(90,179,244)" + ] + ], + "type": "histogram2d" + } + ], + "histogram2dcontour": [ + { + "colorbar": { + "outlinewidth": 0, + "tickcolor": "rgb(237,237,237)", + "ticklen": 6, + "ticks": "inside" + }, + "colorscale": [ + [ + 0, + "rgb(20,44,66)" + ], + [ + 1, + "rgb(90,179,244)" + ] + ], + "type": "histogram2dcontour" + } + ], + "mesh3d": [ + { + "colorbar": { + "outlinewidth": 0, + "tickcolor": "rgb(237,237,237)", + "ticklen": 6, + "ticks": "inside" + }, + "type": "mesh3d" + } + ], + "parcoords": [ + { + "line": { + "colorbar": { + "outlinewidth": 0, + "tickcolor": "rgb(237,237,237)", + "ticklen": 6, + "ticks": "inside" + } + }, + "type": "parcoords" + } + ], + "pie": [ + { + "automargin": true, + "type": "pie" + } + ], + "scatter": [ + { + "fillpattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + }, + "type": "scatter" + } + ], + "scatter3d": [ + { + "line": { + "colorbar": { + "outlinewidth": 0, + "tickcolor": "rgb(237,237,237)", + "ticklen": 6, + "ticks": "inside" + } + }, + "marker": { + "colorbar": { + "outlinewidth": 0, + "tickcolor": "rgb(237,237,237)", + "ticklen": 6, + "ticks": "inside" + } + }, + "type": "scatter3d" + } + ], + "scattercarpet": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "tickcolor": "rgb(237,237,237)", + "ticklen": 6, + "ticks": "inside" + } + }, + "type": "scattercarpet" + } + ], + "scattergeo": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "tickcolor": "rgb(237,237,237)", + "ticklen": 6, + "ticks": "inside" + } + }, + "type": "scattergeo" + } + ], + "scattergl": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "tickcolor": "rgb(237,237,237)", + "ticklen": 6, + "ticks": "inside" + } + }, + "type": "scattergl" + } + ], + "scattermapbox": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "tickcolor": "rgb(237,237,237)", + "ticklen": 6, + "ticks": "inside" + } + }, + "type": "scattermapbox" + } + ], + "scatterpolar": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "tickcolor": "rgb(237,237,237)", + "ticklen": 6, + "ticks": "inside" + } + }, + "type": "scatterpolar" + } + ], + "scatterpolargl": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "tickcolor": "rgb(237,237,237)", + "ticklen": 6, + "ticks": "inside" + } + }, + "type": "scatterpolargl" + } + ], + "scatterternary": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "tickcolor": "rgb(237,237,237)", + "ticklen": 6, + "ticks": "inside" + } + }, + "type": "scatterternary" + } + ], + "surface": [ + { + "colorbar": { + "outlinewidth": 0, + "tickcolor": "rgb(237,237,237)", + "ticklen": 6, + "ticks": "inside" + }, + "colorscale": [ + [ + 0, + "rgb(20,44,66)" + ], + [ + 1, + "rgb(90,179,244)" + ] + ], + "type": "surface" + } + ], + "table": [ + { + "cells": { + "fill": { + "color": "rgb(237,237,237)" + }, + "line": { + "color": "white" + } + }, + "header": { + "fill": { + "color": "rgb(217,217,217)" + }, + "line": { + "color": "white" + } + }, + "type": "table" + } + ] + }, + "layout": { + "annotationdefaults": { + "arrowhead": 0, + "arrowwidth": 1 + }, + "autotypenumbers": "strict", + "coloraxis": { + "colorbar": { + "outlinewidth": 0, + "tickcolor": "rgb(237,237,237)", + "ticklen": 6, + "ticks": "inside" + } + }, + "colorscale": { + "sequential": [ + [ + 0, + "rgb(20,44,66)" + ], + [ + 1, + "rgb(90,179,244)" + ] + ], + "sequentialminus": [ + [ + 0, + "rgb(20,44,66)" + ], + [ + 1, + "rgb(90,179,244)" + ] + ] + }, + "colorway": [ + "#F8766D", + "#A3A500", + "#00BF7D", + "#00B0F6", + "#E76BF3" + ], + "font": { + "color": "rgb(51,51,51)" + }, + "geo": { + "bgcolor": "white", + "lakecolor": "white", + "landcolor": "rgb(237,237,237)", + "showlakes": true, + "showland": true, + "subunitcolor": "white" + }, + "hoverlabel": { + "align": "left" + }, + "hovermode": "closest", + "paper_bgcolor": "white", + "plot_bgcolor": "rgb(237,237,237)", + "polar": { + "angularaxis": { + "gridcolor": "white", + "linecolor": "white", + "showgrid": true, + "tickcolor": "rgb(51,51,51)", + "ticks": "outside" + }, + "bgcolor": "rgb(237,237,237)", + "radialaxis": { + "gridcolor": "white", + "linecolor": "white", + "showgrid": true, + "tickcolor": "rgb(51,51,51)", + "ticks": "outside" + } + }, + "scene": { + "xaxis": { + "backgroundcolor": "rgb(237,237,237)", + "gridcolor": "white", + "gridwidth": 2, + "linecolor": "white", + "showbackground": true, + "showgrid": true, + "tickcolor": "rgb(51,51,51)", + "ticks": "outside", + "zerolinecolor": "white" + }, + "yaxis": { + "backgroundcolor": "rgb(237,237,237)", + "gridcolor": "white", + "gridwidth": 2, + "linecolor": "white", + "showbackground": true, + "showgrid": true, + "tickcolor": "rgb(51,51,51)", + "ticks": "outside", + "zerolinecolor": "white" + }, + "zaxis": { + "backgroundcolor": "rgb(237,237,237)", + "gridcolor": "white", + "gridwidth": 2, + "linecolor": "white", + "showbackground": true, + "showgrid": true, + "tickcolor": "rgb(51,51,51)", + "ticks": "outside", + "zerolinecolor": "white" + } + }, + "shapedefaults": { + "fillcolor": "black", + "line": { + "width": 0 + }, + "opacity": 0.3 + }, + "ternary": { + "aaxis": { + "gridcolor": "white", + "linecolor": "white", + "showgrid": true, + "tickcolor": "rgb(51,51,51)", + "ticks": "outside" + }, + "baxis": { + "gridcolor": "white", + "linecolor": "white", + "showgrid": true, + "tickcolor": "rgb(51,51,51)", + "ticks": "outside" + }, + "bgcolor": "rgb(237,237,237)", + "caxis": { + "gridcolor": "white", + "linecolor": "white", + "showgrid": true, + "tickcolor": "rgb(51,51,51)", + "ticks": "outside" + } + }, + "xaxis": { + "automargin": true, + "gridcolor": "white", + "linecolor": "white", + "showgrid": true, + "tickcolor": "rgb(51,51,51)", + "ticks": "outside", + "title": { + "standoff": 15 + }, + "zerolinecolor": "white" + }, + "yaxis": { + "automargin": true, + "gridcolor": "white", + "linecolor": "white", + "showgrid": true, + "tickcolor": "rgb(51,51,51)", + "ticks": "outside", + "title": { + "standoff": 15 + }, + "zerolinecolor": "white" + } + } + }, + "title": { + "text": "Actual vs. 'Out-of-Sample' Forecast | Number of airline passengers" + }, + "xaxis": { + "title": { + "text": "Time" + } + }, + "yaxis": { + "title": { + "text": "Values" + } + } + } + }, + "text/html": [ + "
" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "# 绘制预测图\n", + "plot_model(best, plot = 'forecast')" + ] + }, + { + "cell_type": "code", + "execution_count": 59, + "id": "a750d486", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + " \n", + " " + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "application/vnd.plotly.v1+json": { + "config": { + "plotlyServerURL": "https://plotly.com" + }, + "data": [ + { + "line": { + "color": "#3f3f3f" + }, + "marker": { + "size": 10 + }, + "mode": "lines", + "name": "ACF", + "showlegend": false, + "type": "scattergl", + "x": [ + 0, + 0 + ], + "xaxis": "x", + "y": [ + 0, + 1 + ], + "yaxis": "y" + }, + { + "line": { + "color": "#3f3f3f" + }, + "marker": { + "size": 10 + }, + "mode": "lines", + "name": "ACF", + "showlegend": false, + "type": "scattergl", + "x": [ + 1, + 1 + ], + "xaxis": "x", + "y": [ + 0, + 0.9480473407524915 + ], + "yaxis": "y" + }, + { + "line": { + "color": "#3f3f3f" + }, + "marker": { + "size": 10 + }, + "mode": "lines", + "name": "ACF", + "showlegend": false, + "type": "scattergl", + "x": [ + 2, + 2 + ], + "xaxis": "x", + "y": [ + 0, + 0.8755748351253507 + ], + "yaxis": "y" + }, + { + "line": { + "color": "#3f3f3f" + }, + "marker": { + "size": 10 + }, + "mode": "lines", + "name": "ACF", + "showlegend": false, + "type": "scattergl", + "x": [ + 3, + 3 + ], + "xaxis": "x", + "y": [ + 0, + 0.8066811554965002 + ], + "yaxis": "y" + }, + { + "line": { + "color": "#3f3f3f" + }, + "marker": { + "size": 10 + }, + "mode": "lines", + "name": "ACF", + "showlegend": false, + "type": "scattergl", + "x": [ + 4, + 4 + ], + "xaxis": "x", + "y": [ + 0, + 0.7526254173883077 + ], + "yaxis": "y" + }, + { + "line": { + "color": "#3f3f3f" + }, + "marker": { + "size": 10 + }, + "mode": "lines", + "name": "ACF", + "showlegend": false, + "type": "scattergl", + "x": [ + 5, + 5 + ], + "xaxis": "x", + "y": [ + 0, + 0.7137699726519648 + ], + "yaxis": "y" + }, + { + "line": { + "color": "#3f3f3f" + }, + "marker": { + "size": 10 + }, + "mode": "lines", + "name": "ACF", + "showlegend": false, + "type": "scattergl", + "x": [ + 6, + 6 + ], + "xaxis": "x", + "y": [ + 0, + 0.6817336033310043 + ], + "yaxis": "y" + }, + { + "line": { + "color": "#3f3f3f" + }, + "marker": { + "size": 10 + }, + "mode": "lines", + "name": "ACF", + "showlegend": false, + "type": "scattergl", + "x": [ + 7, + 7 + ], + "xaxis": "x", + "y": [ + 0, + 0.6629043863684492 + ], + "yaxis": "y" + }, + { + "line": { + "color": "#3f3f3f" + }, + "marker": { + "size": 10 + }, + "mode": "lines", + "name": "ACF", + "showlegend": false, + "type": "scattergl", + "x": [ + 8, + 8 + ], + "xaxis": "x", + "y": [ + 0, + 0.6556104843250862 + ], + "yaxis": "y" + }, + { + "line": { + "color": "#3f3f3f" + }, + "marker": { + "size": 10 + }, + "mode": "lines", + "name": "ACF", + "showlegend": false, + "type": "scattergl", + "x": [ + 9, + 9 + ], + "xaxis": "x", + "y": [ + 0, + 0.6709483279245044 + ], + "yaxis": "y" + }, + { + "line": { + "color": "#3f3f3f" + }, + "marker": { + "size": 10 + }, + "mode": "lines", + "name": "ACF", + "showlegend": false, + "type": "scattergl", + "x": [ + 10, + 10 + ], + "xaxis": "x", + "y": [ + 0, + 0.7027199209090718 + ], + "yaxis": "y" + }, + { + "line": { + "color": "#3f3f3f" + }, + "marker": { + "size": 10 + }, + "mode": "lines", + "name": "ACF", + "showlegend": false, + "type": "scattergl", + "x": [ + 11, + 11 + ], + "xaxis": "x", + "y": [ + 0, + 0.7432401890069327 + ], + "yaxis": "y" + }, + { + "line": { + "color": "#3f3f3f" + }, + "marker": { + "size": 10 + }, + "mode": "lines", + "name": "ACF", + "showlegend": false, + "type": "scattergl", + "x": [ + 12, + 12 + ], + "xaxis": "x", + "y": [ + 0, + 0.7603950422625558 + ], + "yaxis": "y" + }, + { + "line": { + "color": "#3f3f3f" + }, + "marker": { + "size": 10 + }, + "mode": "lines", + "name": "ACF", + "showlegend": false, + "type": "scattergl", + "x": [ + 13, + 13 + ], + "xaxis": "x", + "y": [ + 0, + 0.7126608704038238 + ], + "yaxis": "y" + }, + { + "line": { + "color": "#3f3f3f" + }, + "marker": { + "size": 10 + }, + "mode": "lines", + "name": "ACF", + "showlegend": false, + "type": "scattergl", + "x": [ + 14, + 14 + ], + "xaxis": "x", + "y": [ + 0, + 0.6463422792677535 + ], + "yaxis": "y" + }, + { + "line": { + "color": "#3f3f3f" + }, + "marker": { + "size": 10 + }, + "mode": "lines", + "name": "ACF", + "showlegend": false, + "type": "scattergl", + "x": [ + 15, + 15 + ], + "xaxis": "x", + "y": [ + 0, + 0.5859234238634494 + ], + "yaxis": "y" + }, + { + "line": { + "color": "#3f3f3f" + }, + "marker": { + "size": 10 + }, + "mode": "lines", + "name": "ACF", + "showlegend": false, + "type": "scattergl", + "x": [ + 16, + 16 + ], + "xaxis": "x", + "y": [ + 0, + 0.5379551907815616 + ], + "yaxis": "y" + }, + { + "line": { + "color": "#3f3f3f" + }, + "marker": { + "size": 10 + }, + "mode": "lines", + "name": "ACF", + "showlegend": false, + "type": "scattergl", + "x": [ + 17, + 17 + ], + "xaxis": "x", + "y": [ + 0, + 0.49974752598517996 + ], + "yaxis": "y" + }, + { + "line": { + "color": "#3f3f3f" + }, + "marker": { + "size": 10 + }, + "mode": "lines", + "name": "ACF", + "showlegend": false, + "type": "scattergl", + "x": [ + 18, + 18 + ], + "xaxis": "x", + "y": [ + 0, + 0.46873401291508715 + ], + "yaxis": "y" + }, + { + "line": { + "color": "#3f3f3f" + }, + "marker": { + "size": 10 + }, + "mode": "lines", + "name": "ACF", + "showlegend": false, + "type": "scattergl", + "x": [ + 19, + 19 + ], + "xaxis": "x", + "y": [ + 0, + 0.4498706649766616 + ], + "yaxis": "y" + }, + { + "line": { + "color": "#3f3f3f" + }, + "marker": { + "size": 10 + }, + "mode": "lines", + "name": "ACF", + "showlegend": false, + "type": "scattergl", + "x": [ + 20, + 20 + ], + "xaxis": "x", + "y": [ + 0, + 0.4416287957460463 + ], + "yaxis": "y" + }, + { + "line": { + "color": "#3f3f3f" + }, + "marker": { + "size": 10 + }, + "mode": "lines", + "name": "ACF", + "showlegend": false, + "type": "scattergl", + "x": [ + 21, + 21 + ], + "xaxis": "x", + "y": [ + 0, + 0.4572237571141587 + ], + "yaxis": "y" + }, + { + "line": { + "color": "#3f3f3f" + }, + "marker": { + "size": 10 + }, + "mode": "lines", + "name": "ACF", + "showlegend": false, + "type": "scattergl", + "x": [ + 22, + 22 + ], + "xaxis": "x", + "y": [ + 0, + 0.4824820295144397 + ], + "yaxis": "y" + }, + { + "line": { + "color": "#3f3f3f" + }, + "marker": { + "size": 10 + }, + "mode": "lines", + "name": "ACF", + "showlegend": false, + "type": "scattergl", + "x": [ + 23, + 23 + ], + "xaxis": "x", + "y": [ + 0, + 0.5171269883891182 + ], + "yaxis": "y" + }, + { + "line": { + "color": "#3f3f3f" + }, + "marker": { + "size": 10 + }, + "mode": "lines", + "name": "ACF", + "showlegend": false, + "type": "scattergl", + "x": [ + 24, + 24 + ], + "xaxis": "x", + "y": [ + 0, + 0.532189830465802 + ], + "yaxis": "y" + }, + { + "line": { + "color": "#3f3f3f" + }, + "marker": { + "size": 10 + }, + "mode": "lines", + "name": "ACF", + "showlegend": false, + "type": "scattergl", + "x": [ + 25, + 25 + ], + "xaxis": "x", + "y": [ + 0, + 0.4939756937750339 + ], + "yaxis": "y" + }, + { + "line": { + "color": "#3f3f3f" + }, + "marker": { + "size": 10 + }, + "mode": "lines", + "name": "ACF", + "showlegend": false, + "type": "scattergl", + "x": [ + 26, + 26 + ], + "xaxis": "x", + "y": [ + 0, + 0.4377213370680656 + ], + "yaxis": "y" + }, + { + "line": { + "color": "#3f3f3f" + }, + "marker": { + "size": 10 + }, + "mode": "lines", + "name": "ACF", + "showlegend": false, + "type": "scattergl", + "x": [ + 27, + 27 + ], + "xaxis": "x", + "y": [ + 0, + 0.3876028997464519 + ], + "yaxis": "y" + }, + { + "line": { + "color": "#3f3f3f" + }, + "marker": { + "size": 10 + }, + "mode": "lines", + "name": "ACF", + "showlegend": false, + "type": "scattergl", + "x": [ + 28, + 28 + ], + "xaxis": "x", + "y": [ + 0, + 0.3480250323299374 + ], + "yaxis": "y" + }, + { + "line": { + "color": "#3f3f3f" + }, + "marker": { + "size": 10 + }, + "mode": "lines", + "name": "ACF", + "showlegend": false, + "type": "scattergl", + "x": [ + 29, + 29 + ], + "xaxis": "x", + "y": [ + 0, + 0.31498387947256945 + ], + "yaxis": "y" + }, + { + "line": { + "color": "#3f3f3f" + }, + "marker": { + "size": 10 + }, + "mode": "lines", + "name": "ACF", + "showlegend": false, + "type": "scattergl", + "x": [ + 30, + 30 + ], + "xaxis": "x", + "y": [ + 0, + 0.2884968187844052 + ], + "yaxis": "y" + }, + { + "line": { + "color": "#3f3f3f" + }, + "marker": { + "size": 10 + }, + "mode": "lines", + "name": "ACF", + "showlegend": false, + "type": "scattergl", + "x": [ + 31, + 31 + ], + "xaxis": "x", + "y": [ + 0, + 0.2708018671117992 + ], + "yaxis": "y" + }, + { + "line": { + "color": "#3f3f3f" + }, + "marker": { + "size": 10 + }, + "mode": "lines", + "name": "ACF", + "showlegend": false, + "type": "scattergl", + "x": [ + 32, + 32 + ], + "xaxis": "x", + "y": [ + 0, + 0.26429010598992786 + ], + "yaxis": "y" + }, + { + "line": { + "color": "#3f3f3f" + }, + "marker": { + "size": 10 + }, + "mode": "lines", + "name": "ACF", + "showlegend": false, + "type": "scattergl", + "x": [ + 33, + 33 + ], + "xaxis": "x", + "y": [ + 0, + 0.276799336950146 + ], + "yaxis": "y" + }, + { + "line": { + "color": "#3f3f3f" + }, + "marker": { + "size": 10 + }, + "mode": "lines", + "name": "ACF", + "showlegend": false, + "type": "scattergl", + "x": [ + 34, + 34 + ], + "xaxis": "x", + "y": [ + 0, + 0.29852149515565224 + ], + "yaxis": "y" + }, + { + "line": { + "color": "#3f3f3f" + }, + "marker": { + "size": 10 + }, + "mode": "lines", + "name": "ACF", + "showlegend": false, + "type": "scattergl", + "x": [ + 35, + 35 + ], + "xaxis": "x", + "y": [ + 0, + 0.32558711661066314 + ], + "yaxis": "y" + }, + { + "line": { + "color": "#3f3f3f" + }, + "marker": { + "size": 10 + }, + "mode": "lines", + "name": "ACF", + "showlegend": false, + "type": "scattergl", + "x": [ + 36, + 36 + ], + "xaxis": "x", + "y": [ + 0, + 0.33702359902053575 + ], + "yaxis": "y" + }, + { + "line": { + "color": "#3f3f3f" + }, + "marker": { + "size": 10 + }, + "mode": "lines", + "name": "ACF", + "showlegend": false, + "type": "scattergl", + "x": [ + 37, + 37 + ], + "xaxis": "x", + "y": [ + 0, + 0.3033348585579199 + ], + "yaxis": "y" + }, + { + "line": { + "color": "#3f3f3f" + }, + "marker": { + "size": 10 + }, + "mode": "lines", + "name": "ACF", + "showlegend": false, + "type": "scattergl", + "x": [ + 38, + 38 + ], + "xaxis": "x", + "y": [ + 0, + 0.2539770814071908 + ], + "yaxis": "y" + }, + { + "line": { + "color": "#3f3f3f" + }, + "marker": { + "size": 10 + }, + "mode": "lines", + "name": "ACF", + "showlegend": false, + "type": "scattergl", + "x": [ + 39, + 39 + ], + "xaxis": "x", + "y": [ + 0, + 0.21065533781406406 + ], + "yaxis": "y" + }, + { + "line": { + "color": "#3f3f3f" + }, + "marker": { + "size": 10 + }, + "mode": "lines", + "name": "ACF", + "showlegend": false, + "type": "scattergl", + "x": [ + 40, + 40 + ], + "xaxis": "x", + "y": [ + 0, + 0.17217092361106262 + ], + "yaxis": "y" + }, + { + "marker": { + "color": "#1f77b4", + "size": 10 + }, + "mode": "markers", + "name": "ACF", + "showlegend": false, + "type": "scattergl", + "x": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40 + ], + "xaxis": "x", + "y": [ + 1, + 0.9480473407524915, + 0.8755748351253507, + 0.8066811554965002, + 0.7526254173883077, + 0.7137699726519648, + 0.6817336033310043, + 0.6629043863684492, + 0.6556104843250862, + 0.6709483279245044, + 0.7027199209090718, + 0.7432401890069327, + 0.7603950422625558, + 0.7126608704038238, + 0.6463422792677535, + 0.5859234238634494, + 0.5379551907815616, + 0.49974752598517996, + 0.46873401291508715, + 0.4498706649766616, + 0.4416287957460463, + 0.4572237571141587, + 0.4824820295144397, + 0.5171269883891182, + 0.532189830465802, + 0.4939756937750339, + 0.4377213370680656, + 0.3876028997464519, + 0.3480250323299374, + 0.31498387947256945, + 0.2884968187844052, + 0.2708018671117992, + 0.26429010598992786, + 0.276799336950146, + 0.29852149515565224, + 0.32558711661066314, + 0.33702359902053575, + 0.3033348585579199, + 0.2539770814071908, + 0.21065533781406406, + 0.17217092361106262 + ], + "yaxis": "y" + }, + { + "line": { + "color": "rgba(255,255,255,0)" + }, + "marker": { + "size": 10 + }, + "mode": "lines", + "name": "UC", + "showlegend": false, + "type": "scatter", + "x": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40 + ], + "xaxis": "x", + "y": [ + 0, + 0.16333033204500447, + 0.27318615521458, + 0.3399017661883753, + 0.38762383148595225, + 0.42482244845589956, + 0.45569292201744294, + 0.4821334810270368, + 0.5058641279364026, + 0.5280447239635008, + 0.550317641681715, + 0.5737563310797158, + 0.598889949958539, + 0.624113974952015, + 0.6454578001172308, + 0.6624988158521083, + 0.676181413525544, + 0.687503897843146, + 0.6971273493682075, + 0.7054848995976516, + 0.7130966532991216, + 0.72035595943078, + 0.7280566375097888, + 0.7365368914864218, + 0.7461597871836548, + 0.7562179276283605, + 0.7647773994303543, + 0.7714317972264942, + 0.7766097146258821, + 0.7807591896188131, + 0.7841418116449759, + 0.7869682474990506, + 0.7894502115268107, + 0.7918070128489083, + 0.7943841542594856, + 0.7973711774106018, + 0.8009098872583174, + 0.804684292481433, + 0.8077289046875541, + 0.8098564828638037, + 0.8113169075162117 + ], + "yaxis": "y" + }, + { + "fill": "tonexty", + "fillcolor": "rgba(32, 146, 230,0.3)", + "line": { + "color": "rgba(255,255,255,0)" + }, + "marker": { + "size": 10 + }, + "mode": "lines", + "name": "LC", + "showlegend": false, + "type": "scatter", + "x": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40 + ], + "xaxis": "x", + "y": [ + 0, + -0.16333033204500447, + -0.27318615521458, + -0.3399017661883753, + -0.38762383148595225, + -0.4248224484558996, + -0.45569292201744294, + -0.4821334810270367, + -0.5058641279364027, + -0.5280447239635009, + -0.5503176416817149, + -0.5737563310797159, + -0.5988899499585391, + -0.6241139749520151, + -0.6454578001172308, + -0.6624988158521085, + -0.676181413525544, + -0.6875038978431461, + -0.6971273493682075, + -0.7054848995976515, + -0.7130966532991216, + -0.7203559594307799, + -0.7280566375097887, + -0.7365368914864218, + -0.7461597871836547, + -0.7562179276283606, + -0.7647773994303542, + -0.7714317972264944, + -0.7766097146258821, + -0.780759189618813, + -0.7841418116449759, + -0.7869682474990506, + -0.7894502115268106, + -0.7918070128489083, + -0.7943841542594856, + -0.7973711774106018, + -0.8009098872583174, + -0.804684292481433, + -0.8077289046875542, + -0.8098564828638037, + -0.8113169075162117 + ], + "yaxis": "y" + } + ], + "layout": { + "annotations": [ + { + "font": { + "size": 16 + }, + "showarrow": false, + "text": "Number of airline passengers (transformed)", + "x": 0.5, + "xanchor": "center", + "xref": "paper", + "y": 1, + "yanchor": "bottom", + "yref": "paper" + } + ], + "showlegend": false, + "template": { + "data": { + "bar": [ + { + "error_x": { + "color": "rgb(51,51,51)" + }, + "error_y": { + "color": "rgb(51,51,51)" + }, + "marker": { + "line": { + "color": "rgb(237,237,237)", + "width": 0.5 + }, + "pattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + } + }, + "type": "bar" + } + ], + "barpolar": [ + { + "marker": { + "line": { + "color": "rgb(237,237,237)", + "width": 0.5 + }, + "pattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + } + }, + "type": "barpolar" + } + ], + "carpet": [ + { + "aaxis": { + "endlinecolor": "rgb(51,51,51)", + "gridcolor": "white", + "linecolor": "white", + "minorgridcolor": "white", + "startlinecolor": "rgb(51,51,51)" + }, + "baxis": { + "endlinecolor": "rgb(51,51,51)", + "gridcolor": "white", + "linecolor": "white", + "minorgridcolor": "white", + "startlinecolor": "rgb(51,51,51)" + }, + "type": "carpet" + } + ], + "choropleth": [ + { + "colorbar": { + "outlinewidth": 0, + "tickcolor": "rgb(237,237,237)", + "ticklen": 6, + "ticks": "inside" + }, + "type": "choropleth" + } + ], + "contour": [ + { + "colorbar": { + "outlinewidth": 0, + "tickcolor": "rgb(237,237,237)", + "ticklen": 6, + "ticks": "inside" + }, + "colorscale": [ + [ + 0, + "rgb(20,44,66)" + ], + [ + 1, + "rgb(90,179,244)" + ] + ], + "type": "contour" + } + ], + "contourcarpet": [ + { + "colorbar": { + "outlinewidth": 0, + "tickcolor": "rgb(237,237,237)", + "ticklen": 6, + "ticks": "inside" + }, + "type": "contourcarpet" + } + ], + "heatmap": [ + { + "colorbar": { + "outlinewidth": 0, + "tickcolor": "rgb(237,237,237)", + "ticklen": 6, + "ticks": "inside" + }, + "colorscale": [ + [ + 0, + "rgb(20,44,66)" + ], + [ + 1, + "rgb(90,179,244)" + ] + ], + "type": "heatmap" + } + ], + "heatmapgl": [ + { + "colorbar": { + "outlinewidth": 0, + "tickcolor": "rgb(237,237,237)", + "ticklen": 6, + "ticks": "inside" + }, + "colorscale": [ + [ + 0, + "rgb(20,44,66)" + ], + [ + 1, + "rgb(90,179,244)" + ] + ], + "type": "heatmapgl" + } + ], + "histogram": [ + { + "marker": { + "pattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + } + }, + "type": "histogram" + } + ], + "histogram2d": [ + { + "colorbar": { + "outlinewidth": 0, + "tickcolor": "rgb(237,237,237)", + "ticklen": 6, + "ticks": "inside" + }, + "colorscale": [ + [ + 0, + "rgb(20,44,66)" + ], + [ + 1, + "rgb(90,179,244)" + ] + ], + "type": "histogram2d" + } + ], + "histogram2dcontour": [ + { + "colorbar": { + "outlinewidth": 0, + "tickcolor": "rgb(237,237,237)", + "ticklen": 6, + "ticks": "inside" + }, + "colorscale": [ + [ + 0, + "rgb(20,44,66)" + ], + [ + 1, + "rgb(90,179,244)" + ] + ], + "type": "histogram2dcontour" + } + ], + "mesh3d": [ + { + "colorbar": { + "outlinewidth": 0, + "tickcolor": "rgb(237,237,237)", + "ticklen": 6, + "ticks": "inside" + }, + "type": "mesh3d" + } + ], + "parcoords": [ + { + "line": { + "colorbar": { + "outlinewidth": 0, + "tickcolor": "rgb(237,237,237)", + "ticklen": 6, + "ticks": "inside" + } + }, + "type": "parcoords" + } + ], + "pie": [ + { + "automargin": true, + "type": "pie" + } + ], + "scatter": [ + { + "fillpattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + }, + "type": "scatter" + } + ], + "scatter3d": [ + { + "line": { + "colorbar": { + "outlinewidth": 0, + "tickcolor": "rgb(237,237,237)", + "ticklen": 6, + "ticks": "inside" + } + }, + "marker": { + "colorbar": { + "outlinewidth": 0, + "tickcolor": "rgb(237,237,237)", + "ticklen": 6, + "ticks": "inside" + } + }, + "type": "scatter3d" + } + ], + "scattercarpet": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "tickcolor": "rgb(237,237,237)", + "ticklen": 6, + "ticks": "inside" + } + }, + "type": "scattercarpet" + } + ], + "scattergeo": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "tickcolor": "rgb(237,237,237)", + "ticklen": 6, + "ticks": "inside" + } + }, + "type": "scattergeo" + } + ], + "scattergl": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "tickcolor": "rgb(237,237,237)", + "ticklen": 6, + "ticks": "inside" + } + }, + "type": "scattergl" + } + ], + "scattermapbox": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "tickcolor": "rgb(237,237,237)", + "ticklen": 6, + "ticks": "inside" + } + }, + "type": "scattermapbox" + } + ], + "scatterpolar": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "tickcolor": "rgb(237,237,237)", + "ticklen": 6, + "ticks": "inside" + } + }, + "type": "scatterpolar" + } + ], + "scatterpolargl": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "tickcolor": "rgb(237,237,237)", + "ticklen": 6, + "ticks": "inside" + } + }, + "type": "scatterpolargl" + } + ], + "scatterternary": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "tickcolor": "rgb(237,237,237)", + "ticklen": 6, + "ticks": "inside" + } + }, + "type": "scatterternary" + } + ], + "surface": [ + { + "colorbar": { + "outlinewidth": 0, + "tickcolor": "rgb(237,237,237)", + "ticklen": 6, + "ticks": "inside" + }, + "colorscale": [ + [ + 0, + "rgb(20,44,66)" + ], + [ + 1, + "rgb(90,179,244)" + ] + ], + "type": "surface" + } + ], + "table": [ + { + "cells": { + "fill": { + "color": "rgb(237,237,237)" + }, + "line": { + "color": "white" + } + }, + "header": { + "fill": { + "color": "rgb(217,217,217)" + }, + "line": { + "color": "white" + } + }, + "type": "table" + } + ] + }, + "layout": { + "annotationdefaults": { + "arrowhead": 0, + "arrowwidth": 1 + }, + "autotypenumbers": "strict", + "coloraxis": { + "colorbar": { + "outlinewidth": 0, + "tickcolor": "rgb(237,237,237)", + "ticklen": 6, + "ticks": "inside" + } + }, + "colorscale": { + "sequential": [ + [ + 0, + "rgb(20,44,66)" + ], + [ + 1, + "rgb(90,179,244)" + ] + ], + "sequentialminus": [ + [ + 0, + "rgb(20,44,66)" + ], + [ + 1, + "rgb(90,179,244)" + ] + ] + }, + "colorway": [ + "#F8766D", + "#A3A500", + "#00BF7D", + "#00B0F6", + "#E76BF3" + ], + "font": { + "color": "rgb(51,51,51)" + }, + "geo": { + "bgcolor": "white", + "lakecolor": "white", + "landcolor": "rgb(237,237,237)", + "showlakes": true, + "showland": true, + "subunitcolor": "white" + }, + "hoverlabel": { + "align": "left" + }, + "hovermode": "closest", + "paper_bgcolor": "white", + "plot_bgcolor": "rgb(237,237,237)", + "polar": { + "angularaxis": { + "gridcolor": "white", + "linecolor": "white", + "showgrid": true, + "tickcolor": "rgb(51,51,51)", + "ticks": "outside" + }, + "bgcolor": "rgb(237,237,237)", + "radialaxis": { + "gridcolor": "white", + "linecolor": "white", + "showgrid": true, + "tickcolor": "rgb(51,51,51)", + "ticks": "outside" + } + }, + "scene": { + "xaxis": { + "backgroundcolor": "rgb(237,237,237)", + "gridcolor": "white", + "gridwidth": 2, + "linecolor": "white", + "showbackground": true, + "showgrid": true, + "tickcolor": "rgb(51,51,51)", + "ticks": "outside", + "zerolinecolor": "white" + }, + "yaxis": { + "backgroundcolor": "rgb(237,237,237)", + "gridcolor": "white", + "gridwidth": 2, + "linecolor": "white", + "showbackground": true, + "showgrid": true, + "tickcolor": "rgb(51,51,51)", + "ticks": "outside", + "zerolinecolor": "white" + }, + "zaxis": { + "backgroundcolor": "rgb(237,237,237)", + "gridcolor": "white", + "gridwidth": 2, + "linecolor": "white", + "showbackground": true, + "showgrid": true, + "tickcolor": "rgb(51,51,51)", + "ticks": "outside", + "zerolinecolor": "white" + } + }, + "shapedefaults": { + "fillcolor": "black", + "line": { + "width": 0 + }, + "opacity": 0.3 + }, + "ternary": { + "aaxis": { + "gridcolor": "white", + "linecolor": "white", + "showgrid": true, + "tickcolor": "rgb(51,51,51)", + "ticks": "outside" + }, + "baxis": { + "gridcolor": "white", + "linecolor": "white", + "showgrid": true, + "tickcolor": "rgb(51,51,51)", + "ticks": "outside" + }, + "bgcolor": "rgb(237,237,237)", + "caxis": { + "gridcolor": "white", + "linecolor": "white", + "showgrid": true, + "tickcolor": "rgb(51,51,51)", + "ticks": "outside" + } + }, + "xaxis": { + "automargin": true, + "gridcolor": "white", + "linecolor": "white", + "showgrid": true, + "tickcolor": "rgb(51,51,51)", + "ticks": "outside", + "title": { + "standoff": 15 + }, + "zerolinecolor": "white" + }, + "yaxis": { + "automargin": true, + "gridcolor": "white", + "linecolor": "white", + "showgrid": true, + "tickcolor": "rgb(51,51,51)", + "ticks": "outside", + "title": { + "standoff": 15 + }, + "zerolinecolor": "white" + } + } + }, + "title": { + "text": "Autocorrelation (ACF) | Number of airline passengers" + }, + "xaxis": { + "anchor": "y", + "domain": [ + 0, + 1 + ], + "range": [ + -1, + 42 + ], + "title": { + "text": "Lags" + } + }, + "yaxis": { + "anchor": "x", + "domain": [ + 0, + 1 + ], + "range": [ + -1.1, + 1.1 + ], + "title": { + "text": "ACF" + }, + "zerolinecolor": "#000000" + } + } + }, + "text/html": [ + "
" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "# 画 acf 图\n", + "# for certain plots you don't need a trained model\n", + "plot_model(plot = 'acf')" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "b18d34a5", + "metadata": {}, + "outputs": [], + "source": [ + "# plot diagnostics\n", + "# for certain plots you don't need a trained model\n", + "plot_model(plot = 'diagnostics')" + ] + }, + { + "cell_type": "markdown", + "id": "2fef279d", + "metadata": {}, + "source": [ + "您可能会发现`plot_model`非常有用的其他一些参数是:\n", + "\n", + "- fig_kwargs\n", + "- data_kwargs\n", + "- display_format\n", + "- return_fig\n", + "- return_data\n", + "- save\n", + "\n", + "您可以查看函数的文档字符串以获取更多信息。" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "54b09b8e", + "metadata": {}, + "outputs": [], + "source": [ + "# help(plot_model)" + ] + }, + { + "cell_type": "markdown", + "id": "e27c212b", + "metadata": {}, + "source": [ + "## ✅ Finalize Model\n", + "此函数在包括保留集在内的整个数据集上训练最终模型。" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "65225684", + "metadata": {}, + "outputs": [], + "source": [ + "final_best = finalize_model(best)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "80d17fec", + "metadata": {}, + "outputs": [], + "source": [ + "final_best" + ] + }, + { + "cell_type": "markdown", + "id": "ed00202c", + "metadata": {}, + "source": [ + "## ✅ Deploy Model\n", + "此函数将整个 ML 管道部署在云端。\n", + "\n", + "**AWS:** 在 AWS S3 上部署模型时,必须使用命令行界面配置环境变量。要配置 AWS 环境变量,请输入`aws configure` 终端。需要以下信息,这些信息可以使用您的亚马逊控制台帐户的身份和访问管理 (IAM) 门户生成:\n", + "\n", + "- AWS Access Key ID\n", + "- AWS Secret Key Access\n", + "- Default Region Name (can be seen under Global settings on your AWS console)\n", + "- Default output format (must be left blank)\n", + "\n", + "**GCP:** 要在 Google Cloud Platform ('gcp') 上部署模型,必须使用命令行或 GCP 控制台创建项目。创建项目后,您必须创建一个服务帐户并将服务帐户密钥下载为 JSON 文件,以便在您的本地环境中设置环境变量。了解更多信息:: https://cloud.google.com/docs/authentication/production\n", + "\n", + "**Azure:** 要在 Microsoft Azure(“azure”)上部署模型,必须在本地环境中设置连接字符串的环境变量。转到 Azure 门户上的存储帐户设置以访问所需的连接字符串。AZURE_STORAGE_CONNECTION_STRING(需要作为环境变量)了解更多信息: https://docs.microsoft.com/en-us/azure/storage/blobs/storage-quickstart-blobs-python?toc=%2Fpython%2Fazure%2FTOC.json" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "40b20a18", + "metadata": {}, + "outputs": [], + "source": [ + "# deploy model on aws s3\n", + "# deploy_model(best, model_name = 'my_first_platform_on_aws',\n", + "# platform = 'aws', authentication = {'bucket' : 'pycaret-test'})" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "9e236516", + "metadata": {}, + "outputs": [], + "source": [ + "# load model from aws s3\n", + "# loaded_from_aws = load_model(model_name = 'my_first_platform_on_aws', platform = 'aws',\n", + "# authentication = {'bucket' : 'pycaret-test'})\n", + "\n", + "# loaded_from_aws" + ] + }, + { + "cell_type": "markdown", + "id": "e169ae86", + "metadata": {}, + "source": [ + "## ✅ Save / Load Model\n", + "\n", + "此函数将转换管道(pipeline)和经过训练的模型对象作为 pickle 文件保存到当前工作目录中,供以后使用。" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "bc5cf24a", + "metadata": {}, + "outputs": [], + "source": [ + "# 保存模型\n", + "save_model(best, 'my_first_model')" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "e8478d34", + "metadata": {}, + "outputs": [], + "source": [ + "# 加载模型\n", + "loaded_from_disk = load_model('my_first_model')\n", + "loaded_from_disk" + ] + }, + { + "cell_type": "markdown", + "id": "de5eee8c", + "metadata": {}, + "source": [ + "## ✅ Save / Load Experiment\n", + "此函数将所有实验变量保存在磁盘上,允许稍后在不重新运行设置函数的情况下恢复。" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "6a3c61b6", + "metadata": {}, + "outputs": [], + "source": [ + "# 保存实验\n", + "save_experiment('my_experiment')" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "83252c09", + "metadata": {}, + "outputs": [], + "source": [ + "# 从磁盘加载实验\n", + "exp_from_disk = load_experiment('my_experiment', data=data)" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "pycaret30", + "language": "python", + "name": "pycaret30" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.8.16" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +}