updating lab version

This commit is contained in:
Jonathan Taylor
2026-02-02 17:04:01 -08:00
parent 39a00cc02d
commit aae67bdb06
24 changed files with 3299 additions and 17785 deletions

File diff suppressed because one or more lines are too long

View File

@@ -13,11 +13,11 @@ jupyter:
# Linear Regression # Linear Regression
<a target="_blank" href="https://colab.research.google.com/github/intro-stat-learning/ISLP_labs/blob/v2.2/Ch03-linreg-lab.ipynb"> <a target="_blank" href="https://colab.research.google.com/github/intro-stat-learning/ISLP_labs/blob/v2.2.1/Ch03-linreg-lab.ipynb">
<img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/> <img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/>
</a> </a>
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/intro-stat-learning/ISLP_labs/v2.2?labpath=Ch03-linreg-lab.ipynb) [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/intro-stat-learning/ISLP_labs/v2.2.1?labpath=Ch03-linreg-lab.ipynb)

File diff suppressed because one or more lines are too long

View File

@@ -13,11 +13,11 @@ jupyter:
# Logistic Regression, LDA, QDA, and KNN # Logistic Regression, LDA, QDA, and KNN
<a target="_blank" href="https://colab.research.google.com/github/intro-stat-learning/ISLP_labs/blob/v2.2/Ch04-classification-lab.ipynb"> <a target="_blank" href="https://colab.research.google.com/github/intro-stat-learning/ISLP_labs/blob/v2.2.1/Ch04-classification-lab.ipynb">
<img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/> <img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/>
</a> </a>
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/intro-stat-learning/ISLP_labs/v2.2?labpath=Ch04-classification-lab.ipynb) [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/intro-stat-learning/ISLP_labs/v2.2.1?labpath=Ch04-classification-lab.ipynb)

File diff suppressed because one or more lines are too long

View File

@@ -13,11 +13,11 @@ jupyter:
# Cross-Validation and the Bootstrap # Cross-Validation and the Bootstrap
<a target="_blank" href="https://colab.research.google.com/github/intro-stat-learning/ISLP_labs/blob/v2.2/Ch05-resample-lab.ipynb"> <a target="_blank" href="https://colab.research.google.com/github/intro-stat-learning/ISLP_labs/blob/v2.2.1/Ch05-resample-lab.ipynb">
<img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/> <img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/>
</a> </a>
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/intro-stat-learning/ISLP_labs/v2.2?labpath=Ch05-resample-lab.ipynb) [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/intro-stat-learning/ISLP_labs/v2.2.1?labpath=Ch05-resample-lab.ipynb)
In this lab, we explore the resampling techniques covered in this In this lab, we explore the resampling techniques covered in this

View File

@@ -7,11 +7,11 @@
"source": [ "source": [
"# Cross-Validation and the Bootstrap\n", "# Cross-Validation and the Bootstrap\n",
"\n", "\n",
"<a target=\"_blank\" href=\"https://colab.research.google.com/github/intro-stat-learning/ISLP_labs/blob/v2.2/Ch05-resample-lab.ipynb\">\n", "<a target=\"_blank\" href=\"https://colab.research.google.com/github/intro-stat-learning/ISLP_labs/blob/v2.2.1/Ch05-resample-lab.ipynb\">\n",
"<img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/>\n", "<img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/>\n",
"</a>\n", "</a>\n",
"\n", "\n",
"[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/intro-stat-learning/ISLP_labs/v2.2?labpath=Ch05-resample-lab.ipynb)" "[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/intro-stat-learning/ISLP_labs/v2.2.1?labpath=Ch05-resample-lab.ipynb)"
] ]
}, },
{ {
@@ -32,10 +32,10 @@
"id": "f1deb5cc", "id": "f1deb5cc",
"metadata": { "metadata": {
"execution": { "execution": {
"iopub.execute_input": "2025-04-03T19:33:23.204499Z", "iopub.execute_input": "2026-02-02T23:39:38.213402Z",
"iopub.status.busy": "2025-04-03T19:33:23.204390Z", "iopub.status.busy": "2026-02-02T23:39:38.212455Z",
"iopub.status.idle": "2025-04-03T19:33:23.819021Z", "iopub.status.idle": "2026-02-02T23:39:39.121524Z",
"shell.execute_reply": "2025-04-03T19:33:23.818655Z" "shell.execute_reply": "2026-02-02T23:39:39.121125Z"
}, },
"lines_to_next_cell": 2 "lines_to_next_cell": 2
}, },
@@ -64,10 +64,10 @@
"id": "268c41b3", "id": "268c41b3",
"metadata": { "metadata": {
"execution": { "execution": {
"iopub.execute_input": "2025-04-03T19:33:23.820788Z", "iopub.execute_input": "2026-02-02T23:39:39.123447Z",
"iopub.status.busy": "2025-04-03T19:33:23.820641Z", "iopub.status.busy": "2026-02-02T23:39:39.123256Z",
"iopub.status.idle": "2025-04-03T19:33:23.822663Z", "iopub.status.idle": "2026-02-02T23:39:39.125378Z",
"shell.execute_reply": "2025-04-03T19:33:23.822416Z" "shell.execute_reply": "2026-02-02T23:39:39.125152Z"
}, },
"lines_to_next_cell": 2 "lines_to_next_cell": 2
}, },
@@ -108,10 +108,10 @@
"id": "22f44ae0", "id": "22f44ae0",
"metadata": { "metadata": {
"execution": { "execution": {
"iopub.execute_input": "2025-04-03T19:33:23.823864Z", "iopub.execute_input": "2026-02-02T23:39:39.126552Z",
"iopub.status.busy": "2025-04-03T19:33:23.823764Z", "iopub.status.busy": "2026-02-02T23:39:39.126448Z",
"iopub.status.idle": "2025-04-03T19:33:23.829383Z", "iopub.status.idle": "2026-02-02T23:39:39.136455Z",
"shell.execute_reply": "2025-04-03T19:33:23.829160Z" "shell.execute_reply": "2026-02-02T23:39:39.135968Z"
} }
}, },
"outputs": [], "outputs": [],
@@ -136,10 +136,10 @@
"id": "0c32e917", "id": "0c32e917",
"metadata": { "metadata": {
"execution": { "execution": {
"iopub.execute_input": "2025-04-03T19:33:23.830793Z", "iopub.execute_input": "2026-02-02T23:39:39.138496Z",
"iopub.status.busy": "2025-04-03T19:33:23.830713Z", "iopub.status.busy": "2026-02-02T23:39:39.138360Z",
"iopub.status.idle": "2025-04-03T19:33:23.834993Z", "iopub.status.idle": "2026-02-02T23:39:39.144210Z",
"shell.execute_reply": "2025-04-03T19:33:23.834789Z" "shell.execute_reply": "2026-02-02T23:39:39.143911Z"
} }
}, },
"outputs": [], "outputs": [],
@@ -166,10 +166,10 @@
"id": "86ce4f85", "id": "86ce4f85",
"metadata": { "metadata": {
"execution": { "execution": {
"iopub.execute_input": "2025-04-03T19:33:23.836150Z", "iopub.execute_input": "2026-02-02T23:39:39.145874Z",
"iopub.status.busy": "2025-04-03T19:33:23.836082Z", "iopub.status.busy": "2026-02-02T23:39:39.145769Z",
"iopub.status.idle": "2025-04-03T19:33:23.839814Z", "iopub.status.idle": "2026-02-02T23:39:39.150170Z",
"shell.execute_reply": "2025-04-03T19:33:23.839608Z" "shell.execute_reply": "2026-02-02T23:39:39.149908Z"
} }
}, },
"outputs": [ "outputs": [
@@ -210,10 +210,10 @@
"id": "50a66a97", "id": "50a66a97",
"metadata": { "metadata": {
"execution": { "execution": {
"iopub.execute_input": "2025-04-03T19:33:23.841088Z", "iopub.execute_input": "2026-02-02T23:39:39.151449Z",
"iopub.status.busy": "2025-04-03T19:33:23.841015Z", "iopub.status.busy": "2026-02-02T23:39:39.151374Z",
"iopub.status.idle": "2025-04-03T19:33:23.843031Z", "iopub.status.idle": "2026-02-02T23:39:39.153368Z",
"shell.execute_reply": "2025-04-03T19:33:23.842838Z" "shell.execute_reply": "2026-02-02T23:39:39.153165Z"
} }
}, },
"outputs": [], "outputs": [],
@@ -253,10 +253,10 @@
"id": "d49b6999", "id": "d49b6999",
"metadata": { "metadata": {
"execution": { "execution": {
"iopub.execute_input": "2025-04-03T19:33:23.844166Z", "iopub.execute_input": "2026-02-02T23:39:39.154485Z",
"iopub.status.busy": "2025-04-03T19:33:23.844091Z", "iopub.status.busy": "2026-02-02T23:39:39.154414Z",
"iopub.status.idle": "2025-04-03T19:33:23.855875Z", "iopub.status.idle": "2026-02-02T23:39:39.167468Z",
"shell.execute_reply": "2025-04-03T19:33:23.855640Z" "shell.execute_reply": "2026-02-02T23:39:39.167243Z"
} }
}, },
"outputs": [ "outputs": [
@@ -297,10 +297,10 @@
"id": "dac8bd54", "id": "dac8bd54",
"metadata": { "metadata": {
"execution": { "execution": {
"iopub.execute_input": "2025-04-03T19:33:23.857092Z", "iopub.execute_input": "2026-02-02T23:39:39.168726Z",
"iopub.status.busy": "2025-04-03T19:33:23.857011Z", "iopub.status.busy": "2026-02-02T23:39:39.168651Z",
"iopub.status.idle": "2025-04-03T19:33:23.868361Z", "iopub.status.idle": "2026-02-02T23:39:39.182426Z",
"shell.execute_reply": "2025-04-03T19:33:23.868136Z" "shell.execute_reply": "2026-02-02T23:39:39.182175Z"
} }
}, },
"outputs": [ "outputs": [
@@ -380,10 +380,10 @@
"id": "601ae443", "id": "601ae443",
"metadata": { "metadata": {
"execution": { "execution": {
"iopub.execute_input": "2025-04-03T19:33:23.869578Z", "iopub.execute_input": "2026-02-02T23:39:39.184522Z",
"iopub.status.busy": "2025-04-03T19:33:23.869501Z", "iopub.status.busy": "2026-02-02T23:39:39.184425Z",
"iopub.status.idle": "2025-04-03T19:33:24.584127Z", "iopub.status.idle": "2026-02-02T23:39:40.007057Z",
"shell.execute_reply": "2025-04-03T19:33:24.583898Z" "shell.execute_reply": "2026-02-02T23:39:40.006826Z"
}, },
"lines_to_next_cell": 0 "lines_to_next_cell": 0
}, },
@@ -448,10 +448,10 @@
"id": "11226c85", "id": "11226c85",
"metadata": { "metadata": {
"execution": { "execution": {
"iopub.execute_input": "2025-04-03T19:33:24.585528Z", "iopub.execute_input": "2026-02-02T23:39:40.008355Z",
"iopub.status.busy": "2025-04-03T19:33:24.585450Z", "iopub.status.busy": "2026-02-02T23:39:40.008281Z",
"iopub.status.idle": "2025-04-03T19:33:25.124201Z", "iopub.status.idle": "2026-02-02T23:39:40.469400Z",
"shell.execute_reply": "2025-04-03T19:33:25.123913Z" "shell.execute_reply": "2026-02-02T23:39:40.469130Z"
}, },
"lines_to_next_cell": 0 "lines_to_next_cell": 0
}, },
@@ -505,10 +505,10 @@
"id": "64b64d97", "id": "64b64d97",
"metadata": { "metadata": {
"execution": { "execution": {
"iopub.execute_input": "2025-04-03T19:33:25.125598Z", "iopub.execute_input": "2026-02-02T23:39:40.470650Z",
"iopub.status.busy": "2025-04-03T19:33:25.125513Z", "iopub.status.busy": "2026-02-02T23:39:40.470570Z",
"iopub.status.idle": "2025-04-03T19:33:25.127886Z", "iopub.status.idle": "2026-02-02T23:39:40.472721Z",
"shell.execute_reply": "2025-04-03T19:33:25.127667Z" "shell.execute_reply": "2026-02-02T23:39:40.472520Z"
} }
}, },
"outputs": [ "outputs": [
@@ -547,10 +547,10 @@
"id": "ca0f972f", "id": "ca0f972f",
"metadata": { "metadata": {
"execution": { "execution": {
"iopub.execute_input": "2025-04-03T19:33:25.129127Z", "iopub.execute_input": "2026-02-02T23:39:40.473794Z",
"iopub.status.busy": "2025-04-03T19:33:25.129050Z", "iopub.status.busy": "2026-02-02T23:39:40.473725Z",
"iopub.status.idle": "2025-04-03T19:33:25.149889Z", "iopub.status.idle": "2026-02-02T23:39:40.491806Z",
"shell.execute_reply": "2025-04-03T19:33:25.149644Z" "shell.execute_reply": "2026-02-02T23:39:40.491547Z"
}, },
"lines_to_next_cell": 0 "lines_to_next_cell": 0
}, },
@@ -613,10 +613,10 @@
"id": "080cdb29", "id": "080cdb29",
"metadata": { "metadata": {
"execution": { "execution": {
"iopub.execute_input": "2025-04-03T19:33:25.151147Z", "iopub.execute_input": "2026-02-02T23:39:40.493215Z",
"iopub.status.busy": "2025-04-03T19:33:25.151072Z", "iopub.status.busy": "2026-02-02T23:39:40.493138Z",
"iopub.status.idle": "2025-04-03T19:33:25.156751Z", "iopub.status.idle": "2026-02-02T23:39:40.498978Z",
"shell.execute_reply": "2025-04-03T19:33:25.156501Z" "shell.execute_reply": "2026-02-02T23:39:40.498768Z"
}, },
"lines_to_next_cell": 2 "lines_to_next_cell": 2
}, },
@@ -657,10 +657,10 @@
"id": "7c46de2b", "id": "7c46de2b",
"metadata": { "metadata": {
"execution": { "execution": {
"iopub.execute_input": "2025-04-03T19:33:25.158025Z", "iopub.execute_input": "2026-02-02T23:39:40.500169Z",
"iopub.status.busy": "2025-04-03T19:33:25.157939Z", "iopub.status.busy": "2026-02-02T23:39:40.500100Z",
"iopub.status.idle": "2025-04-03T19:33:25.182100Z", "iopub.status.idle": "2026-02-02T23:39:40.525494Z",
"shell.execute_reply": "2025-04-03T19:33:25.181888Z" "shell.execute_reply": "2026-02-02T23:39:40.525258Z"
} }
}, },
"outputs": [ "outputs": [
@@ -731,10 +731,10 @@
"id": "a4b6d9b3", "id": "a4b6d9b3",
"metadata": { "metadata": {
"execution": { "execution": {
"iopub.execute_input": "2025-04-03T19:33:25.183403Z", "iopub.execute_input": "2026-02-02T23:39:40.526599Z",
"iopub.status.busy": "2025-04-03T19:33:25.183320Z", "iopub.status.busy": "2026-02-02T23:39:40.526530Z",
"iopub.status.idle": "2025-04-03T19:33:25.186088Z", "iopub.status.idle": "2026-02-02T23:39:40.529182Z",
"shell.execute_reply": "2025-04-03T19:33:25.185890Z" "shell.execute_reply": "2026-02-02T23:39:40.528979Z"
}, },
"lines_to_next_cell": 0 "lines_to_next_cell": 0
}, },
@@ -765,10 +765,10 @@
"id": "81498a11", "id": "81498a11",
"metadata": { "metadata": {
"execution": { "execution": {
"iopub.execute_input": "2025-04-03T19:33:25.187384Z", "iopub.execute_input": "2026-02-02T23:39:40.530362Z",
"iopub.status.busy": "2025-04-03T19:33:25.187299Z", "iopub.status.busy": "2026-02-02T23:39:40.530277Z",
"iopub.status.idle": "2025-04-03T19:33:25.189610Z", "iopub.status.idle": "2026-02-02T23:39:40.532680Z",
"shell.execute_reply": "2025-04-03T19:33:25.189413Z" "shell.execute_reply": "2026-02-02T23:39:40.532462Z"
} }
}, },
"outputs": [ "outputs": [
@@ -804,10 +804,10 @@
"id": "64fe1cb6", "id": "64fe1cb6",
"metadata": { "metadata": {
"execution": { "execution": {
"iopub.execute_input": "2025-04-03T19:33:25.190738Z", "iopub.execute_input": "2026-02-02T23:39:40.533876Z",
"iopub.status.busy": "2025-04-03T19:33:25.190670Z", "iopub.status.busy": "2026-02-02T23:39:40.533810Z",
"iopub.status.idle": "2025-04-03T19:33:25.193250Z", "iopub.status.idle": "2026-02-02T23:39:40.536977Z",
"shell.execute_reply": "2025-04-03T19:33:25.193037Z" "shell.execute_reply": "2026-02-02T23:39:40.536767Z"
}, },
"lines_to_next_cell": 2 "lines_to_next_cell": 2
}, },
@@ -847,10 +847,10 @@
"id": "dd16bbae", "id": "dd16bbae",
"metadata": { "metadata": {
"execution": { "execution": {
"iopub.execute_input": "2025-04-03T19:33:25.194520Z", "iopub.execute_input": "2026-02-02T23:39:40.538089Z",
"iopub.status.busy": "2025-04-03T19:33:25.194445Z", "iopub.status.busy": "2026-02-02T23:39:40.538010Z",
"iopub.status.idle": "2025-04-03T19:33:25.196804Z", "iopub.status.idle": "2026-02-02T23:39:40.540142Z",
"shell.execute_reply": "2025-04-03T19:33:25.196574Z" "shell.execute_reply": "2026-02-02T23:39:40.539916Z"
}, },
"lines_to_next_cell": 0 "lines_to_next_cell": 0
}, },
@@ -892,10 +892,10 @@
"id": "b42b4585", "id": "b42b4585",
"metadata": { "metadata": {
"execution": { "execution": {
"iopub.execute_input": "2025-04-03T19:33:25.198086Z", "iopub.execute_input": "2026-02-02T23:39:40.541333Z",
"iopub.status.busy": "2025-04-03T19:33:25.198011Z", "iopub.status.busy": "2026-02-02T23:39:40.541248Z",
"iopub.status.idle": "2025-04-03T19:33:25.394494Z", "iopub.status.idle": "2026-02-02T23:39:40.761713Z",
"shell.execute_reply": "2025-04-03T19:33:25.394181Z" "shell.execute_reply": "2026-02-02T23:39:40.761472Z"
} }
}, },
"outputs": [ "outputs": [
@@ -958,10 +958,10 @@
"id": "6bc11784", "id": "6bc11784",
"metadata": { "metadata": {
"execution": { "execution": {
"iopub.execute_input": "2025-04-03T19:33:25.396011Z", "iopub.execute_input": "2026-02-02T23:39:40.762911Z",
"iopub.status.busy": "2025-04-03T19:33:25.395917Z", "iopub.status.busy": "2026-02-02T23:39:40.762837Z",
"iopub.status.idle": "2025-04-03T19:33:25.397893Z", "iopub.status.idle": "2026-02-02T23:39:40.764597Z",
"shell.execute_reply": "2025-04-03T19:33:25.397676Z" "shell.execute_reply": "2026-02-02T23:39:40.764401Z"
}, },
"lines_to_next_cell": 0 "lines_to_next_cell": 0
}, },
@@ -993,10 +993,10 @@
"id": "740cd50c", "id": "740cd50c",
"metadata": { "metadata": {
"execution": { "execution": {
"iopub.execute_input": "2025-04-03T19:33:25.399076Z", "iopub.execute_input": "2026-02-02T23:39:40.765800Z",
"iopub.status.busy": "2025-04-03T19:33:25.398999Z", "iopub.status.busy": "2026-02-02T23:39:40.765734Z",
"iopub.status.idle": "2025-04-03T19:33:25.400599Z", "iopub.status.idle": "2026-02-02T23:39:40.767191Z",
"shell.execute_reply": "2025-04-03T19:33:25.400346Z" "shell.execute_reply": "2026-02-02T23:39:40.766986Z"
}, },
"lines_to_next_cell": 0 "lines_to_next_cell": 0
}, },
@@ -1026,10 +1026,10 @@
"id": "ffb3ec50", "id": "ffb3ec50",
"metadata": { "metadata": {
"execution": { "execution": {
"iopub.execute_input": "2025-04-03T19:33:25.401753Z", "iopub.execute_input": "2026-02-02T23:39:40.768266Z",
"iopub.status.busy": "2025-04-03T19:33:25.401682Z", "iopub.status.busy": "2026-02-02T23:39:40.768204Z",
"iopub.status.idle": "2025-04-03T19:33:25.422622Z", "iopub.status.idle": "2026-02-02T23:39:40.789931Z",
"shell.execute_reply": "2025-04-03T19:33:25.422385Z" "shell.execute_reply": "2026-02-02T23:39:40.789705Z"
}, },
"lines_to_next_cell": 0 "lines_to_next_cell": 0
}, },
@@ -1077,10 +1077,10 @@
"id": "7d561f70", "id": "7d561f70",
"metadata": { "metadata": {
"execution": { "execution": {
"iopub.execute_input": "2025-04-03T19:33:25.423860Z", "iopub.execute_input": "2026-02-02T23:39:40.791196Z",
"iopub.status.busy": "2025-04-03T19:33:25.423786Z", "iopub.status.busy": "2026-02-02T23:39:40.791129Z",
"iopub.status.idle": "2025-04-03T19:33:27.089093Z", "iopub.status.idle": "2026-02-02T23:39:42.690473Z",
"shell.execute_reply": "2025-04-03T19:33:27.088869Z" "shell.execute_reply": "2026-02-02T23:39:42.690189Z"
}, },
"lines_to_next_cell": 2 "lines_to_next_cell": 2
}, },
@@ -1127,10 +1127,10 @@
"id": "3888aa0a", "id": "3888aa0a",
"metadata": { "metadata": {
"execution": { "execution": {
"iopub.execute_input": "2025-04-03T19:33:27.090386Z", "iopub.execute_input": "2026-02-02T23:39:42.692058Z",
"iopub.status.busy": "2025-04-03T19:33:27.090313Z", "iopub.status.busy": "2026-02-02T23:39:42.691967Z",
"iopub.status.idle": "2025-04-03T19:33:27.106785Z", "iopub.status.idle": "2026-02-02T23:39:42.737592Z",
"shell.execute_reply": "2025-04-03T19:33:27.106554Z" "shell.execute_reply": "2026-02-02T23:39:42.737346Z"
}, },
"lines_to_next_cell": 2 "lines_to_next_cell": 2
}, },
@@ -1199,10 +1199,10 @@
"id": "acc3e32c", "id": "acc3e32c",
"metadata": { "metadata": {
"execution": { "execution": {
"iopub.execute_input": "2025-04-03T19:33:27.108124Z", "iopub.execute_input": "2026-02-02T23:39:42.739037Z",
"iopub.status.busy": "2025-04-03T19:33:27.108030Z", "iopub.status.busy": "2026-02-02T23:39:42.738882Z",
"iopub.status.idle": "2025-04-03T19:33:29.434320Z", "iopub.status.idle": "2026-02-02T23:39:45.405121Z",
"shell.execute_reply": "2025-04-03T19:33:29.434045Z" "shell.execute_reply": "2026-02-02T23:39:45.404784Z"
} }
}, },
"outputs": [ "outputs": [
@@ -1242,10 +1242,10 @@
"id": "dca5340c", "id": "dca5340c",
"metadata": { "metadata": {
"execution": { "execution": {
"iopub.execute_input": "2025-04-03T19:33:29.435689Z", "iopub.execute_input": "2026-02-02T23:39:45.406403Z",
"iopub.status.busy": "2025-04-03T19:33:29.435602Z", "iopub.status.busy": "2026-02-02T23:39:45.406328Z",
"iopub.status.idle": "2025-04-03T19:33:29.444726Z", "iopub.status.idle": "2026-02-02T23:39:45.416112Z",
"shell.execute_reply": "2025-04-03T19:33:29.444464Z" "shell.execute_reply": "2026-02-02T23:39:45.415874Z"
}, },
"lines_to_next_cell": 0 "lines_to_next_cell": 0
}, },

View File

@@ -1,23 +1,26 @@
--- ---
jupyter: jupyter:
jupytext: jupytext:
cell_metadata_filter: -all cell_metadata_filter: language,-all
formats: Rmd formats: Rmd
main_language: python
text_representation: text_representation:
extension: .Rmd extension: .Rmd
format_name: rmarkdown format_name: rmarkdown
format_version: '1.2' format_version: '1.2'
jupytext_version: 1.19.1 jupytext_version: 1.19.1
kernelspec:
display_name: Python 3 (ipykernel)
language: python
name: python3
--- ---
# Linear Models and Regularization Methods # Linear Models and Regularization Methods
<a target="_blank" href="https://colab.research.google.com/github/intro-stat-learning/ISLP_labs/blob/v2.2/Ch06-varselect-lab.ipynb"> <a target="_blank" href="https://colab.research.google.com/github/intro-stat-learning/ISLP_labs/blob/v2.2.1/Ch06-varselect-lab.ipynb">
<img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/> <img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/>
</a> </a>
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/intro-stat-learning/ISLP_labs/v2.2?labpath=Ch06-varselect-lab.ipynb) [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/intro-stat-learning/ISLP_labs/v2.2.1?labpath=Ch06-varselect-lab.ipynb)
In this lab we implement many of the techniques discussed in this chapter. In this lab we implement many of the techniques discussed in this chapter.
@@ -39,7 +42,7 @@ from functools import partial
``` ```
We again collect the new imports We again collect the new imports
needed for this lab. Readers will also have to have installed `l0bnb` using `pip install l0bnb`. needed for this lab. Readers will have installed `l0bnb` when installing the requirements.
```{python} ```{python}
from sklearn.pipeline import Pipeline from sklearn.pipeline import Pipeline
@@ -53,6 +56,14 @@ from l0bnb import fit_path
``` ```
Using `skl.ElasticNet` to fit ridge regression
throws up many warnings. We will suppress them below by a call to `warnings.simplefilter()`.
```{python}
import warnings
warnings.simplefilter("ignore")
```
## Subset Selection Methods ## Subset Selection Methods
Here we implement methods that reduce the number of parameters in a Here we implement methods that reduce the number of parameters in a
model by restricting the model to a subset of the input variables. model by restricting the model to a subset of the input variables.
@@ -368,7 +379,7 @@ estimates on the original scale, we must *unstandardize*
the coefficient estimates. The parameter the coefficient estimates. The parameter
$\lambda$ in (\ref{Ch6:ridge}) and (\ref{Ch6:LASSO}) is called `alphas` in `sklearn`. In order to $\lambda$ in (\ref{Ch6:ridge}) and (\ref{Ch6:LASSO}) is called `alphas` in `sklearn`. In order to
be consistent with the rest of this chapter, we use `lambdas` be consistent with the rest of this chapter, we use `lambdas`
rather than `alphas` in what follows. {At the time of publication, ridge fits like the one in code chunk [22] issue unwarranted convergence warning messages; we expect these to disappear as this package matures.} rather than `alphas` in what follows. {At the time of publication, ridge fits like the one in code chunk [23] issue unwarranted convergence warning messages; we suppressed these when we filtered the warnings above.}
```{python} ```{python}
Xs = X - X.mean(0)[None,:] Xs = X - X.mean(0)[None,:]

File diff suppressed because one or more lines are too long

View File

@@ -13,11 +13,11 @@ jupyter:
# Non-Linear Modeling # Non-Linear Modeling
<a target="_blank" href="https://colab.research.google.com/github/intro-stat-learning/ISLP_labs/blob/v2.2/Ch07-nonlin-lab.ipynb"> <a target="_blank" href="https://colab.research.google.com/github/intro-stat-learning/ISLP_labs/blob/v2.2.1/Ch07-nonlin-lab.ipynb">
<img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/> <img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/>
</a> </a>
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/intro-stat-learning/ISLP_labs/v2.2?labpath=Ch07-nonlin-lab.ipynb) [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/intro-stat-learning/ISLP_labs/v2.2.1?labpath=Ch07-nonlin-lab.ipynb)
In this lab, we demonstrate some of the nonlinear models discussed in In this lab, we demonstrate some of the nonlinear models discussed in

File diff suppressed because one or more lines are too long

View File

@@ -13,11 +13,11 @@ jupyter:
# Tree-Based Methods # Tree-Based Methods
<a target="_blank" href="https://colab.research.google.com/github/intro-stat-learning/ISLP_labs/blob/v2.2/Ch08-baggboost-lab.ipynb"> <a target="_blank" href="https://colab.research.google.com/github/intro-stat-learning/ISLP_labs/blob/v2.2.1/Ch08-baggboost-lab.ipynb">
<img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/> <img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/>
</a> </a>
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/intro-stat-learning/ISLP_labs/v2.2?labpath=Ch08-baggboost-lab.ipynb) [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/intro-stat-learning/ISLP_labs/v2.2.1?labpath=Ch08-baggboost-lab.ipynb)
We import some of our usual libraries at this top We import some of our usual libraries at this top

File diff suppressed because one or more lines are too long

View File

@@ -13,11 +13,11 @@ jupyter:
# Support Vector Machines # Support Vector Machines
<a target="_blank" href="https://colab.research.google.com/github/intro-stat-learning/ISLP_labs/blob/v2.2/Ch09-svm-lab.ipynb"> <a target="_blank" href="https://colab.research.google.com/github/intro-stat-learning/ISLP_labs/blob/v2.2.1/Ch09-svm-lab.ipynb">
<img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/> <img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/>
</a> </a>
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/intro-stat-learning/ISLP_labs/v2.2?labpath=Ch09-svm-lab.ipynb) [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/intro-stat-learning/ISLP_labs/v2.2.1?labpath=Ch09-svm-lab.ipynb)
In this lab, we use the `sklearn.svm` library to demonstrate the support In this lab, we use the `sklearn.svm` library to demonstrate the support

File diff suppressed because one or more lines are too long

View File

@@ -13,11 +13,11 @@ jupyter:
# Deep Learning # Deep Learning
<a target="_blank" href="https://colab.research.google.com/github/intro-stat-learning/ISLP_labs/blob/v2.2/Ch10-deeplearning-lab.ipynb"> <a target="_blank" href="https://colab.research.google.com/github/intro-stat-learning/ISLP_labs/blob/v2.2.1/Ch10-deeplearning-lab.ipynb">
<img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/> <img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/>
</a> </a>
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/intro-stat-learning/ISLP_labs/v2.2?labpath=Ch10-deeplearning-lab.ipynb) [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/intro-stat-learning/ISLP_labs/v2.2.1?labpath=Ch10-deeplearning-lab.ipynb)
In this section we demonstrate how to fit the examples discussed In this section we demonstrate how to fit the examples discussed

File diff suppressed because one or more lines are too long

View File

@@ -13,11 +13,11 @@ jupyter:
# Survival Analysis # Survival Analysis
<a target="_blank" href="https://colab.research.google.com/github/intro-stat-learning/ISLP_labs/blob/v2.2/Ch11-surv-lab.ipynb"> <a target="_blank" href="https://colab.research.google.com/github/intro-stat-learning/ISLP_labs/blob/v2.2.1/Ch11-surv-lab.ipynb">
<img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/> <img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/>
</a> </a>
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/intro-stat-learning/ISLP_labs/v2.2?labpath=Ch11-surv-lab.ipynb) [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/intro-stat-learning/ISLP_labs/v2.2.1?labpath=Ch11-surv-lab.ipynb)
In this lab, we perform survival analyses on three separate data In this lab, we perform survival analyses on three separate data

File diff suppressed because one or more lines are too long

View File

@@ -13,11 +13,11 @@ jupyter:
# Unsupervised Learning # Unsupervised Learning
<a target="_blank" href="https://colab.research.google.com/github/intro-stat-learning/ISLP_labs/blob/v2.2/Ch12-unsup-lab.ipynb"> <a target="_blank" href="https://colab.research.google.com/github/intro-stat-learning/ISLP_labs/blob/v2.2.1/Ch12-unsup-lab.ipynb">
<img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/> <img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/>
</a> </a>
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/intro-stat-learning/ISLP_labs/v2.2?labpath=Ch12-unsup-lab.ipynb) [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/intro-stat-learning/ISLP_labs/v2.2.1?labpath=Ch12-unsup-lab.ipynb)
In this lab we demonstrate PCA and clustering on several datasets. In this lab we demonstrate PCA and clustering on several datasets.

File diff suppressed because one or more lines are too long

View File

@@ -13,11 +13,11 @@ jupyter:
# Multiple Testing # Multiple Testing
<a target="_blank" href="https://colab.research.google.com/github/intro-stat-learning/ISLP_labs/blob/v2.2/Ch13-multiple-lab.ipynb"> <a target="_blank" href="https://colab.research.google.com/github/intro-stat-learning/ISLP_labs/blob/v2.2.1/Ch13-multiple-lab.ipynb">
<img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/> <img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/>
</a> </a>
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/intro-stat-learning/ISLP_labs/v2.2?labpath=Ch13-multiple-lab.ipynb) [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/intro-stat-learning/ISLP_labs/v2.2.1?labpath=Ch13-multiple-lab.ipynb)

File diff suppressed because one or more lines are too long

View File

@@ -1,4 +1,5 @@
numpy==2.4.2 numpy==2.3.5
numba==0.63.1
scipy==1.16.3 scipy==1.16.3
pandas==3.0.0 pandas==3.0.0
lxml==6.0.2 lxml==6.0.2