Fix refs again (#76)
* Ch2->Ch02 * fixed latex refs again, somehow crept back in * fixed the page refs, formats synced * unsynced * executed notebook besides 10 * warnings for lasso * allow saving of output in notebooks * Ch10 executed
This commit is contained in:
1 parent
3d9af7c4b0
commit
6bf6160a3d
25 files changed
+21872
-3191
No files matched your search
@@ -36,8 +36,8 @@ Please see the `Python` resources page on the book website [statlearning.com](ht
|
|||||||
You will need to install the `ISLP` package, which provides access to the datasets and custom-built functions that we provide.
|
You will need to install the `ISLP` package, which provides access to the datasets and custom-built functions that we provide.
|
||||||
Inside a macOS or Linux terminal type `pip install ISLP`; this also installs most other packages needed in the labs. The `Python` resources page has a link to the `ISLP` documentation website.
|
Inside a macOS or Linux terminal type `pip install ISLP`; this also installs most other packages needed in the labs. The `Python` resources page has a link to the `ISLP` documentation website.
|
||||||
|
|
||||||
To run this lab, download the file `Ch2-statlearn-lab.ipynb` from the `Python` resources page.
|
To run this lab, download the file `Ch02-statlearn-lab.ipynb` from the `Python` resources page.
|
||||||
Now run the following code at the command line: `jupyter lab Ch2-statlearn-lab.ipynb`.
|
Now run the following code at the command line: `jupyter lab Ch02-statlearn-lab.ipynb`.
|
||||||
|
|
||||||
If you're using Windows, you can use the `start menu` to access `anaconda`, and follow the links. For example, to install `ISLP` and run this lab, you can run the same code above in an `anaconda` shell.
|
If you're using Windows, you can use the `start menu` to access `anaconda`, and follow the links. For example, to install `ISLP` and run this lab, you can run the same code above in an `anaconda` shell.
|
||||||
|
|
||||||
@@ -72,7 +72,7 @@ print('fit a model with', 11, 'variables')
|
|||||||
The following command will provide information about the `print()` function.
|
The following command will provide information about the `print()` function.
|
||||||
|
|
||||||
```{python}
|
```{python}
|
||||||
print?
|
# print?
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -222,7 +222,7 @@ documentation associated with the function `fun`, if it exists.
|
|||||||
We can try this for `np.array()`.
|
We can try this for `np.array()`.
|
||||||
|
|
||||||
```{python}
|
```{python}
|
||||||
np.array?
|
# np.array?
|
||||||
|
|
||||||
```
|
```
|
||||||
This documentation indicates that we could create a floating point array by passing a `dtype` argument into `np.array()`.
|
This documentation indicates that we could create a floating point array by passing a `dtype` argument into `np.array()`.
|
||||||
|
|||||||
+535
-528
File diff suppressed because it is too large.
Load diff
+2
-2
@@ -332,7 +332,7 @@ As mentioned above, there is an existing function to add a line to a plot --- `a
|
|||||||
|
|
||||||
|
|
||||||
Next we examine some diagnostic plots, several of which were discussed
|
Next we examine some diagnostic plots, several of which were discussed
|
||||||
in Section~\ref{Ch3:problems.sec}.
|
in Section 3.3.3.
|
||||||
We can find the fitted values and residuals
|
We can find the fitted values and residuals
|
||||||
of the fit as attributes of the `results` object.
|
of the fit as attributes of the `results` object.
|
||||||
Various influence measures describing the regression model
|
Various influence measures describing the regression model
|
||||||
@@ -429,7 +429,7 @@ We can access the individual components of `results` by name
|
|||||||
and
|
and
|
||||||
`np.sqrt(results.scale)` gives us the RSE.
|
`np.sqrt(results.scale)` gives us the RSE.
|
||||||
|
|
||||||
Variance inflation factors (section~\ref{Ch3:problems.sec}) are sometimes useful
|
Variance inflation factors (section 3.3.3) are sometimes useful
|
||||||
to assess the effect of collinearity in the model matrix of a regression model.
|
to assess the effect of collinearity in the model matrix of a regression model.
|
||||||
We will compute the VIFs in our multiple regression fit, and use the opportunity to introduce the idea of *list comprehension*.
|
We will compute the VIFs in our multiple regression fit, and use the opportunity to introduce the idea of *list comprehension*.
|
||||||
|
|
||||||
|
|||||||
+170
-167
@@ -5,6 +5,7 @@
|
|||||||
"id": "18156290",
|
"id": "18156290",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"source": [
|
"source": [
|
||||||
|
"\n",
|
||||||
"# Linear Regression\n",
|
"# Linear Regression\n",
|
||||||
"\n",
|
"\n",
|
||||||
"<a target=\"_blank\" href=\"https://colab.research.google.com/github/intro-stat-learning/ISLP_labs/blob/v2.2.1/Ch03-linreg-lab.ipynb\">\n",
|
"<a target=\"_blank\" href=\"https://colab.research.google.com/github/intro-stat-learning/ISLP_labs/blob/v2.2.1/Ch03-linreg-lab.ipynb\">\n",
|
||||||
@@ -30,10 +31,10 @@
|
|||||||
"id": "c5fcfd8f",
|
"id": "c5fcfd8f",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:39:27.021175Z",
|
"iopub.execute_input": "2026-02-05T00:46:33.021645Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:39:27.020835Z",
|
"iopub.status.busy": "2026-02-05T00:46:33.021532Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:39:27.539512Z",
|
"iopub.status.idle": "2026-02-05T00:46:33.407346Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:39:27.539190Z"
|
"shell.execute_reply": "2026-02-05T00:46:33.406810Z"
|
||||||
},
|
},
|
||||||
"lines_to_next_cell": 2
|
"lines_to_next_cell": 2
|
||||||
},
|
},
|
||||||
@@ -63,10 +64,10 @@
|
|||||||
"id": "42cfb62e",
|
"id": "42cfb62e",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:39:27.541322Z",
|
"iopub.execute_input": "2026-02-05T00:46:33.409453Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:39:27.541174Z",
|
"iopub.status.busy": "2026-02-05T00:46:33.409268Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:39:29.411540Z",
|
"iopub.status.idle": "2026-02-05T00:46:58.504124Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:39:29.411217Z"
|
"shell.execute_reply": "2026-02-05T00:46:58.503204Z"
|
||||||
},
|
},
|
||||||
"lines_to_next_cell": 0
|
"lines_to_next_cell": 0
|
||||||
},
|
},
|
||||||
@@ -96,10 +97,10 @@
|
|||||||
"id": "b387d3ac",
|
"id": "b387d3ac",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:39:29.413584Z",
|
"iopub.execute_input": "2026-02-05T00:46:58.508374Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:39:29.413346Z",
|
"iopub.status.busy": "2026-02-05T00:46:58.507878Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:39:29.416014Z",
|
"iopub.status.idle": "2026-02-05T00:46:58.516396Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:39:29.415791Z"
|
"shell.execute_reply": "2026-02-05T00:46:58.515799Z"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
@@ -127,10 +128,10 @@
|
|||||||
"id": "307b7e22",
|
"id": "307b7e22",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:39:29.417302Z",
|
"iopub.execute_input": "2026-02-05T00:46:58.518173Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:39:29.417209Z",
|
"iopub.status.busy": "2026-02-05T00:46:58.518044Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:39:30.445922Z",
|
"iopub.status.idle": "2026-02-05T00:46:58.645367Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:39:30.445414Z"
|
"shell.execute_reply": "2026-02-05T00:46:58.644881Z"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
@@ -159,10 +160,10 @@
|
|||||||
"id": "79099069",
|
"id": "79099069",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:39:30.450007Z",
|
"iopub.execute_input": "2026-02-05T00:46:58.647130Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:39:30.449668Z",
|
"iopub.status.busy": "2026-02-05T00:46:58.646959Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:39:30.454853Z",
|
"iopub.status.idle": "2026-02-05T00:46:58.651130Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:39:30.454553Z"
|
"shell.execute_reply": "2026-02-05T00:46:58.650568Z"
|
||||||
},
|
},
|
||||||
"lines_to_next_cell": 0
|
"lines_to_next_cell": 0
|
||||||
},
|
},
|
||||||
@@ -240,10 +241,10 @@
|
|||||||
"id": "3f99195f",
|
"id": "3f99195f",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:39:30.456778Z",
|
"iopub.execute_input": "2026-02-05T00:46:58.652673Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:39:30.456657Z",
|
"iopub.status.busy": "2026-02-05T00:46:58.652586Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:39:30.459518Z",
|
"iopub.status.idle": "2026-02-05T00:46:58.655639Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:39:30.459207Z"
|
"shell.execute_reply": "2026-02-05T00:46:58.655261Z"
|
||||||
},
|
},
|
||||||
"lines_to_next_cell": 0
|
"lines_to_next_cell": 0
|
||||||
},
|
},
|
||||||
@@ -259,12 +260,13 @@
|
|||||||
" '__array_finalize__',\n",
|
" '__array_finalize__',\n",
|
||||||
" '__array_function__',\n",
|
" '__array_function__',\n",
|
||||||
" '__array_interface__',\n",
|
" '__array_interface__',\n",
|
||||||
" '__array_prepare__',\n",
|
" '__array_namespace__',\n",
|
||||||
" '__array_priority__',\n",
|
" '__array_priority__',\n",
|
||||||
" '__array_struct__',\n",
|
" '__array_struct__',\n",
|
||||||
" '__array_ufunc__',\n",
|
" '__array_ufunc__',\n",
|
||||||
" '__array_wrap__',\n",
|
" '__array_wrap__',\n",
|
||||||
" '__bool__',\n",
|
" '__bool__',\n",
|
||||||
|
" '__buffer__',\n",
|
||||||
" '__class__',\n",
|
" '__class__',\n",
|
||||||
" '__class_getitem__',\n",
|
" '__class_getitem__',\n",
|
||||||
" '__complex__',\n",
|
" '__complex__',\n",
|
||||||
@@ -366,6 +368,7 @@
|
|||||||
" 'cumprod',\n",
|
" 'cumprod',\n",
|
||||||
" 'cumsum',\n",
|
" 'cumsum',\n",
|
||||||
" 'data',\n",
|
" 'data',\n",
|
||||||
|
" 'device',\n",
|
||||||
" 'diagonal',\n",
|
" 'diagonal',\n",
|
||||||
" 'dot',\n",
|
" 'dot',\n",
|
||||||
" 'dtype',\n",
|
" 'dtype',\n",
|
||||||
@@ -380,6 +383,7 @@
|
|||||||
" 'item',\n",
|
" 'item',\n",
|
||||||
" 'itemset',\n",
|
" 'itemset',\n",
|
||||||
" 'itemsize',\n",
|
" 'itemsize',\n",
|
||||||
|
" 'mT',\n",
|
||||||
" 'max',\n",
|
" 'max',\n",
|
||||||
" 'mean',\n",
|
" 'mean',\n",
|
||||||
" 'min',\n",
|
" 'min',\n",
|
||||||
@@ -409,10 +413,10 @@
|
|||||||
" 'sum',\n",
|
" 'sum',\n",
|
||||||
" 'swapaxes',\n",
|
" 'swapaxes',\n",
|
||||||
" 'take',\n",
|
" 'take',\n",
|
||||||
|
" 'to_device',\n",
|
||||||
" 'tobytes',\n",
|
" 'tobytes',\n",
|
||||||
" 'tofile',\n",
|
" 'tofile',\n",
|
||||||
" 'tolist',\n",
|
" 'tolist',\n",
|
||||||
" 'tostring',\n",
|
|
||||||
" 'trace',\n",
|
" 'trace',\n",
|
||||||
" 'transpose',\n",
|
" 'transpose',\n",
|
||||||
" 'var',\n",
|
" 'var',\n",
|
||||||
@@ -444,10 +448,10 @@
|
|||||||
"id": "f3f913ca",
|
"id": "f3f913ca",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:39:30.462699Z",
|
"iopub.execute_input": "2026-02-05T00:46:58.657123Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:39:30.462588Z",
|
"iopub.status.busy": "2026-02-05T00:46:58.657009Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:39:30.464715Z",
|
"iopub.status.idle": "2026-02-05T00:46:58.659349Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:39:30.464482Z"
|
"shell.execute_reply": "2026-02-05T00:46:58.658879Z"
|
||||||
},
|
},
|
||||||
"lines_to_next_cell": 0
|
"lines_to_next_cell": 0
|
||||||
},
|
},
|
||||||
@@ -455,7 +459,7 @@
|
|||||||
{
|
{
|
||||||
"data": {
|
"data": {
|
||||||
"text/plain": [
|
"text/plain": [
|
||||||
"19"
|
"np.int64(19)"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"execution_count": 7,
|
"execution_count": 7,
|
||||||
@@ -469,7 +473,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "markdown",
|
"cell_type": "markdown",
|
||||||
"id": "974fad08",
|
"id": "a091c385",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"source": [
|
"source": [
|
||||||
" "
|
" "
|
||||||
@@ -502,10 +506,10 @@
|
|||||||
"id": "d720e2c5",
|
"id": "d720e2c5",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:39:30.466013Z",
|
"iopub.execute_input": "2026-02-05T00:46:58.660790Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:39:30.465903Z",
|
"iopub.status.busy": "2026-02-05T00:46:58.660681Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:39:30.473161Z",
|
"iopub.status.idle": "2026-02-05T00:46:58.667970Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:39:30.472896Z"
|
"shell.execute_reply": "2026-02-05T00:46:58.667528Z"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"outputs": [
|
"outputs": [
|
||||||
@@ -514,7 +518,7 @@
|
|||||||
"text/plain": [
|
"text/plain": [
|
||||||
"Index(['crim', 'zn', 'indus', 'chas', 'nox', 'rm', 'age', 'dis', 'rad', 'tax',\n",
|
"Index(['crim', 'zn', 'indus', 'chas', 'nox', 'rm', 'age', 'dis', 'rad', 'tax',\n",
|
||||||
" 'ptratio', 'lstat', 'medv'],\n",
|
" 'ptratio', 'lstat', 'medv'],\n",
|
||||||
" dtype='object')"
|
" dtype='str')"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"execution_count": 8,
|
"execution_count": 8,
|
||||||
@@ -546,10 +550,10 @@
|
|||||||
"id": "40e9b0d5",
|
"id": "40e9b0d5",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:39:30.474574Z",
|
"iopub.execute_input": "2026-02-05T00:46:58.669334Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:39:30.474467Z",
|
"iopub.status.busy": "2026-02-05T00:46:58.669235Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:39:30.479859Z",
|
"iopub.status.idle": "2026-02-05T00:46:58.676500Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:39:30.479580Z"
|
"shell.execute_reply": "2026-02-05T00:46:58.675994Z"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"outputs": [
|
"outputs": [
|
||||||
@@ -636,10 +640,10 @@
|
|||||||
"id": "c1d544d6",
|
"id": "c1d544d6",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:39:30.481313Z",
|
"iopub.execute_input": "2026-02-05T00:46:58.677826Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:39:30.481204Z",
|
"iopub.status.busy": "2026-02-05T00:46:58.677735Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:39:30.484066Z",
|
"iopub.status.idle": "2026-02-05T00:46:58.680532Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:39:30.483773Z"
|
"shell.execute_reply": "2026-02-05T00:46:58.680087Z"
|
||||||
},
|
},
|
||||||
"lines_to_next_cell": 0
|
"lines_to_next_cell": 0
|
||||||
},
|
},
|
||||||
@@ -671,10 +675,10 @@
|
|||||||
"id": "3d340a07",
|
"id": "3d340a07",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:39:30.485397Z",
|
"iopub.execute_input": "2026-02-05T00:46:58.681887Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:39:30.485303Z",
|
"iopub.status.busy": "2026-02-05T00:46:58.681789Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:39:30.600563Z",
|
"iopub.status.idle": "2026-02-05T00:46:58.775180Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:39:30.600273Z"
|
"shell.execute_reply": "2026-02-05T00:46:58.774672Z"
|
||||||
},
|
},
|
||||||
"lines_to_next_cell": 2
|
"lines_to_next_cell": 2
|
||||||
},
|
},
|
||||||
@@ -782,10 +786,10 @@
|
|||||||
"id": "11b07af0",
|
"id": "11b07af0",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:39:30.602109Z",
|
"iopub.execute_input": "2026-02-05T00:46:58.776668Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:39:30.601940Z",
|
"iopub.status.busy": "2026-02-05T00:46:58.776550Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:39:30.609100Z",
|
"iopub.status.idle": "2026-02-05T00:46:58.783902Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:39:30.608814Z"
|
"shell.execute_reply": "2026-02-05T00:46:58.783512Z"
|
||||||
},
|
},
|
||||||
"lines_to_next_cell": 0
|
"lines_to_next_cell": 0
|
||||||
},
|
},
|
||||||
@@ -877,10 +881,10 @@
|
|||||||
"id": "d5c7b370",
|
"id": "d5c7b370",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:39:30.610774Z",
|
"iopub.execute_input": "2026-02-05T00:46:58.785500Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:39:30.610642Z",
|
"iopub.status.busy": "2026-02-05T00:46:58.785380Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:39:30.616919Z",
|
"iopub.status.idle": "2026-02-05T00:46:58.792607Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:39:30.616619Z"
|
"shell.execute_reply": "2026-02-05T00:46:58.792015Z"
|
||||||
},
|
},
|
||||||
"lines_to_next_cell": 0
|
"lines_to_next_cell": 0
|
||||||
},
|
},
|
||||||
@@ -981,10 +985,10 @@
|
|||||||
"id": "5b205c0b",
|
"id": "5b205c0b",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:39:30.618348Z",
|
"iopub.execute_input": "2026-02-05T00:46:58.794079Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:39:30.618246Z",
|
"iopub.status.busy": "2026-02-05T00:46:58.793975Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:39:30.627506Z",
|
"iopub.status.idle": "2026-02-05T00:46:58.803827Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:39:30.627236Z"
|
"shell.execute_reply": "2026-02-05T00:46:58.803302Z"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"outputs": [
|
"outputs": [
|
||||||
@@ -1003,10 +1007,10 @@
|
|||||||
" <th>Method:</th> <td>Least Squares</td> <th> F-statistic: </th> <td> 601.6</td>\n",
|
" <th>Method:</th> <td>Least Squares</td> <th> F-statistic: </th> <td> 601.6</td>\n",
|
||||||
"</tr>\n",
|
"</tr>\n",
|
||||||
"<tr>\n",
|
"<tr>\n",
|
||||||
" <th>Date:</th> <td>Mon, 02 Feb 2026</td> <th> Prob (F-statistic):</th> <td>5.08e-88</td>\n",
|
" <th>Date:</th> <td>Wed, 04 Feb 2026</td> <th> Prob (F-statistic):</th> <td>5.08e-88</td>\n",
|
||||||
"</tr>\n",
|
"</tr>\n",
|
||||||
"<tr>\n",
|
"<tr>\n",
|
||||||
" <th>Time:</th> <td>15:39:30</td> <th> Log-Likelihood: </th> <td> -1641.5</td>\n",
|
" <th>Time:</th> <td>16:46:58</td> <th> Log-Likelihood: </th> <td> -1641.5</td>\n",
|
||||||
"</tr>\n",
|
"</tr>\n",
|
||||||
"<tr>\n",
|
"<tr>\n",
|
||||||
" <th>No. Observations:</th> <td> 506</td> <th> AIC: </th> <td> 3287.</td>\n",
|
" <th>No. Observations:</th> <td> 506</td> <th> AIC: </th> <td> 3287.</td>\n",
|
||||||
@@ -1054,8 +1058,8 @@
|
|||||||
"\\textbf{Dep. Variable:} & medv & \\textbf{ R-squared: } & 0.544 \\\\\n",
|
"\\textbf{Dep. Variable:} & medv & \\textbf{ R-squared: } & 0.544 \\\\\n",
|
||||||
"\\textbf{Model:} & OLS & \\textbf{ Adj. R-squared: } & 0.543 \\\\\n",
|
"\\textbf{Model:} & OLS & \\textbf{ Adj. R-squared: } & 0.543 \\\\\n",
|
||||||
"\\textbf{Method:} & Least Squares & \\textbf{ F-statistic: } & 601.6 \\\\\n",
|
"\\textbf{Method:} & Least Squares & \\textbf{ F-statistic: } & 601.6 \\\\\n",
|
||||||
"\\textbf{Date:} & Mon, 02 Feb 2026 & \\textbf{ Prob (F-statistic):} & 5.08e-88 \\\\\n",
|
"\\textbf{Date:} & Wed, 04 Feb 2026 & \\textbf{ Prob (F-statistic):} & 5.08e-88 \\\\\n",
|
||||||
"\\textbf{Time:} & 15:39:30 & \\textbf{ Log-Likelihood: } & -1641.5 \\\\\n",
|
"\\textbf{Time:} & 16:46:58 & \\textbf{ Log-Likelihood: } & -1641.5 \\\\\n",
|
||||||
"\\textbf{No. Observations:} & 506 & \\textbf{ AIC: } & 3287. \\\\\n",
|
"\\textbf{No. Observations:} & 506 & \\textbf{ AIC: } & 3287. \\\\\n",
|
||||||
"\\textbf{Df Residuals:} & 504 & \\textbf{ BIC: } & 3295. \\\\\n",
|
"\\textbf{Df Residuals:} & 504 & \\textbf{ BIC: } & 3295. \\\\\n",
|
||||||
"\\textbf{Df Model:} & 1 & \\textbf{ } & \\\\\n",
|
"\\textbf{Df Model:} & 1 & \\textbf{ } & \\\\\n",
|
||||||
@@ -1090,8 +1094,8 @@
|
|||||||
"Dep. Variable: medv R-squared: 0.544\n",
|
"Dep. Variable: medv R-squared: 0.544\n",
|
||||||
"Model: OLS Adj. R-squared: 0.543\n",
|
"Model: OLS Adj. R-squared: 0.543\n",
|
||||||
"Method: Least Squares F-statistic: 601.6\n",
|
"Method: Least Squares F-statistic: 601.6\n",
|
||||||
"Date: Mon, 02 Feb 2026 Prob (F-statistic): 5.08e-88\n",
|
"Date: Wed, 04 Feb 2026 Prob (F-statistic): 5.08e-88\n",
|
||||||
"Time: 15:39:30 Log-Likelihood: -1641.5\n",
|
"Time: 16:46:58 Log-Likelihood: -1641.5\n",
|
||||||
"No. Observations: 506 AIC: 3287.\n",
|
"No. Observations: 506 AIC: 3287.\n",
|
||||||
"Df Residuals: 504 BIC: 3295.\n",
|
"Df Residuals: 504 BIC: 3295.\n",
|
||||||
"Df Model: 1 \n",
|
"Df Model: 1 \n",
|
||||||
@@ -1137,10 +1141,10 @@
|
|||||||
"id": "4b024467",
|
"id": "4b024467",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:39:30.629123Z",
|
"iopub.execute_input": "2026-02-05T00:46:58.805179Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:39:30.628971Z",
|
"iopub.status.busy": "2026-02-05T00:46:58.805076Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:39:30.631584Z",
|
"iopub.status.idle": "2026-02-05T00:46:58.807769Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:39:30.631348Z"
|
"shell.execute_reply": "2026-02-05T00:46:58.807393Z"
|
||||||
},
|
},
|
||||||
"lines_to_next_cell": 2
|
"lines_to_next_cell": 2
|
||||||
},
|
},
|
||||||
@@ -1180,10 +1184,10 @@
|
|||||||
"id": "195e0ace",
|
"id": "195e0ace",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:39:30.632973Z",
|
"iopub.execute_input": "2026-02-05T00:46:58.809461Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:39:30.632865Z",
|
"iopub.status.busy": "2026-02-05T00:46:58.809337Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:39:30.637003Z",
|
"iopub.status.idle": "2026-02-05T00:46:58.813983Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:39:30.636606Z"
|
"shell.execute_reply": "2026-02-05T00:46:58.813494Z"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"outputs": [
|
"outputs": [
|
||||||
@@ -1264,10 +1268,10 @@
|
|||||||
"id": "768374f6",
|
"id": "768374f6",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:39:30.638885Z",
|
"iopub.execute_input": "2026-02-05T00:46:58.815373Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:39:30.638761Z",
|
"iopub.status.busy": "2026-02-05T00:46:58.815278Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:39:30.641501Z",
|
"iopub.status.idle": "2026-02-05T00:46:58.818144Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:39:30.641240Z"
|
"shell.execute_reply": "2026-02-05T00:46:58.817575Z"
|
||||||
},
|
},
|
||||||
"lines_to_next_cell": 0
|
"lines_to_next_cell": 0
|
||||||
},
|
},
|
||||||
@@ -1302,10 +1306,10 @@
|
|||||||
"id": "1a86b943",
|
"id": "1a86b943",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:39:30.643193Z",
|
"iopub.execute_input": "2026-02-05T00:46:58.819452Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:39:30.642959Z",
|
"iopub.status.busy": "2026-02-05T00:46:58.819355Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:39:30.645734Z",
|
"iopub.status.idle": "2026-02-05T00:46:58.821956Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:39:30.645363Z"
|
"shell.execute_reply": "2026-02-05T00:46:58.821460Z"
|
||||||
},
|
},
|
||||||
"lines_to_next_cell": 0
|
"lines_to_next_cell": 0
|
||||||
},
|
},
|
||||||
@@ -1341,10 +1345,10 @@
|
|||||||
"id": "ea9727ca",
|
"id": "ea9727ca",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:39:30.647303Z",
|
"iopub.execute_input": "2026-02-05T00:46:58.823291Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:39:30.647164Z",
|
"iopub.status.busy": "2026-02-05T00:46:58.823170Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:39:30.649480Z",
|
"iopub.status.idle": "2026-02-05T00:46:58.825730Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:39:30.649231Z"
|
"shell.execute_reply": "2026-02-05T00:46:58.825179Z"
|
||||||
},
|
},
|
||||||
"lines_to_next_cell": 0
|
"lines_to_next_cell": 0
|
||||||
},
|
},
|
||||||
@@ -1401,10 +1405,10 @@
|
|||||||
"id": "796c20f6",
|
"id": "796c20f6",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:39:30.650981Z",
|
"iopub.execute_input": "2026-02-05T00:46:58.827130Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:39:30.650877Z",
|
"iopub.status.busy": "2026-02-05T00:46:58.827013Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:39:30.652739Z",
|
"iopub.status.idle": "2026-02-05T00:46:58.828993Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:39:30.652483Z"
|
"shell.execute_reply": "2026-02-05T00:46:58.828629Z"
|
||||||
},
|
},
|
||||||
"lines_to_next_cell": 0
|
"lines_to_next_cell": 0
|
||||||
},
|
},
|
||||||
@@ -1435,10 +1439,10 @@
|
|||||||
"id": "a258b8c0",
|
"id": "a258b8c0",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:39:30.654050Z",
|
"iopub.execute_input": "2026-02-05T00:46:58.830629Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:39:30.653935Z",
|
"iopub.status.busy": "2026-02-05T00:46:58.830515Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:39:30.655877Z",
|
"iopub.status.idle": "2026-02-05T00:46:58.832427Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:39:30.655613Z"
|
"shell.execute_reply": "2026-02-05T00:46:58.831987Z"
|
||||||
},
|
},
|
||||||
"lines_to_next_cell": 0
|
"lines_to_next_cell": 0
|
||||||
},
|
},
|
||||||
@@ -1475,17 +1479,17 @@
|
|||||||
"id": "56b75491",
|
"id": "56b75491",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:39:30.657094Z",
|
"iopub.execute_input": "2026-02-05T00:46:58.833622Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:39:30.656997Z",
|
"iopub.status.busy": "2026-02-05T00:46:58.833525Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:39:30.817942Z",
|
"iopub.status.idle": "2026-02-05T00:46:58.913864Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:39:30.809440Z"
|
"shell.execute_reply": "2026-02-05T00:46:58.913175Z"
|
||||||
},
|
},
|
||||||
"lines_to_next_cell": 0
|
"lines_to_next_cell": 0
|
||||||
},
|
},
|
||||||
"outputs": [
|
"outputs": [
|
||||||
{
|
{
|
||||||
"data": {
|
"data": {
|
||||||
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAjIAAAGwCAYAAACzXI8XAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLj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7wOKlaKlGihNvnzZ07N5KSkhwupH9szEdERIYKZNq1a4ft27dj69atOZfGjRsrib+2P8fHx2Pp0qU5j9mzZw+OHDmCFi1aROqwSQd7ShEREUW8aqlAgQKoU6eOw3X58uVTesbYrh84cCCGDx+OwoULKzMrQ4cOVYIYViwFLy9FlnSCueVBIKQBnyT2ymaVNmzMR0REui6/9uT1119HbGys0ghPqpFuuukmTJkyJdKHZXh6LXMO5Z5SRERkTjEWi90GOyYk5ddSvSSJv8yXserzwQa3eytJIEFERGSU8TvifWQovFjmTEREZsJAJsqwzJmIiMxE1zkyFLkyZ70lAhMREalhIBOlZc7ucmQK5Y1Xcmj0lghMRESkhktLJqJ112gJSiRosWcrc+Z+R0REZCSckYnCcmp3Zc62RGBnMnMj18v9ucxERER6whkZE/A0i+JplkaCkrbVi+UEJ0wEJiIio+GMjMF5m0W5YdIKzbku3O+IiIiMhjMyBudtFkVtlsbX/Y5snpj/G85cuOzXcRIREYUCAxmD8zaL4i7XxZdEYJuNh0+jzavLGMwQEZFuMJAxOG+zKGokwdcdWXYae0ctt7efvnAZ983a6PNxEhERhQIDGRPwNIviqemdv8tVG/847bXEO5Ll5UREFD2Y7Gtwtg68z3WqrfxsK6ces2in26Z33kqotSxXyeuEqxRbr7t1ExFR5DGQMShvg7v8XxJ77W+3Nb3TslzVuHwhbDp82u194mK1L2WFsrxc627d3HKBiMicYiwWu6/sUbwNuNHINgLuZlzsB3fnpndaSXWSJPZKTow7gcyKaAks5D7rD53CqAXb3T7PspFtPL4vzuYQEZl7/GYgY0AywNv3h/F1cPclmJHEXsmJUaMWOHmjJbBQu487M/o3UZr6BRrwERGRMQMZJvsaULg68EpgMf+Blpg1oInf5dzOtOzlpHYffxKXbc0C7YMYf4+biIj0iYGMAYW7A+9VL4uPWgMnLYGFu/s4k1kVmcnxNPPELReIiMyPyb4G7h3jb1WSlrwVSZ2y/TlYgVMwAwsticvccoGIyPwYyBhUIFVJzrzLine truncated
|
||||||
"text/plain": [
|
"text/plain": [
|
||||||
"<Figure size 640x480 with 1 Axes>"
|
"<Figure size 640x480 with 1 Axes>"
|
||||||
]
|
]
|
||||||
@@ -1523,7 +1527,7 @@
|
|||||||
"metadata": {},
|
"metadata": {},
|
||||||
"source": [
|
"source": [
|
||||||
"Next we examine some diagnostic plots, several of which were discussed\n",
|
"Next we examine some diagnostic plots, several of which were discussed\n",
|
||||||
"in Section~\\ref{Ch3:problems.sec}.\n",
|
"in Section 3.3.3.\n",
|
||||||
"We can find the fitted values and residuals\n",
|
"We can find the fitted values and residuals\n",
|
||||||
"of the fit as attributes of the `results` object.\n",
|
"of the fit as attributes of the `results` object.\n",
|
||||||
"Various influence measures describing the regression model\n",
|
"Various influence measures describing the regression model\n",
|
||||||
@@ -1539,17 +1543,17 @@
|
|||||||
"id": "74be2100",
|
"id": "74be2100",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:39:30.830030Z",
|
"iopub.execute_input": "2026-02-05T00:46:58.915410Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:39:30.829002Z",
|
"iopub.status.busy": "2026-02-05T00:46:58.915279Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:39:30.947889Z",
|
"iopub.status.idle": "2026-02-05T00:46:58.975204Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:39:30.947633Z"
|
"shell.execute_reply": "2026-02-05T00:46:58.974659Z"
|
||||||
},
|
},
|
||||||
"lines_to_next_cell": 0
|
"lines_to_next_cell": 0
|
||||||
},
|
},
|
||||||
"outputs": [
|
"outputs": [
|
||||||
{
|
{
|
||||||
"data": {
|
"data": {
|
||||||
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAroAAAKnCAYAAABpte5cAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8g+/7EAAAACXBIWXMAAA9hAAAPYQGoP6dpAACd40l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m9JiDQBQAASBhNP5h80nDfv3/3v5aURLBLoAsAAJDQiSXuOnMfq2au32D3b28tE5OVpVKp0q05kUVdXZ1UVVVJbW2tVFZWRr06AAAAOWXOjNaUSsmvX/jA1VbrVN5G3rj+aOnYvq2R8RqBrs8NBwAAEEca8J5+9xzXy2sNhvMOGSzfP8F/KkRc4zVSFwAAAAwbqKbVFdxKbU9jmPCHf4tpCHQBAAAMG6imJcS8embBSnlqnlk5uwS6AAAAhtE6uRMOGez596597G2jpgwm0AUAADDQ908Y7jnYrdu01agpgwl0AQAADA52f33G3tKxvE0o0wvHHYEuAACA4WkMc68/2qquEPT0wnFHoAsAAGC4ju3bWiXE8ulb1cGq2mAKAl0AAIASSWM4anhvx+e1xffGE4dbVRtMQaALAACQUFohQSeIeHzep9b3fBUT7v7m/nLHaXtL1w7tWrXk3nnmPta0wiZp+S4BAAAQexrQ3vHcQrn35aWybuOWFgGrtsrmCli/PKqfHLdXX6u6gg4805xcTVcwqSXXxhTAGZgCGAAAxNmM+cvlmkfelnUbvghwbXaoamLrbDqmAAYAADAwyL3wT3OzBrnKTlyY8uQCoyZ+8IvUBSAG9GJUCl1IAIDCPis0gM0Xvurzy2s3WZ8rY4b2LOnPLAJdIAZ353rh0ouSlxwrAEBp0eAy/bMiiokfZiTsM4uqC0AMuqAyL1w1tZusx/V5AAD8BK69A574wekzS3++4E9z5RczF8YuXYJAF4hhFxQ5VgCAQgLXoCd+aHSRNnH7zP/K2FufjVUjDYEuENMuqPQcKwAANHDVANZNNmzQEz+85jJtoqauIVY9kgS6QMy7oMLIsQIAJI8GrhrAKqcQtluncrkLine truncated
|
||||||
"text/plain": [
|
"text/plain": [
|
||||||
"<Figure size 800x800 with 1 Axes>"
|
"<Figure size 800x800 with 1 Axes>"
|
||||||
]
|
]
|
||||||
@@ -1587,10 +1591,10 @@
|
|||||||
"id": "db8bc925",
|
"id": "db8bc925",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:39:30.949366Z",
|
"iopub.execute_input": "2026-02-05T00:46:58.976639Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:39:30.949271Z",
|
"iopub.status.busy": "2026-02-05T00:46:58.976522Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:39:31.019326Z",
|
"iopub.status.idle": "2026-02-05T00:46:59.029267Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:39:31.019079Z"
|
"shell.execute_reply": "2026-02-05T00:46:59.028717Z"
|
||||||
},
|
},
|
||||||
"lines_to_next_cell": 0
|
"lines_to_next_cell": 0
|
||||||
},
|
},
|
||||||
@@ -1598,7 +1602,7 @@
|
|||||||
{
|
{
|
||||||
"data": {
|
"data": {
|
||||||
"text/plain": [
|
"text/plain": [
|
||||||
"374"
|
"np.int64(374)"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"execution_count": 24,
|
"execution_count": 24,
|
||||||
@@ -1607,7 +1611,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"data": {
|
"data": {
|
||||||
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAsQAAAKnCAYAAACBNVt3AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8g+/7EAAAACXBIWXMAAA9hAAAPYQGoP6dpAACJLElEQVR4nO3de3wU9b3/8fcm5AKRBALCBkRBxWoaBUG5FI9WBKFyFLQXRT1aS7FSsQo9LdqKQG1F7UXtwcrRtrb9oWJtvaE2pwhWBSMoATWCFimIQgJCJMFAAiTz+yPOdjfZy8zs7HVez8eDh2Yz2Z2d62e+38/38/UZhmEIAAAA8KicVK8AAAAAkEoExAAAAPA0AmIAAAB4GgExAAAAPI2AGAAAAJ5GQAwAAABPIyAGAACApxEQAwAAwNO6pHoFMlVbW5t27typ7t27y+fzpXp1AAAA0IFhGNq/f7/69eunnJzI7cAExA7t3LlTAwYMSPVqAA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oIiElAHDXtYHfKKaeIZoXce++9TV7TvGXbXnvtJW3atJHzzjtPxo8fL5WVlc3eS5+/8cYbizLfAADAn9mL1zRrGc4NivV1nW7Yzl1YvIhPykTXrl2lZcuWsnLlyibP6+Pq6mrHv9HnTaa3g2HNG546dapnnq/mMmvKxJIlSxxf1xZkTb2wfz755BPDbwkAAKK26ov6UKdDupQ0INZW2X322UemTZvW+Jx2qtPHw4YNc/wbfT57eqUBb/b0djC8cOFCef755608YS/z5s2z8pe7devm+Lq2GmtQnf0DAADioVvHtqFOh3QpecqEpi6cddZZsu+++1qVIO666y6risTZZ59tva41hLfbbjsrZUGNGTNGDjroILnjjjvkmGOOkUmTJskbb7wh999/f2Mw/N3vftcquaaVKDRH2c4v1nxhDcK1A96sWbPkkEMOkY4dO1qPL730UjnjjDNkm222KeHSAAAAQQzu09mqJqEd6JzyiDVruLqqrTUdELuAWMuoffbZZ3LDDTdYgauWT5syZUpjx7mlS5daLbe2/fffXyZOnCjXXXedXHvttdK3b1956qmnpH///tbry5Ytk2eeecb6v75XthdffFEOPvhgq7VXA+lx48ZZHeX69OljBcTZecUAACA5tKOcllbTahIa/GYHxXYXOn2dDnWIZR3ipKIOMQAA8UMdYgSJ10reQgwAABAWHXxDS6tpNQntQKc5w5omQcsw8iEgBgAAZUWDX0qrITFVJgAAAIBSIyAGAABAqhEQAwAAINUIiAEAAJBqBMQAAABINQJiAAAApBoBMQAAAFKNgBgAAACpRkAMAACAVCMgBgAAQKoREAMAACDVCIgBAACQagTEAAAASDUCYgAAAKQaATEAAABSjYAYAAAAqUZADAAAgFQjIAYAAECqERADAAAg1QiIAQAAkGoExAAAAEg1AmIAAACkGgExAAAAUo2AGAAAAKlGQAwAAIBUIyAGAABAqhEQAwAAINUIiAEAAJBqBMQAAABINQJiAAAApBoBMQAAAFKNgBgAAACpRkAMAACAVCMgBgAAQKoREAMAACDVCIgBAACQagTEAAAASDUCYgAAAKQaATEAAABSjYAYAAAAqUZADAAAgFQjIAYAAECqER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W28to0ePlnXr1kX2HYEk0DrD954xSKqrmqZF6GN9njrEAOKGu1soi4D4sccek8suu0zGjh0rc+bMkQEDBsiRRx4pq1atcpx+xowZMmrUKCuAnTt3rpxwwgnWz/z5863Xv/zyS+t9rr/+euv3E088IR988IEcd9xxTd5Hg+F3331Xpk6dKs8995y8/PLLcu655xblOwNxpkHvq1cdKo+eM1TuPm2g9VsfEwwDiCPubiEMFZlMpqRVq7VFeL/99pMJEyZYj7ds2SI77LCDXHzxxXL11Vc3m/7UU0+V9evXW0GsbejQoTJw4EC57777HD/j9ddfl8GDB8vHH38svXr1kvfee0/69etnPb/vvvta00yZMkWOPvpo+fTTT61WZS91dXVSVVUltbW1ViszAAAoHeoQo5B4raQDc2zcuFHefPNNueaaaxqfa9GihYwYMUJmzpzp+Df6vLYoZ9MW5aeeesr1c3QhVFRUWKkR9nvo/+1gWOln6mfPmjVLTjzxxGbvsWHDBusnewEDAIB40LtYOnCQVp3QjnaaW6zpFPR7gImSBsSrV6+WhoYG6d69e5Pn9fH777/v+Dc1NTWO0+vzTurr662cYk2zsK8MdNpu3bo1ma5Line truncated
|
||||||
"text/plain": [
|
"text/plain": [
|
||||||
"<Figure size 800x800 with 1 Axes>"
|
"<Figure size 800x800 with 1 Axes>"
|
||||||
]
|
]
|
||||||
@@ -1655,10 +1659,10 @@
|
|||||||
"id": "e479373c",
|
"id": "e479373c",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:39:31.020681Z",
|
"iopub.execute_input": "2026-02-05T00:46:59.030788Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:39:31.020598Z",
|
"iopub.status.busy": "2026-02-05T00:46:59.030664Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:39:31.030887Z",
|
"iopub.status.idle": "2026-02-05T00:46:59.043708Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:39:31.030658Z"
|
"shell.execute_reply": "2026-02-05T00:46:59.043288Z"
|
||||||
},
|
},
|
||||||
"lines_to_next_cell": 0
|
"lines_to_next_cell": 0
|
||||||
},
|
},
|
||||||
@@ -1753,10 +1757,10 @@
|
|||||||
"id": "b903170c",
|
"id": "b903170c",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:39:31.032055Z",
|
"iopub.execute_input": "2026-02-05T00:46:59.045283Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:39:31.031989Z",
|
"iopub.status.busy": "2026-02-05T00:46:59.045156Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:39:31.034213Z",
|
"iopub.status.idle": "2026-02-05T00:46:59.047873Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:39:31.033996Z"
|
"shell.execute_reply": "2026-02-05T00:46:59.047301Z"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"outputs": [
|
"outputs": [
|
||||||
@@ -1765,7 +1769,7 @@
|
|||||||
"text/plain": [
|
"text/plain": [
|
||||||
"Index(['crim', 'zn', 'indus', 'chas', 'nox', 'rm', 'age', 'dis', 'rad', 'tax',\n",
|
"Index(['crim', 'zn', 'indus', 'chas', 'nox', 'rm', 'age', 'dis', 'rad', 'tax',\n",
|
||||||
" 'ptratio', 'lstat'],\n",
|
" 'ptratio', 'lstat'],\n",
|
||||||
" dtype='object')"
|
" dtype='str')"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"execution_count": 26,
|
"execution_count": 26,
|
||||||
@@ -1793,10 +1797,10 @@
|
|||||||
"id": "bbe47670",
|
"id": "bbe47670",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:39:31.035261Z",
|
"iopub.execute_input": "2026-02-05T00:46:59.049180Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:39:31.035192Z",
|
"iopub.status.busy": "2026-02-05T00:46:59.049072Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:39:31.050874Z",
|
"iopub.status.idle": "2026-02-05T00:46:59.071518Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:39:31.050643Z"
|
"shell.execute_reply": "2026-02-05T00:46:59.070822Z"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"outputs": [
|
"outputs": [
|
||||||
@@ -1969,10 +1973,10 @@
|
|||||||
"id": "a1484d00",
|
"id": "a1484d00",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:39:31.052042Z",
|
"iopub.execute_input": "2026-02-05T00:46:59.073962Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:39:31.051970Z",
|
"iopub.status.busy": "2026-02-05T00:46:59.073660Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:39:31.067211Z",
|
"iopub.status.idle": "2026-02-05T00:46:59.096434Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:39:31.066979Z"
|
"shell.execute_reply": "2026-02-05T00:46:59.095940Z"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"outputs": [
|
"outputs": [
|
||||||
@@ -2132,7 +2136,7 @@
|
|||||||
"and\n",
|
"and\n",
|
||||||
"`np.sqrt(results.scale)` gives us the RSE.\n",
|
"`np.sqrt(results.scale)` gives us the RSE.\n",
|
||||||
"\n",
|
"\n",
|
||||||
"Variance inflation factors (section~\\ref{Ch3:problems.sec}) are sometimes useful\n",
|
"Variance inflation factors (section 3.3.3) are sometimes useful\n",
|
||||||
"to assess the effect of collinearity in the model matrix of a regression model.\n",
|
"to assess the effect of collinearity in the model matrix of a regression model.\n",
|
||||||
"We will compute the VIFs in our multiple regression fit, and use the opportunity to introduce the idea of *list comprehension*.\n",
|
"We will compute the VIFs in our multiple regression fit, and use the opportunity to introduce the idea of *list comprehension*.\n",
|
||||||
"\n",
|
"\n",
|
||||||
@@ -2157,10 +2161,10 @@
|
|||||||
"id": "46ac946c",
|
"id": "46ac946c",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:39:31.068412Z",
|
"iopub.execute_input": "2026-02-05T00:46:59.097952Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:39:31.068335Z",
|
"iopub.status.busy": "2026-02-05T00:46:59.097830Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:39:31.074305Z",
|
"iopub.status.idle": "2026-02-05T00:46:59.105816Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:39:31.074088Z"
|
"shell.execute_reply": "2026-02-05T00:46:59.105253Z"
|
||||||
},
|
},
|
||||||
"lines_to_next_cell": 0
|
"lines_to_next_cell": 0
|
||||||
},
|
},
|
||||||
@@ -2289,10 +2293,10 @@
|
|||||||
"id": "b626ecb9",
|
"id": "b626ecb9",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:39:31.075380Z",
|
"iopub.execute_input": "2026-02-05T00:46:59.107357Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:39:31.075309Z",
|
"iopub.status.busy": "2026-02-05T00:46:59.107227Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:39:31.079549Z",
|
"iopub.status.idle": "2026-02-05T00:46:59.112960Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:39:31.079349Z"
|
"shell.execute_reply": "2026-02-05T00:46:59.112543Z"
|
||||||
},
|
},
|
||||||
"lines_to_next_cell": 0
|
"lines_to_next_cell": 0
|
||||||
},
|
},
|
||||||
@@ -2322,10 +2326,10 @@
|
|||||||
"id": "8bf77477",
|
"id": "8bf77477",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:39:31.080739Z",
|
"iopub.execute_input": "2026-02-05T00:46:59.114374Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:39:31.080668Z",
|
"iopub.status.busy": "2026-02-05T00:46:59.114282Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:39:31.092282Z",
|
"iopub.status.idle": "2026-02-05T00:46:59.129480Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:39:31.092056Z"
|
"shell.execute_reply": "2026-02-05T00:46:59.129041Z"
|
||||||
},
|
},
|
||||||
"lines_to_next_cell": 2
|
"lines_to_next_cell": 2
|
||||||
},
|
},
|
||||||
@@ -2430,10 +2434,10 @@
|
|||||||
"id": "6289c3cb",
|
"id": "6289c3cb",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:39:31.093513Z",
|
"iopub.execute_input": "2026-02-05T00:46:59.130928Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:39:31.093439Z",
|
"iopub.status.busy": "2026-02-05T00:46:59.130810Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:39:31.104646Z",
|
"iopub.status.idle": "2026-02-05T00:46:59.147592Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:39:31.104378Z"
|
"shell.execute_reply": "2026-02-05T00:46:59.147101Z"
|
||||||
},
|
},
|
||||||
"lines_to_next_cell": 0
|
"lines_to_next_cell": 0
|
||||||
},
|
},
|
||||||
@@ -2548,10 +2552,10 @@
|
|||||||
"id": "b6542ac6",
|
"id": "b6542ac6",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:39:31.105936Z",
|
"iopub.execute_input": "2026-02-05T00:46:59.148985Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:39:31.105862Z",
|
"iopub.status.busy": "2026-02-05T00:46:59.148888Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:39:31.111397Z",
|
"iopub.status.idle": "2026-02-05T00:46:59.154574Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:39:31.111147Z"
|
"shell.execute_reply": "2026-02-05T00:46:59.153934Z"
|
||||||
},
|
},
|
||||||
"lines_to_next_cell": 0
|
"lines_to_next_cell": 0
|
||||||
},
|
},
|
||||||
@@ -2658,17 +2662,17 @@
|
|||||||
"id": "8e4c6004",
|
"id": "8e4c6004",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:39:31.112521Z",
|
"iopub.execute_input": "2026-02-05T00:46:59.155864Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:39:31.112440Z",
|
"iopub.status.busy": "2026-02-05T00:46:59.155746Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:39:31.190330Z",
|
"iopub.status.idle": "2026-02-05T00:46:59.218783Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:39:31.189998Z"
|
"shell.execute_reply": "2026-02-05T00:46:59.218372Z"
|
||||||
},
|
},
|
||||||
"lines_to_next_cell": 0
|
"lines_to_next_cell": 0
|
||||||
},
|
},
|
||||||
"outputs": [
|
"outputs": [
|
||||||
{
|
{
|
||||||
"data": {
|
"data": {
|
||||||
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAsIAAAKnCAYAAACMKyswAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8g+/7EAAAACXBIWXMAAA9hAAAPYQGoP6dpAACeMElEQVR4nO3de3gU5dk/8O9uyIGEZCGcNihCOKjEcBBbDoInBAlQxEP7Vqo/D7W0IrSCWtG+IlBUxB7Uvli1qGCrSF9bFZWatyCoBQO0YtQIKsQgKglIAgkEEiA7vz/CLLubmd1nZmd2Tt/PdXm1bCab2dnZnXvu537uxydJkgQiIiIiIo/xW70DRERERERWYCBMRERERJ7EQJiIiIiIPImBMBERERF5EgNhIiIiIvIkBsJERERE5EkMhImIiIjIkxgIExEREZEntbN6B+wmFAphz549yM3Nhc/ns3p3iIiIiCiGJEk4dOgQevToAb9ff16XgXCMPXv2oGfPnlbvBhEREREl8NVXX+H000/X/f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2EiIiIiomQwECYiIiIiT2IgTERERESexECYiIiIiDyJgTAREREReRIDYSIiIiLyJAbCRERERORJDISJiIiIyJMYCBMRERGRJzEQJiIiIiJPYiBMRERERJ7EQJiIiIiIPImBMBERERF5EgNhIiIiIvIkBsJERERE5EkMhImIiIjIkxgIExEREZEntbN6B7ysJSRhS1Ud9h1qQrfcLAwrzEea32f1bhERERF5AgNhi5RWVGPB69tQXd8UfqwgkIV5k4tQUlxg4Z4REREReQNLIyxQWlGN6c9vjQqCAaCmvgnTn9+K0opqi/aMiIiIyDsYCKdYS0jCgte3QVL4mfzYgte3oSWktAURERERGYWBcIptqaprkwmOJAGorm/Clqq61O0UERERkQcxEE6xfYfUg2A92xERERGRPgyEU6xbbpah2xERERGRPgyEU2xYYT4KAllQa5LmQ2v3iGGF+ancLSIiIiLPYSCcYml+H+ZNLgKANsGw/O95k4vYT5iIiIjIZAyELVBSXIAnrhuKYCC6/CEYyMIT1w1lH2EiIiKiFOCCGhYpKS7AuKIgV5YjIiIisggDYQul+X0Y2bez1btBRERE5EksjSAiIiIiT2IgTERERESexECYiIiIiDyJgTAREREReRIDYSIiIiLyJAbCRERERORJDISJiIiIyJMYCBMRERGRJzEQJiIiIiJPYiBMRERERJ7EQJiIiIiIPImBMBERERF5EgNhIiIiIvIkBsJERERE5EkMhImIiIjIkxgIExEREZEnMRAmIiIiIk9qZ/UOEBERkT21hCRsqarDvkNN6JabhWGF+Ujz+6zeLSLDMBAmIiKiNkorqrHg9W2orm8KP1YQyMK8yUUoKS6wcM+IjMPSCCIiIopSWlGN6c9vjQqCAaCmvgnTn9+K0opqi/aMyFgMhImIiCisJSRhwevbICn8TH5swevb0BJS2oLIWRgIExERUdiWqro2meBIEoDq+iZsqapL3U4RmYSBMBEREYXtO6QeBOvZjsjOGAgTERFRWLfcLEO3I7IzBsJEREQUNqwwHwWBLKg1SfOhtXvEsML8VO4WkSkYCBMREVFYmt+HeZOLAKBNMCz/e97kIvYTJldgIExERORRLSEJZZW1WF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o9wI2g4rVEBcKVQCAMAMg6uzlGYYBgj+XqRLtSQa2bkWQ3ywJBx2uJSo0AAADhKtUcQ2/TEFXv14l2TgGrae6x11FnICipqiMMAAD8KdccQ4Nhvd9vPWCnlswNjWut2/V+IGwEwgAAwHWdXz/1gMuNOiu9X5cDwkQgDABACmjQOHvBUrl/7kfWd69BpGmdXz/1gE1HnW99ZiHBMEJFjjAAAAkXZK6tTlbT39UUhWKhdNXmDnR+6gGbjiZf+vDrctPTC8kZRmgYEQYAIMGCzrXViW4aQKvCqXD2z37rAbsZTSZnGGEiEAYAIKHCyrXVUWQtkaYjv/n053Kl09yMOpuE0rnNXz+59xVZt6HF198FCpEaAQBABio8uG2lrMGulkgLo8avPeqsI9b6aCZh+rLV62Xc9MfliiNGUVoNgWFEGACAhAq7woNdD/iwMVta34NsdOE06lyKdqujtBqCRCAMAEBCVaLCQ5g0GH763Ily4cE7uvo9SqshKATCAAAkVLlcW719oM8KD2HTUebjJwx1lTMcREMPQBEIAwCQUJWo8FDp52HKT0MPwEYgDABAgoVd4aHSz6NP9+pEp3sgWapyuRz9C/M0NTVJXV2dNDY2Sm1Line truncated
|
||||||
"text/plain": [
|
"text/plain": [
|
||||||
"<Figure size 800x800 with 1 Axes>"
|
"<Figure size 800x800 with 1 Axes>"
|
||||||
]
|
]
|
||||||
@@ -2714,10 +2718,10 @@
|
|||||||
"id": "a83f4bd2",
|
"id": "a83f4bd2",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:39:31.191827Z",
|
"iopub.execute_input": "2026-02-05T00:46:59.220662Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:39:31.191712Z",
|
"iopub.status.busy": "2026-02-05T00:46:59.220531Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:39:31.196704Z",
|
"iopub.status.idle": "2026-02-05T00:46:59.225313Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:39:31.196474Z"
|
"shell.execute_reply": "2026-02-05T00:46:59.224873Z"
|
||||||
},
|
},
|
||||||
"lines_to_next_cell": 0
|
"lines_to_next_cell": 0
|
||||||
},
|
},
|
||||||
@@ -2727,7 +2731,7 @@
|
|||||||
"text/plain": [
|
"text/plain": [
|
||||||
"Index(['Sales', 'CompPrice', 'Income', 'Advertising', 'Population', 'Price',\n",
|
"Index(['Sales', 'CompPrice', 'Income', 'Advertising', 'Population', 'Price',\n",
|
||||||
" 'ShelveLoc', 'Age', 'Education', 'Urban', 'US'],\n",
|
" 'ShelveLoc', 'Age', 'Education', 'Urban', 'US'],\n",
|
||||||
" dtype='object')"
|
" dtype='str')"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"execution_count": 35,
|
"execution_count": 35,
|
||||||
@@ -2765,10 +2769,10 @@
|
|||||||
"id": "24efc6f1",
|
"id": "24efc6f1",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:39:31.198021Z",
|
"iopub.execute_input": "2026-02-05T00:46:59.226697Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:39:31.197937Z",
|
"iopub.status.busy": "2026-02-05T00:46:59.226604Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:39:31.220399Z",
|
"iopub.status.idle": "2026-02-05T00:46:59.257097Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:39:31.220140Z"
|
"shell.execute_reply": "2026-02-05T00:46:59.256625Z"
|
||||||
},
|
},
|
||||||
"lines_to_next_cell": 0
|
"lines_to_next_cell": 0
|
||||||
},
|
},
|
||||||
@@ -2960,8 +2964,7 @@
|
|||||||
"metadata": {
|
"metadata": {
|
||||||
"jupytext": {
|
"jupytext": {
|
||||||
"cell_metadata_filter": "-all",
|
"cell_metadata_filter": "-all",
|
||||||
"formats": "ipynb",
|
"formats": "ipynb"
|
||||||
"main_language": "python"
|
|
||||||
},
|
},
|
||||||
"kernelspec": {
|
"kernelspec": {
|
||||||
"display_name": "Python 3 (ipykernel)",
|
"display_name": "Python 3 (ipykernel)",
|
||||||
@@ -2978,7 +2981,7 @@
|
|||||||
"name": "python",
|
"name": "python",
|
||||||
"nbconvert_exporter": "python",
|
"nbconvert_exporter": "python",
|
||||||
"pygments_lexer": "ipython3",
|
"pygments_lexer": "ipython3",
|
||||||
"version": "3.11.4"
|
"version": "3.12.10"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nbformat": 4,
|
"nbformat": 4,
|
||||||
|
|||||||
+12
-12
@@ -394,7 +394,7 @@ lda.fit(X_train, L_train)
|
|||||||
|
|
||||||
```
|
```
|
||||||
Here we have used the list comprehensions introduced
|
Here we have used the list comprehensions introduced
|
||||||
in Section~\ref{Ch3-linreg-lab:multivariate-goodness-of-fit}. Looking at our first line above, we see that the right-hand side is a list
|
in Section 3.6.4. Looking at our first line above, we see that the right-hand side is a list
|
||||||
of length two. This is because the code `for M in [X_train, X_test]` iterates over a list
|
of length two. This is because the code `for M in [X_train, X_test]` iterates over a list
|
||||||
of length two. While here we loop over a list,
|
of length two. While here we loop over a list,
|
||||||
the list comprehension method works when looping over any iterable object.
|
the list comprehension method works when looping over any iterable object.
|
||||||
@@ -443,7 +443,7 @@ lda.scalings_
|
|||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
These values provide the linear combination of `Lag1` and `Lag2` that are used to form the LDA decision rule. In other words, these are the multipliers of the elements of $X=x$ in (\ref{Ch4:bayes.multi}).
|
These values provide the linear combination of `Lag1` and `Lag2` that are used to form the LDA decision rule. In other words, these are the multipliers of the elements of $X=x$ in (4.24).
|
||||||
If $-0.64\times `Lag1` - 0.51 \times `Lag2` $ is large, then the LDA classifier will predict a market increase, and if it is small, then the LDA classifier will predict a market decline.
|
If $-0.64\times `Lag1` - 0.51 \times `Lag2` $ is large, then the LDA classifier will predict a market increase, and if it is small, then the LDA classifier will predict a market decline.
|
||||||
|
|
||||||
```{python}
|
```{python}
|
||||||
@@ -452,7 +452,7 @@ lda_pred = lda.predict(X_test)
|
|||||||
```
|
```
|
||||||
|
|
||||||
As we observed in our comparison of classification methods
|
As we observed in our comparison of classification methods
|
||||||
(Section~\ref{Ch4:comparison.sec}), the LDA and logistic
|
(Section 4.5), the LDA and logistic
|
||||||
regression predictions are almost identical.
|
regression predictions are almost identical.
|
||||||
|
|
||||||
```{python}
|
```{python}
|
||||||
@@ -511,7 +511,7 @@ The LDA classifier above is the first classifier from the
|
|||||||
`sklearn` library. We will use several other objects
|
`sklearn` library. We will use several other objects
|
||||||
from this library. The objects
|
from this library. The objects
|
||||||
follow a common structure that simplifies tasks such as cross-validation,
|
follow a common structure that simplifies tasks such as cross-validation,
|
||||||
which we will see in Chapter~\ref{Ch5:resample}. Specifically,
|
which we will see in Chapter 5. Specifically,
|
||||||
the methods first create a generic classifier without
|
the methods first create a generic classifier without
|
||||||
referring to any data. This classifier is then fit
|
referring to any data. This classifier is then fit
|
||||||
to data with the `fit()` method and predictions are
|
to data with the `fit()` method and predictions are
|
||||||
@@ -797,7 +797,7 @@ feature_std.std()
|
|||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Notice that the standard deviations are not quite $1$ here; this is again due to some procedures using the $1/n$ convention for variances (in this case `scaler()`), while others use $1/(n-1)$ (the `std()` method). See the footnote on page~\pageref{Ch4-varformula}.
|
Notice that the standard deviations are not quite $1$ here; this is again due to some procedures using the $1/n$ convention for variances (in this case `scaler()`), while others use $1/(n-1)$ (the `std()` method). See the footnote on page 183.
|
||||||
In this case it does not matter, as long as the variables are all on the same scale.
|
In this case it does not matter, as long as the variables are all on the same scale.
|
||||||
|
|
||||||
Using the function `train_test_split()` we now split the observations into a test set,
|
Using the function `train_test_split()` we now split the observations into a test set,
|
||||||
@@ -864,7 +864,7 @@ This is double the rate that one would obtain from random guessing.
|
|||||||
The number of neighbors in KNN is referred to as a *tuning parameter*, also referred to as a *hyperparameter*.
|
The number of neighbors in KNN is referred to as a *tuning parameter*, also referred to as a *hyperparameter*.
|
||||||
We do not know *a priori* what value to use. It is therefore of interest
|
We do not know *a priori* what value to use. It is therefore of interest
|
||||||
to see how the classifier performs on test data as we vary these
|
to see how the classifier performs on test data as we vary these
|
||||||
parameters. This can be achieved with a `for` loop, described in Section~\ref{Ch2-statlearn-lab:for-loops}.
|
parameters. This can be achieved with a `for` loop, described in Section 2.3.8.
|
||||||
Here we use a for loop to look at the accuracy of our classifier in the group predicted to purchase
|
Here we use a for loop to look at the accuracy of our classifier in the group predicted to purchase
|
||||||
insurance as we vary the number of neighbors from 1 to 5:
|
insurance as we vary the number of neighbors from 1 to 5:
|
||||||
|
|
||||||
@@ -891,7 +891,7 @@ As a comparison, we can also fit a logistic regression model to the
|
|||||||
data. This can also be done
|
data. This can also be done
|
||||||
with `sklearn`, though by default it fits
|
with `sklearn`, though by default it fits
|
||||||
something like the *ridge regression* version
|
something like the *ridge regression* version
|
||||||
of logistic regression, which we introduce in Chapter~\ref{Ch6:varselect}. This can
|
of logistic regression, which we introduce in Chapter 6. This can
|
||||||
be modified by appropriately setting the argument `C` below. Its default
|
be modified by appropriately setting the argument `C` below. Its default
|
||||||
value is 1 but by setting it to a very large number, the algorithm converges to the same solution as the usual (unregularized)
|
value is 1 but by setting it to a very large number, the algorithm converges to the same solution as the usual (unregularized)
|
||||||
logistic regression estimator discussed above.
|
logistic regression estimator discussed above.
|
||||||
@@ -935,7 +935,7 @@ confusion_table(logit_labels, y_test)
|
|||||||
|
|
||||||
```
|
```
|
||||||
## Linear and Poisson Regression on the Bikeshare Data
|
## Linear and Poisson Regression on the Bikeshare Data
|
||||||
Here we fit linear and Poisson regression models to the `Bikeshare` data, as described in Section~\ref{Ch4:sec:pois}.
|
Here we fit linear and Poisson regression models to the `Bikeshare` data, as described in Section 4.6.
|
||||||
The response `bikers` measures the number of bike rentals per hour
|
The response `bikers` measures the number of bike rentals per hour
|
||||||
in Washington, DC in the period 2010--2012.
|
in Washington, DC in the period 2010--2012.
|
||||||
|
|
||||||
@@ -976,7 +976,7 @@ variables constant, there are on average about 7 more riders in
|
|||||||
February than in January. Similarly there are about 16.5 more riders
|
February than in January. Similarly there are about 16.5 more riders
|
||||||
in March than in January.
|
in March than in January.
|
||||||
|
|
||||||
The results seen in Section~\ref{sec:bikeshare.linear}
|
The results seen in Section 4.6.1
|
||||||
used a slightly different coding of the variables `hr` and `mnth`, as follows:
|
used a slightly different coding of the variables `hr` and `mnth`, as follows:
|
||||||
|
|
||||||
```{python}
|
```{python}
|
||||||
@@ -1030,7 +1030,7 @@ np.allclose(M_lm.fittedvalues, M2_lm.fittedvalues)
|
|||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
To reproduce the left-hand side of Figure~\ref{Ch4:bikeshare}
|
To reproduce the left-hand side of Figure 4.13
|
||||||
we must first obtain the coefficient estimates associated with
|
we must first obtain the coefficient estimates associated with
|
||||||
`mnth`. The coefficients for January through November can be obtained
|
`mnth`. The coefficients for January through November can be obtained
|
||||||
directly from the `M2_lm` object. The coefficient for December
|
directly from the `M2_lm` object. The coefficient for December
|
||||||
@@ -1070,7 +1070,7 @@ ax_month.set_ylabel('Coefficient', fontsize=20);
|
|||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Reproducing the right-hand plot in Figure~\ref{Ch4:bikeshare} follows a similar process.
|
Reproducing the right-hand plot in Figure 4.13 follows a similar process.
|
||||||
|
|
||||||
```{python}
|
```{python}
|
||||||
coef_hr = S2[S2.index.str.contains('hr')]['coef']
|
coef_hr = S2[S2.index.str.contains('hr')]['coef']
|
||||||
@@ -1105,7 +1105,7 @@ M_pois = sm.GLM(Y, X2, family=sm.families.Poisson()).fit()
|
|||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
We can plot the coefficients associated with `mnth` and `hr`, in order to reproduce Figure~\ref{Ch4:bikeshare.pois}. We first complete these coefficients as before.
|
We can plot the coefficients associated with `mnth` and `hr`, in order to reproduce Figure 4.15. We first complete these coefficients as before.
|
||||||
|
|
||||||
```{python}
|
```{python}
|
||||||
S_pois = summarize(M_pois)
|
S_pois = summarize(M_pois)
|
||||||
|
|||||||
+2640
-357
File diff suppressed because it is too large.
Load diff
+12
-12
@@ -226,7 +226,7 @@ for i, d in enumerate(range(1,6)):
|
|||||||
cv_error
|
cv_error
|
||||||
|
|
||||||
```
|
```
|
||||||
As in Figure~\ref{Ch5:cvplot}, we see a sharp drop in the estimated test MSE between the linear and
|
As in Figure 5.4, we see a sharp drop in the estimated test MSE between the linear and
|
||||||
quadratic fits, but then no clear improvement from using higher-degree polynomials.
|
quadratic fits, but then no clear improvement from using higher-degree polynomials.
|
||||||
|
|
||||||
Above we introduced the `outer()` method of the `np.power()`
|
Above we introduced the `outer()` method of the `np.power()`
|
||||||
@@ -267,7 +267,7 @@ cv_error
|
|||||||
Notice that the computation time is much shorter than that of LOOCV.
|
Notice that the computation time is much shorter than that of LOOCV.
|
||||||
(In principle, the computation time for LOOCV for a least squares
|
(In principle, the computation time for LOOCV for a least squares
|
||||||
linear model should be faster than for $k$-fold CV, due to the
|
linear model should be faster than for $k$-fold CV, due to the
|
||||||
availability of the formula~(\ref{Ch5:eq:LOOCVform}) for LOOCV;
|
availability of the formula~(5.2) for LOOCV;
|
||||||
however, the generic `cross_validate()` function does not make
|
however, the generic `cross_validate()` function does not make
|
||||||
use of this formula.) We still see little evidence that using cubic
|
use of this formula.) We still see little evidence that using cubic
|
||||||
or higher-degree polynomial terms leads to a lower test error than simply
|
or higher-degree polynomial terms leads to a lower test error than simply
|
||||||
@@ -314,7 +314,7 @@ incurred by picking different random folds.
|
|||||||
|
|
||||||
## The Bootstrap
|
## The Bootstrap
|
||||||
We illustrate the use of the bootstrap in the simple example
|
We illustrate the use of the bootstrap in the simple example
|
||||||
{of Section~\ref{Ch5:sec:bootstrap},} as well as on an example involving
|
{of Section 5.2,} as well as on an example involving
|
||||||
estimating the accuracy of the linear regression model on the `Auto`
|
estimating the accuracy of the linear regression model on the `Auto`
|
||||||
data set.
|
data set.
|
||||||
### Estimating the Accuracy of a Statistic of Interest
|
### Estimating the Accuracy of a Statistic of Interest
|
||||||
@@ -329,8 +329,8 @@ in a dataframe.
|
|||||||
To illustrate the bootstrap, we
|
To illustrate the bootstrap, we
|
||||||
start with a simple example.
|
start with a simple example.
|
||||||
The `Portfolio` data set in the `ISLP` package is described
|
The `Portfolio` data set in the `ISLP` package is described
|
||||||
in Section~\ref{Ch5:sec:bootstrap}. The goal is to estimate the
|
in Section 5.2. The goal is to estimate the
|
||||||
sampling variance of the parameter $\alpha$ given in formula~(\ref{Ch5:min.var}). We will
|
sampling variance of the parameter $\alpha$ given in formula~(5.7). We will
|
||||||
create a function
|
create a function
|
||||||
`alpha_func()`, which takes as input a dataframe `D` assumed
|
`alpha_func()`, which takes as input a dataframe `D` assumed
|
||||||
to have columns `X` and `Y`, as well as a
|
to have columns `X` and `Y`, as well as a
|
||||||
@@ -349,7 +349,7 @@ def alpha_func(D, idx):
|
|||||||
```
|
```
|
||||||
This function returns an estimate for $\alpha$
|
This function returns an estimate for $\alpha$
|
||||||
based on applying the minimum
|
based on applying the minimum
|
||||||
variance formula (\ref{Ch5:min.var}) to the observations indexed by
|
variance formula (5.7) to the observations indexed by
|
||||||
the argument `idx`. For instance, the following command
|
the argument `idx`. For instance, the following command
|
||||||
estimates $\alpha$ using all 100 observations.
|
estimates $\alpha$ using all 100 observations.
|
||||||
|
|
||||||
@@ -419,7 +419,7 @@ intercept and slope terms for the linear regression model that uses
|
|||||||
`horsepower` to predict `mpg` in the `Auto` data set. We
|
`horsepower` to predict `mpg` in the `Auto` data set. We
|
||||||
will compare the estimates obtained using the bootstrap to those
|
will compare the estimates obtained using the bootstrap to those
|
||||||
obtained using the formulas for ${\rm SE}(\hat{\beta}_0)$ and
|
obtained using the formulas for ${\rm SE}(\hat{\beta}_0)$ and
|
||||||
${\rm SE}(\hat{\beta}_1)$ described in Section~\ref{Ch3:secoefsec}.
|
${\rm SE}(\hat{\beta}_1)$ described in Section 3.1.2.
|
||||||
|
|
||||||
To use our `boot_SE()` function, we must write a function (its
|
To use our `boot_SE()` function, we must write a function (its
|
||||||
first argument)
|
first argument)
|
||||||
@@ -488,7 +488,7 @@ This indicates that the bootstrap estimate for ${\rm SE}(\hat{\beta}_0)$ is
|
|||||||
0.85, and that the bootstrap
|
0.85, and that the bootstrap
|
||||||
estimate for ${\rm SE}(\hat{\beta}_1)$ is
|
estimate for ${\rm SE}(\hat{\beta}_1)$ is
|
||||||
0.0074. As discussed in
|
0.0074. As discussed in
|
||||||
Section~\ref{Ch3:secoefsec}, standard formulas can be used to compute
|
Section 3.1.2, standard formulas can be used to compute
|
||||||
the standard errors for the regression coefficients in a linear
|
the standard errors for the regression coefficients in a linear
|
||||||
model. These can be obtained using the `summarize()` function
|
model. These can be obtained using the `summarize()` function
|
||||||
from `ISLP.sm`.
|
from `ISLP.sm`.
|
||||||
@@ -502,7 +502,7 @@ model_se
|
|||||||
|
|
||||||
|
|
||||||
The standard error estimates for $\hat{\beta}_0$ and $\hat{\beta}_1$
|
The standard error estimates for $\hat{\beta}_0$ and $\hat{\beta}_1$
|
||||||
obtained using the formulas from Section~\ref{Ch3:secoefsec} are
|
obtained using the formulas from Section 3.1.2 are
|
||||||
0.717 for the
|
0.717 for the
|
||||||
intercept and
|
intercept and
|
||||||
0.006 for the
|
0.006 for the
|
||||||
@@ -510,13 +510,13 @@ slope. Interestingly, these are somewhat different from the estimates
|
|||||||
obtained using the bootstrap. Does this indicate a problem with the
|
obtained using the bootstrap. Does this indicate a problem with the
|
||||||
bootstrap? In fact, it suggests the opposite. Recall that the
|
bootstrap? In fact, it suggests the opposite. Recall that the
|
||||||
standard formulas given in
|
standard formulas given in
|
||||||
{Equation~\ref{Ch3:se.eqn} on page~\pageref{Ch3:se.eqn}}
|
Equation 3.8 on page 75
|
||||||
rely on certain assumptions. For example,
|
rely on certain assumptions. For example,
|
||||||
they depend on the unknown parameter $\sigma^2$, the noise
|
they depend on the unknown parameter $\sigma^2$, the noise
|
||||||
variance. We then estimate $\sigma^2$ using the RSS. Now although the
|
variance. We then estimate $\sigma^2$ using the RSS. Now although the
|
||||||
formulas for the standard errors do not rely on the linear model being
|
formulas for the standard errors do not rely on the linear model being
|
||||||
correct, the estimate for $\sigma^2$ does. We see
|
correct, the estimate for $\sigma^2$ does. We see
|
||||||
{in Figure~\ref{Ch3:polyplot} on page~\pageref{Ch3:polyplot}} that there is
|
in Figure 3.8 on page 99 that there is
|
||||||
a non-linear relationship in the data, and so the residuals from a
|
a non-linear relationship in the data, and so the residuals from a
|
||||||
linear fit will be inflated, and so will $\hat{\sigma}^2$. Secondly,
|
linear fit will be inflated, and so will $\hat{\sigma}^2$. Secondly,
|
||||||
the standard formulas assume (somewhat unrealistically) that the $x_i$
|
the standard formulas assume (somewhat unrealistically) that the $x_i$
|
||||||
@@ -529,7 +529,7 @@ the results from `sm.OLS`.
|
|||||||
Below we compute the bootstrap standard error estimates and the
|
Below we compute the bootstrap standard error estimates and the
|
||||||
standard linear regression estimates that result from fitting the
|
standard linear regression estimates that result from fitting the
|
||||||
quadratic model to the data. Since this model provides a good fit to
|
quadratic model to the data. Since this model provides a good fit to
|
||||||
the data (Figure~\ref{Ch3:polyplot}), there is now a better
|
the data (Figure 3.8), there is now a better
|
||||||
correspondence between the bootstrap estimates and the standard
|
correspondence between the bootstrap estimates and the standard
|
||||||
estimates of ${\rm SE}(\hat{\beta}_0)$, ${\rm SE}(\hat{\beta}_1)$ and
|
estimates of ${\rm SE}(\hat{\beta}_0)$, ${\rm SE}(\hat{\beta}_1)$ and
|
||||||
${\rm SE}(\hat{\beta}_2)$.
|
${\rm SE}(\hat{\beta}_2)$.
|
||||||
|
|||||||
+128
-128
@@ -5,6 +5,7 @@
|
|||||||
"id": "6dde3cef",
|
"id": "6dde3cef",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"source": [
|
"source": [
|
||||||
|
"\n",
|
||||||
"# 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.1/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",
|
||||||
@@ -32,10 +33,10 @@
|
|||||||
"id": "f1deb5cc",
|
"id": "f1deb5cc",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:39:38.213402Z",
|
"iopub.execute_input": "2026-02-05T00:47:05.730449Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:39:38.212455Z",
|
"iopub.status.busy": "2026-02-05T00:47:05.730329Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:39:39.121524Z",
|
"iopub.status.idle": "2026-02-05T00:47:06.513542Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:39:39.121125Z"
|
"shell.execute_reply": "2026-02-05T00:47:06.513033Z"
|
||||||
},
|
},
|
||||||
"lines_to_next_cell": 2
|
"lines_to_next_cell": 2
|
||||||
},
|
},
|
||||||
@@ -64,10 +65,10 @@
|
|||||||
"id": "268c41b3",
|
"id": "268c41b3",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:39:39.123447Z",
|
"iopub.execute_input": "2026-02-05T00:47:06.515215Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:39:39.123256Z",
|
"iopub.status.busy": "2026-02-05T00:47:06.515043Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:39:39.125378Z",
|
"iopub.status.idle": "2026-02-05T00:47:06.517293Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:39:39.125152Z"
|
"shell.execute_reply": "2026-02-05T00:47:06.516837Z"
|
||||||
},
|
},
|
||||||
"lines_to_next_cell": 2
|
"lines_to_next_cell": 2
|
||||||
},
|
},
|
||||||
@@ -108,10 +109,10 @@
|
|||||||
"id": "22f44ae0",
|
"id": "22f44ae0",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:39:39.126552Z",
|
"iopub.execute_input": "2026-02-05T00:47:06.518601Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:39:39.126448Z",
|
"iopub.status.busy": "2026-02-05T00:47:06.518485Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:39:39.136455Z",
|
"iopub.status.idle": "2026-02-05T00:47:06.524299Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:39:39.135968Z"
|
"shell.execute_reply": "2026-02-05T00:47:06.523724Z"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
@@ -136,10 +137,10 @@
|
|||||||
"id": "0c32e917",
|
"id": "0c32e917",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:39:39.138496Z",
|
"iopub.execute_input": "2026-02-05T00:47:06.525648Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:39:39.138360Z",
|
"iopub.status.busy": "2026-02-05T00:47:06.525549Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:39:39.144210Z",
|
"iopub.status.idle": "2026-02-05T00:47:06.531033Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:39:39.143911Z"
|
"shell.execute_reply": "2026-02-05T00:47:06.530633Z"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
@@ -166,17 +167,17 @@
|
|||||||
"id": "86ce4f85",
|
"id": "86ce4f85",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:39:39.145874Z",
|
"iopub.execute_input": "2026-02-05T00:47:06.532517Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:39:39.145769Z",
|
"iopub.status.busy": "2026-02-05T00:47:06.532422Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:39:39.150170Z",
|
"iopub.status.idle": "2026-02-05T00:47:06.537369Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:39:39.149908Z"
|
"shell.execute_reply": "2026-02-05T00:47:06.536814Z"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"outputs": [
|
"outputs": [
|
||||||
{
|
{
|
||||||
"data": {
|
"data": {
|
||||||
"text/plain": [
|
"text/plain": [
|
||||||
"23.61661706966988"
|
"np.float64(23.616617069669893)"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"execution_count": 5,
|
"execution_count": 5,
|
||||||
@@ -210,10 +211,10 @@
|
|||||||
"id": "50a66a97",
|
"id": "50a66a97",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:39:39.151449Z",
|
"iopub.execute_input": "2026-02-05T00:47:06.538690Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:39:39.151374Z",
|
"iopub.status.busy": "2026-02-05T00:47:06.538577Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:39:39.153368Z",
|
"iopub.status.idle": "2026-02-05T00:47:06.540965Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:39:39.153165Z"
|
"shell.execute_reply": "2026-02-05T00:47:06.540491Z"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
@@ -253,10 +254,10 @@
|
|||||||
"id": "d49b6999",
|
"id": "d49b6999",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:39:39.154485Z",
|
"iopub.execute_input": "2026-02-05T00:47:06.542270Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:39:39.154414Z",
|
"iopub.status.busy": "2026-02-05T00:47:06.542165Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:39:39.167468Z",
|
"iopub.status.idle": "2026-02-05T00:47:06.560011Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:39:39.167243Z"
|
"shell.execute_reply": "2026-02-05T00:47:06.559510Z"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"outputs": [
|
"outputs": [
|
||||||
@@ -297,10 +298,10 @@
|
|||||||
"id": "dac8bd54",
|
"id": "dac8bd54",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:39:39.168726Z",
|
"iopub.execute_input": "2026-02-05T00:47:06.561313Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:39:39.168651Z",
|
"iopub.status.busy": "2026-02-05T00:47:06.561212Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:39:39.182426Z",
|
"iopub.status.idle": "2026-02-05T00:47:06.579372Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:39:39.182175Z"
|
"shell.execute_reply": "2026-02-05T00:47:06.578863Z"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"outputs": [
|
"outputs": [
|
||||||
@@ -380,10 +381,10 @@
|
|||||||
"id": "601ae443",
|
"id": "601ae443",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:39:39.184522Z",
|
"iopub.execute_input": "2026-02-05T00:47:06.580908Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:39:39.184425Z",
|
"iopub.status.busy": "2026-02-05T00:47:06.580793Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:39:40.007057Z",
|
"iopub.status.idle": "2026-02-05T00:47:07.783382Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:39:40.006826Z"
|
"shell.execute_reply": "2026-02-05T00:47:07.782912Z"
|
||||||
},
|
},
|
||||||
"lines_to_next_cell": 0
|
"lines_to_next_cell": 0
|
||||||
},
|
},
|
||||||
@@ -391,7 +392,7 @@
|
|||||||
{
|
{
|
||||||
"data": {
|
"data": {
|
||||||
"text/plain": [
|
"text/plain": [
|
||||||
"24.23151351792924"
|
"np.float64(24.231513517929226)"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"execution_count": 9,
|
"execution_count": 9,
|
||||||
@@ -448,10 +449,10 @@
|
|||||||
"id": "11226c85",
|
"id": "11226c85",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:39:40.008355Z",
|
"iopub.execute_input": "2026-02-05T00:47:07.785034Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:39:40.008281Z",
|
"iopub.status.busy": "2026-02-05T00:47:07.784918Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:39:40.469400Z",
|
"iopub.status.idle": "2026-02-05T00:47:08.636881Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:39:40.469130Z"
|
"shell.execute_reply": "2026-02-05T00:47:08.636274Z"
|
||||||
},
|
},
|
||||||
"lines_to_next_cell": 0
|
"lines_to_next_cell": 0
|
||||||
},
|
},
|
||||||
@@ -459,7 +460,7 @@
|
|||||||
{
|
{
|
||||||
"data": {
|
"data": {
|
||||||
"text/plain": [
|
"text/plain": [
|
||||||
"array([24.23151352, 19.24821312, 19.33498406, 19.42443033, 19.03323827])"
|
"array([24.23151352, 19.24821312, 19.33498406, 19.4244303 , 19.03321527])"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"execution_count": 10,
|
"execution_count": 10,
|
||||||
@@ -486,7 +487,7 @@
|
|||||||
"id": "a3a920ae",
|
"id": "a3a920ae",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"source": [
|
"source": [
|
||||||
"As in Figure~\\ref{Ch5:cvplot}, we see a sharp drop in the estimated test MSE between the linear and\n",
|
"As in Figure 5.4, we see a sharp drop in the estimated test MSE between the linear and\n",
|
||||||
"quadratic fits, but then no clear improvement from using higher-degree polynomials.\n",
|
"quadratic fits, but then no clear improvement from using higher-degree polynomials.\n",
|
||||||
"\n",
|
"\n",
|
||||||
"Above we introduced the `outer()` method of the `np.power()`\n",
|
"Above we introduced the `outer()` method of the `np.power()`\n",
|
||||||
@@ -505,10 +506,10 @@
|
|||||||
"id": "64b64d97",
|
"id": "64b64d97",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:39:40.470650Z",
|
"iopub.execute_input": "2026-02-05T00:47:08.638904Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:39:40.470570Z",
|
"iopub.status.busy": "2026-02-05T00:47:08.638760Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:39:40.472721Z",
|
"iopub.status.idle": "2026-02-05T00:47:08.641760Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:39:40.472520Z"
|
"shell.execute_reply": "2026-02-05T00:47:08.641094Z"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"outputs": [
|
"outputs": [
|
||||||
@@ -547,10 +548,10 @@
|
|||||||
"id": "ca0f972f",
|
"id": "ca0f972f",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:39:40.473794Z",
|
"iopub.execute_input": "2026-02-05T00:47:08.643305Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:39:40.473725Z",
|
"iopub.status.busy": "2026-02-05T00:47:08.643162Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:39:40.491806Z",
|
"iopub.status.idle": "2026-02-05T00:47:08.675141Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:39:40.491547Z"
|
"shell.execute_reply": "2026-02-05T00:47:08.674740Z"
|
||||||
},
|
},
|
||||||
"lines_to_next_cell": 0
|
"lines_to_next_cell": 0
|
||||||
},
|
},
|
||||||
@@ -558,7 +559,7 @@
|
|||||||
{
|
{
|
||||||
"data": {
|
"data": {
|
||||||
"text/plain": [
|
"text/plain": [
|
||||||
"array([24.20766449, 19.18533142, 19.27626666, 19.47848403, 19.13720581])"
|
"array([24.20766449, 19.18533142, 19.27626666, 19.47848402, 19.13718373])"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"execution_count": 12,
|
"execution_count": 12,
|
||||||
@@ -589,7 +590,7 @@
|
|||||||
"Notice that the computation time is much shorter than that of LOOCV.\n",
|
"Notice that the computation time is much shorter than that of LOOCV.\n",
|
||||||
"(In principle, the computation time for LOOCV for a least squares\n",
|
"(In principle, the computation time for LOOCV for a least squares\n",
|
||||||
"linear model should be faster than for $k$-fold CV, due to the\n",
|
"linear model should be faster than for $k$-fold CV, due to the\n",
|
||||||
"availability of the formula~(\\ref{Ch5:eq:LOOCVform}) for LOOCV;\n",
|
"availability of the formula~(5.2) for LOOCV;\n",
|
||||||
"however, the generic `cross_validate()` function does not make\n",
|
"however, the generic `cross_validate()` function does not make\n",
|
||||||
"use of this formula.) We still see little evidence that using cubic\n",
|
"use of this formula.) We still see little evidence that using cubic\n",
|
||||||
"or higher-degree polynomial terms leads to a lower test error than simply\n",
|
"or higher-degree polynomial terms leads to a lower test error than simply\n",
|
||||||
@@ -613,10 +614,10 @@
|
|||||||
"id": "080cdb29",
|
"id": "080cdb29",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:39:40.493215Z",
|
"iopub.execute_input": "2026-02-05T00:47:08.677151Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:39:40.493138Z",
|
"iopub.status.busy": "2026-02-05T00:47:08.676983Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:39:40.498978Z",
|
"iopub.status.idle": "2026-02-05T00:47:08.685777Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:39:40.498768Z"
|
"shell.execute_reply": "2026-02-05T00:47:08.685174Z"
|
||||||
},
|
},
|
||||||
"lines_to_next_cell": 2
|
"lines_to_next_cell": 2
|
||||||
},
|
},
|
||||||
@@ -657,17 +658,17 @@
|
|||||||
"id": "7c46de2b",
|
"id": "7c46de2b",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:39:40.500169Z",
|
"iopub.execute_input": "2026-02-05T00:47:08.687387Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:39:40.500100Z",
|
"iopub.status.busy": "2026-02-05T00:47:08.687268Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:39:40.525494Z",
|
"iopub.status.idle": "2026-02-05T00:47:08.726376Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:39:40.525258Z"
|
"shell.execute_reply": "2026-02-05T00:47:08.725862Z"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"outputs": [
|
"outputs": [
|
||||||
{
|
{
|
||||||
"data": {
|
"data": {
|
||||||
"text/plain": [
|
"text/plain": [
|
||||||
"(23.802232661034168, 1.421845094109185)"
|
"(np.float64(23.802232661034168), np.float64(1.4218450941091916))"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"execution_count": 14,
|
"execution_count": 14,
|
||||||
@@ -699,7 +700,7 @@
|
|||||||
"\n",
|
"\n",
|
||||||
"## The Bootstrap\n",
|
"## The Bootstrap\n",
|
||||||
"We illustrate the use of the bootstrap in the simple example\n",
|
"We illustrate the use of the bootstrap in the simple example\n",
|
||||||
" {of Section~\\ref{Ch5:sec:bootstrap},} as well as on an example involving\n",
|
" {of Section 5.2,} as well as on an example involving\n",
|
||||||
"estimating the accuracy of the linear regression model on the `Auto`\n",
|
"estimating the accuracy of the linear regression model on the `Auto`\n",
|
||||||
"data set.\n",
|
"data set.\n",
|
||||||
"### Estimating the Accuracy of a Statistic of Interest\n",
|
"### Estimating the Accuracy of a Statistic of Interest\n",
|
||||||
@@ -714,8 +715,8 @@
|
|||||||
"To illustrate the bootstrap, we\n",
|
"To illustrate the bootstrap, we\n",
|
||||||
"start with a simple example.\n",
|
"start with a simple example.\n",
|
||||||
"The `Portfolio` data set in the `ISLP` package is described\n",
|
"The `Portfolio` data set in the `ISLP` package is described\n",
|
||||||
"in Section~\\ref{Ch5:sec:bootstrap}. The goal is to estimate the\n",
|
"in Section 5.2. The goal is to estimate the\n",
|
||||||
"sampling variance of the parameter $\\alpha$ given in formula~(\\ref{Ch5:min.var}). We will\n",
|
"sampling variance of the parameter $\\alpha$ given in formula~(5.7). We will\n",
|
||||||
"create a function\n",
|
"create a function\n",
|
||||||
"`alpha_func()`, which takes as input a dataframe `D` assumed\n",
|
"`alpha_func()`, which takes as input a dataframe `D` assumed\n",
|
||||||
"to have columns `X` and `Y`, as well as a\n",
|
"to have columns `X` and `Y`, as well as a\n",
|
||||||
@@ -731,10 +732,10 @@
|
|||||||
"id": "a4b6d9b3",
|
"id": "a4b6d9b3",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:39:40.526599Z",
|
"iopub.execute_input": "2026-02-05T00:47:08.727991Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:39:40.526530Z",
|
"iopub.status.busy": "2026-02-05T00:47:08.727860Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:39:40.529182Z",
|
"iopub.status.idle": "2026-02-05T00:47:08.731089Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:39:40.528979Z"
|
"shell.execute_reply": "2026-02-05T00:47:08.730582Z"
|
||||||
},
|
},
|
||||||
"lines_to_next_cell": 0
|
"lines_to_next_cell": 0
|
||||||
},
|
},
|
||||||
@@ -754,7 +755,7 @@
|
|||||||
"source": [
|
"source": [
|
||||||
"This function returns an estimate for $\\alpha$\n",
|
"This function returns an estimate for $\\alpha$\n",
|
||||||
"based on applying the minimum\n",
|
"based on applying the minimum\n",
|
||||||
" variance formula (\\ref{Ch5:min.var}) to the observations indexed by\n",
|
" variance formula (5.7) to the observations indexed by\n",
|
||||||
"the argument `idx`. For instance, the following command\n",
|
"the argument `idx`. For instance, the following command\n",
|
||||||
"estimates $\\alpha$ using all 100 observations."
|
"estimates $\\alpha$ using all 100 observations."
|
||||||
]
|
]
|
||||||
@@ -765,17 +766,17 @@
|
|||||||
"id": "81498a11",
|
"id": "81498a11",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:39:40.530362Z",
|
"iopub.execute_input": "2026-02-05T00:47:08.732467Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:39:40.530277Z",
|
"iopub.status.busy": "2026-02-05T00:47:08.732368Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:39:40.532680Z",
|
"iopub.status.idle": "2026-02-05T00:47:08.735439Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:39:40.532462Z"
|
"shell.execute_reply": "2026-02-05T00:47:08.734958Z"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"outputs": [
|
"outputs": [
|
||||||
{
|
{
|
||||||
"data": {
|
"data": {
|
||||||
"text/plain": [
|
"text/plain": [
|
||||||
"0.57583207459283"
|
"np.float64(0.57583207459283)"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"execution_count": 16,
|
"execution_count": 16,
|
||||||
@@ -804,10 +805,10 @@
|
|||||||
"id": "64fe1cb6",
|
"id": "64fe1cb6",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:39:40.533876Z",
|
"iopub.execute_input": "2026-02-05T00:47:08.736816Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:39:40.533810Z",
|
"iopub.status.busy": "2026-02-05T00:47:08.736715Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:39:40.536977Z",
|
"iopub.status.idle": "2026-02-05T00:47:08.739777Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:39:40.536767Z"
|
"shell.execute_reply": "2026-02-05T00:47:08.739384Z"
|
||||||
},
|
},
|
||||||
"lines_to_next_cell": 2
|
"lines_to_next_cell": 2
|
||||||
},
|
},
|
||||||
@@ -815,7 +816,7 @@
|
|||||||
{
|
{
|
||||||
"data": {
|
"data": {
|
||||||
"text/plain": [
|
"text/plain": [
|
||||||
"0.6074452469619004"
|
"np.float64(0.6074452469619002)"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"execution_count": 17,
|
"execution_count": 17,
|
||||||
@@ -847,10 +848,10 @@
|
|||||||
"id": "dd16bbae",
|
"id": "dd16bbae",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:39:40.538089Z",
|
"iopub.execute_input": "2026-02-05T00:47:08.741328Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:39:40.538010Z",
|
"iopub.status.busy": "2026-02-05T00:47:08.741207Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:39:40.540142Z",
|
"iopub.status.idle": "2026-02-05T00:47:08.743628Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:39:40.539916Z"
|
"shell.execute_reply": "2026-02-05T00:47:08.743222Z"
|
||||||
},
|
},
|
||||||
"lines_to_next_cell": 0
|
"lines_to_next_cell": 0
|
||||||
},
|
},
|
||||||
@@ -892,17 +893,17 @@
|
|||||||
"id": "b42b4585",
|
"id": "b42b4585",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:39:40.541333Z",
|
"iopub.execute_input": "2026-02-05T00:47:08.744970Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:39:40.541248Z",
|
"iopub.status.busy": "2026-02-05T00:47:08.744866Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:39:40.761713Z",
|
"iopub.status.idle": "2026-02-05T00:47:09.034568Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:39:40.761472Z"
|
"shell.execute_reply": "2026-02-05T00:47:09.034067Z"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"outputs": [
|
"outputs": [
|
||||||
{
|
{
|
||||||
"data": {
|
"data": {
|
||||||
"text/plain": [
|
"text/plain": [
|
||||||
"0.09118176521277699"
|
"np.float64(0.09118176521277699)"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"execution_count": 19,
|
"execution_count": 19,
|
||||||
@@ -934,7 +935,7 @@
|
|||||||
"`horsepower` to predict `mpg` in the `Auto` data set. We\n",
|
"`horsepower` to predict `mpg` in the `Auto` data set. We\n",
|
||||||
"will compare the estimates obtained using the bootstrap to those\n",
|
"will compare the estimates obtained using the bootstrap to those\n",
|
||||||
"obtained using the formulas for ${\\rm SE}(\\hat{\\beta}_0)$ and\n",
|
"obtained using the formulas for ${\\rm SE}(\\hat{\\beta}_0)$ and\n",
|
||||||
"${\\rm SE}(\\hat{\\beta}_1)$ described in Section~\\ref{Ch3:secoefsec}.\n",
|
"${\\rm SE}(\\hat{\\beta}_1)$ described in Section 3.1.2.\n",
|
||||||
"\n",
|
"\n",
|
||||||
"To use our `boot_SE()` function, we must write a function (its\n",
|
"To use our `boot_SE()` function, we must write a function (its\n",
|
||||||
"first argument)\n",
|
"first argument)\n",
|
||||||
@@ -958,10 +959,10 @@
|
|||||||
"id": "6bc11784",
|
"id": "6bc11784",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:39:40.762911Z",
|
"iopub.execute_input": "2026-02-05T00:47:09.036186Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:39:40.762837Z",
|
"iopub.status.busy": "2026-02-05T00:47:09.036064Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:39:40.764597Z",
|
"iopub.status.idle": "2026-02-05T00:47:09.038120Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:39:40.764401Z"
|
"shell.execute_reply": "2026-02-05T00:47:09.037695Z"
|
||||||
},
|
},
|
||||||
"lines_to_next_cell": 0
|
"lines_to_next_cell": 0
|
||||||
},
|
},
|
||||||
@@ -993,10 +994,10 @@
|
|||||||
"id": "740cd50c",
|
"id": "740cd50c",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:39:40.765800Z",
|
"iopub.execute_input": "2026-02-05T00:47:09.039473Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:39:40.765734Z",
|
"iopub.status.busy": "2026-02-05T00:47:09.039363Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:39:40.767191Z",
|
"iopub.status.idle": "2026-02-05T00:47:09.041198Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:39:40.766986Z"
|
"shell.execute_reply": "2026-02-05T00:47:09.040802Z"
|
||||||
},
|
},
|
||||||
"lines_to_next_cell": 0
|
"lines_to_next_cell": 0
|
||||||
},
|
},
|
||||||
@@ -1026,10 +1027,10 @@
|
|||||||
"id": "ffb3ec50",
|
"id": "ffb3ec50",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:39:40.768266Z",
|
"iopub.execute_input": "2026-02-05T00:47:09.042630Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:39:40.768204Z",
|
"iopub.status.busy": "2026-02-05T00:47:09.042520Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:39:40.789931Z",
|
"iopub.status.idle": "2026-02-05T00:47:09.074556Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:39:40.789705Z"
|
"shell.execute_reply": "2026-02-05T00:47:09.074079Z"
|
||||||
},
|
},
|
||||||
"lines_to_next_cell": 0
|
"lines_to_next_cell": 0
|
||||||
},
|
},
|
||||||
@@ -1077,10 +1078,10 @@
|
|||||||
"id": "7d561f70",
|
"id": "7d561f70",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:39:40.791196Z",
|
"iopub.execute_input": "2026-02-05T00:47:09.076044Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:39:40.791129Z",
|
"iopub.status.busy": "2026-02-05T00:47:09.075921Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:39:42.690473Z",
|
"iopub.status.idle": "2026-02-05T00:47:11.975218Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:39:42.690189Z"
|
"shell.execute_reply": "2026-02-05T00:47:11.974653Z"
|
||||||
},
|
},
|
||||||
"lines_to_next_cell": 2
|
"lines_to_next_cell": 2
|
||||||
},
|
},
|
||||||
@@ -1115,7 +1116,7 @@
|
|||||||
"0.85, and that the bootstrap\n",
|
"0.85, and that the bootstrap\n",
|
||||||
"estimate for ${\\rm SE}(\\hat{\\beta}_1)$ is\n",
|
"estimate for ${\\rm SE}(\\hat{\\beta}_1)$ is\n",
|
||||||
"0.0074. As discussed in\n",
|
"0.0074. As discussed in\n",
|
||||||
"Section~\\ref{Ch3:secoefsec}, standard formulas can be used to compute\n",
|
"Section 3.1.2, standard formulas can be used to compute\n",
|
||||||
"the standard errors for the regression coefficients in a linear\n",
|
"the standard errors for the regression coefficients in a linear\n",
|
||||||
"model. These can be obtained using the `summarize()` function\n",
|
"model. These can be obtained using the `summarize()` function\n",
|
||||||
"from `ISLP.sm`."
|
"from `ISLP.sm`."
|
||||||
@@ -1127,10 +1128,10 @@
|
|||||||
"id": "3888aa0a",
|
"id": "3888aa0a",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:39:42.692058Z",
|
"iopub.execute_input": "2026-02-05T00:47:11.976651Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:39:42.691967Z",
|
"iopub.status.busy": "2026-02-05T00:47:11.976530Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:39:42.737592Z",
|
"iopub.status.idle": "2026-02-05T00:47:11.995335Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:39:42.737346Z"
|
"shell.execute_reply": "2026-02-05T00:47:11.994822Z"
|
||||||
},
|
},
|
||||||
"lines_to_next_cell": 2
|
"lines_to_next_cell": 2
|
||||||
},
|
},
|
||||||
@@ -1160,7 +1161,7 @@
|
|||||||
"metadata": {},
|
"metadata": {},
|
||||||
"source": [
|
"source": [
|
||||||
"The standard error estimates for $\\hat{\\beta}_0$ and $\\hat{\\beta}_1$\n",
|
"The standard error estimates for $\\hat{\\beta}_0$ and $\\hat{\\beta}_1$\n",
|
||||||
"obtained using the formulas from Section~\\ref{Ch3:secoefsec} are\n",
|
"obtained using the formulas from Section 3.1.2 are\n",
|
||||||
"0.717 for the\n",
|
"0.717 for the\n",
|
||||||
"intercept and\n",
|
"intercept and\n",
|
||||||
"0.006 for the\n",
|
"0.006 for the\n",
|
||||||
@@ -1168,13 +1169,13 @@
|
|||||||
"obtained using the bootstrap. Does this indicate a problem with the\n",
|
"obtained using the bootstrap. Does this indicate a problem with the\n",
|
||||||
"bootstrap? In fact, it suggests the opposite. Recall that the\n",
|
"bootstrap? In fact, it suggests the opposite. Recall that the\n",
|
||||||
"standard formulas given in\n",
|
"standard formulas given in\n",
|
||||||
" {Equation~\\ref{Ch3:se.eqn} on page~\\pageref{Ch3:se.eqn}}\n",
|
"Equation 3.8 on page 75\n",
|
||||||
"rely on certain assumptions. For example,\n",
|
"rely on certain assumptions. For example,\n",
|
||||||
"they depend on the unknown parameter $\\sigma^2$, the noise\n",
|
"they depend on the unknown parameter $\\sigma^2$, the noise\n",
|
||||||
"variance. We then estimate $\\sigma^2$ using the RSS. Now although the\n",
|
"variance. We then estimate $\\sigma^2$ using the RSS. Now although the\n",
|
||||||
"formulas for the standard errors do not rely on the linear model being\n",
|
"formulas for the standard errors do not rely on the linear model being\n",
|
||||||
"correct, the estimate for $\\sigma^2$ does. We see\n",
|
"correct, the estimate for $\\sigma^2$ does. We see\n",
|
||||||
" {in Figure~\\ref{Ch3:polyplot} on page~\\pageref{Ch3:polyplot}} that there is\n",
|
"in Figure 3.8 on page 99 that there is\n",
|
||||||
"a non-linear relationship in the data, and so the residuals from a\n",
|
"a non-linear relationship in the data, and so the residuals from a\n",
|
||||||
"linear fit will be inflated, and so will $\\hat{\\sigma}^2$. Secondly,\n",
|
"linear fit will be inflated, and so will $\\hat{\\sigma}^2$. Secondly,\n",
|
||||||
"the standard formulas assume (somewhat unrealistically) that the $x_i$\n",
|
"the standard formulas assume (somewhat unrealistically) that the $x_i$\n",
|
||||||
@@ -1187,7 +1188,7 @@
|
|||||||
"Below we compute the bootstrap standard error estimates and the\n",
|
"Below we compute the bootstrap standard error estimates and the\n",
|
||||||
"standard linear regression estimates that result from fitting the\n",
|
"standard linear regression estimates that result from fitting the\n",
|
||||||
"quadratic model to the data. Since this model provides a good fit to\n",
|
"quadratic model to the data. Since this model provides a good fit to\n",
|
||||||
"the data (Figure~\\ref{Ch3:polyplot}), there is now a better\n",
|
"the data (Figure 3.8), there is now a better\n",
|
||||||
"correspondence between the bootstrap estimates and the standard\n",
|
"correspondence between the bootstrap estimates and the standard\n",
|
||||||
"estimates of ${\\rm SE}(\\hat{\\beta}_0)$, ${\\rm SE}(\\hat{\\beta}_1)$ and\n",
|
"estimates of ${\\rm SE}(\\hat{\\beta}_0)$, ${\\rm SE}(\\hat{\\beta}_1)$ and\n",
|
||||||
"${\\rm SE}(\\hat{\\beta}_2)$."
|
"${\\rm SE}(\\hat{\\beta}_2)$."
|
||||||
@@ -1199,10 +1200,10 @@
|
|||||||
"id": "acc3e32c",
|
"id": "acc3e32c",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:39:42.739037Z",
|
"iopub.execute_input": "2026-02-05T00:47:11.996827Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:39:42.738882Z",
|
"iopub.status.busy": "2026-02-05T00:47:11.996698Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:39:45.405121Z",
|
"iopub.status.idle": "2026-02-05T00:47:16.184970Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:39:45.404784Z"
|
"shell.execute_reply": "2026-02-05T00:47:16.184301Z"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"outputs": [
|
"outputs": [
|
||||||
@@ -1242,10 +1243,10 @@
|
|||||||
"id": "dca5340c",
|
"id": "dca5340c",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:39:45.406403Z",
|
"iopub.execute_input": "2026-02-05T00:47:16.186711Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:39:45.406328Z",
|
"iopub.status.busy": "2026-02-05T00:47:16.186585Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:39:45.416112Z",
|
"iopub.status.idle": "2026-02-05T00:47:16.197450Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:39:45.415874Z"
|
"shell.execute_reply": "2026-02-05T00:47:16.197112Z"
|
||||||
},
|
},
|
||||||
"lines_to_next_cell": 0
|
"lines_to_next_cell": 0
|
||||||
},
|
},
|
||||||
@@ -1272,7 +1273,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "markdown",
|
"cell_type": "markdown",
|
||||||
"id": "e98297be",
|
"id": "d714b6a3",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"source": [
|
"source": [
|
||||||
"\n",
|
"\n",
|
||||||
@@ -1283,8 +1284,7 @@
|
|||||||
"metadata": {
|
"metadata": {
|
||||||
"jupytext": {
|
"jupytext": {
|
||||||
"cell_metadata_filter": "-all",
|
"cell_metadata_filter": "-all",
|
||||||
"formats": "ipynb",
|
"formats": "ipynb"
|
||||||
"main_language": "python"
|
|
||||||
},
|
},
|
||||||
"kernelspec": {
|
"kernelspec": {
|
||||||
"display_name": "Python 3 (ipykernel)",
|
"display_name": "Python 3 (ipykernel)",
|
||||||
@@ -1301,7 +1301,7 @@
|
|||||||
"name": "python",
|
"name": "python",
|
||||||
"nbconvert_exporter": "python",
|
"nbconvert_exporter": "python",
|
||||||
"pygments_lexer": "ipython3",
|
"pygments_lexer": "ipython3",
|
||||||
"version": "3.11.4"
|
"version": "3.12.10"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nbformat": 4,
|
"nbformat": 4,
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ Hitters.shape
|
|||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
We first choose the best model using forward selection based on $C_p$ (\ref{Ch6:eq:cp}). This score
|
We first choose the best model using forward selection based on $C_p$ (6.2). This score
|
||||||
is not built in as a metric to `sklearn`. We therefore define a function to compute it ourselves, and use
|
is not built in as a metric to `sklearn`. We therefore define a function to compute it ourselves, and use
|
||||||
it as a scorer. By default, `sklearn` tries to maximize a score, hence
|
it as a scorer. By default, `sklearn` tries to maximize a score, hence
|
||||||
our scoring function computes the negative $C_p$ statistic.
|
our scoring function computes the negative $C_p$ statistic.
|
||||||
@@ -111,7 +111,7 @@ sigma2 = OLS(Y,X).fit().scale
|
|||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
The function `sklearn_selected()` expects a scorer with just three arguments --- the last three in the definition of `nCp()` above. We use the function `partial()` first seen in Section~\ref{Ch5-resample-lab:the-bootstrap} to freeze the first argument with our estimate of $\sigma^2$.
|
The function `sklearn_selected()` expects a scorer with just three arguments --- the last three in the definition of `nCp()` above. We use the function `partial()` first seen in Section 5.3.3 to freeze the first argument with our estimate of $\sigma^2$.
|
||||||
|
|
||||||
```{python}
|
```{python}
|
||||||
neg_Cp = partial(nCp, sigma2)
|
neg_Cp = partial(nCp, sigma2)
|
||||||
@@ -363,7 +363,7 @@ Since we
|
|||||||
standardize first, in order to find coefficient
|
standardize first, in order to find coefficient
|
||||||
estimates on the original scale, we must *unstandardize*
|
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 (6.5) and (6.7) 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 [23] issue unwarranted convergence warning messages; we suppressed these when we filtered the warnings above.}
|
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.}
|
||||||
|
|
||||||
@@ -540,7 +540,7 @@ grid.best_params_['ridge__alpha']
|
|||||||
grid.best_estimator_
|
grid.best_estimator_
|
||||||
|
|
||||||
```
|
```
|
||||||
Recall we set up the `kfold` object for 5-fold cross-validation on page~\pageref{line:choos-among-models}. We now plot the cross-validated MSE as a function of $-\log(\lambda)$, which has shrinkage decreasing from left
|
Recall we set up the `kfold` object for 5-fold cross-validation on page 271. We now plot the cross-validated MSE as a function of $-\log(\lambda)$, which has shrinkage decreasing from left
|
||||||
to right.
|
to right.
|
||||||
|
|
||||||
```{python}
|
```{python}
|
||||||
@@ -640,7 +640,7 @@ not perform variable selection!
|
|||||||
### Evaluating Test Error of Cross-Validated Ridge
|
### Evaluating Test Error of Cross-Validated Ridge
|
||||||
Choosing $\lambda$ using cross-validation provides a single regression
|
Choosing $\lambda$ using cross-validation provides a single regression
|
||||||
estimator, similar to fitting a linear regression model as we saw in
|
estimator, similar to fitting a linear regression model as we saw in
|
||||||
Chapter~\ref{Ch3:linreg}. It is therefore reasonable to estimate what its test error
|
Chapter 3. It is therefore reasonable to estimate what its test error
|
||||||
is. We run into a problem here in that cross-validation will have
|
is. We run into a problem here in that cross-validation will have
|
||||||
*touched* all of its data in choosing $\lambda$, hence we have no
|
*touched* all of its data in choosing $\lambda$, hence we have no
|
||||||
further data to estimate test error. A compromise is to do an initial
|
further data to estimate test error. A compromise is to do an initial
|
||||||
@@ -728,7 +728,7 @@ ax.set_ylabel('Standardized coefficiients', fontsize=20);
|
|||||||
```
|
```
|
||||||
The smallest cross-validated error is lower than the test set MSE of the null model
|
The smallest cross-validated error is lower than the test set MSE of the null model
|
||||||
and of least squares, and very similar to the test MSE of 115526.71 of ridge
|
and of least squares, and very similar to the test MSE of 115526.71 of ridge
|
||||||
regression (page~\pageref{page:MSECVRidge}) with $\lambda$ chosen by cross-validation.
|
regression (page 278) with $\lambda$ chosen by cross-validation.
|
||||||
|
|
||||||
```{python}
|
```{python}
|
||||||
np.min(tuned_lasso.mse_path_.mean(1))
|
np.min(tuned_lasso.mse_path_.mean(1))
|
||||||
@@ -776,11 +776,11 @@ Principal components regression (PCR) can be performed using
|
|||||||
`PCA()` from the `sklearn.decomposition`
|
`PCA()` from the `sklearn.decomposition`
|
||||||
module. We now apply PCR to the `Hitters` data, in order to
|
module. We now apply PCR to the `Hitters` data, in order to
|
||||||
predict `Salary`. Again, ensure that the missing values have
|
predict `Salary`. Again, ensure that the missing values have
|
||||||
been removed from the data, as described in Section~\ref{Ch6-varselect-lab:lab-1-subset-selection-methods}.
|
been removed from the data, as described in Section 6.5.1.
|
||||||
|
|
||||||
We use `LinearRegression()` to fit the regression model
|
We use `LinearRegression()` to fit the regression model
|
||||||
here. Note that it fits an intercept by default, unlike
|
here. Note that it fits an intercept by default, unlike
|
||||||
the `OLS()` function seen earlier in Section~\ref{Ch6-varselect-lab:lab-1-subset-selection-methods}.
|
the `OLS()` function seen earlier in Section 6.5.1.
|
||||||
|
|
||||||
```{python}
|
```{python}
|
||||||
pca = PCA(n_components=2)
|
pca = PCA(n_components=2)
|
||||||
@@ -864,7 +864,7 @@ cv_null = skm.cross_validate(linreg,
|
|||||||
The `explained_variance_ratio_`
|
The `explained_variance_ratio_`
|
||||||
attribute of our `PCA` object provides the *percentage of variance explained* in the predictors and in the response using
|
attribute of our `PCA` object provides the *percentage of variance explained* in the predictors and in the response using
|
||||||
different numbers of components. This concept is discussed in greater
|
different numbers of components. This concept is discussed in greater
|
||||||
detail in Section~\ref{Ch10:sec:pca}.
|
detail in Section 12.2.
|
||||||
|
|
||||||
```{python}
|
```{python}
|
||||||
pipe.named_steps['pca'].explained_variance_ratio_
|
pipe.named_steps['pca'].explained_variance_ratio_
|
||||||
|
|||||||
+8425
-145
File diff suppressed because it is too large.
Load diff
+13
-13
@@ -47,7 +47,7 @@ from ISLP.pygam import (approx_lam,
|
|||||||
```
|
```
|
||||||
|
|
||||||
## Polynomial Regression and Step Functions
|
## Polynomial Regression and Step Functions
|
||||||
We start by demonstrating how Figure~\ref{Ch7:fig:poly} can be reproduced.
|
We start by demonstrating how Figure 7.1 can be reproduced.
|
||||||
Let's begin by loading the data.
|
Let's begin by loading the data.
|
||||||
|
|
||||||
```{python}
|
```{python}
|
||||||
@@ -59,7 +59,7 @@ age = Wage['age']
|
|||||||
|
|
||||||
Throughout most of this lab, our response is `Wage['wage']`, which
|
Throughout most of this lab, our response is `Wage['wage']`, which
|
||||||
we have stored as `y` above.
|
we have stored as `y` above.
|
||||||
As in Section~\ref{Ch3-linreg-lab:non-linear-transformations-of-the-predictors}, we will use the `poly()` function to create a model matrix
|
As in Section 3.6.6, we will use the `poly()` function to create a model matrix
|
||||||
that will fit a $4$th degree polynomial in `age`.
|
that will fit a $4$th degree polynomial in `age`.
|
||||||
|
|
||||||
```{python}
|
```{python}
|
||||||
@@ -73,11 +73,11 @@ summarize(M)
|
|||||||
This polynomial is constructed using the function `poly()`,
|
This polynomial is constructed using the function `poly()`,
|
||||||
which creates
|
which creates
|
||||||
a special *transformer* `Poly()` (using `sklearn` terminology
|
a special *transformer* `Poly()` (using `sklearn` terminology
|
||||||
for feature transformations such as `PCA()` seen in Section \ref{Ch6-varselect-lab:principal-components-regression}) which
|
for feature transformations such as `PCA()` seen in Section 6.5.3) which
|
||||||
allows for easy evaluation of the polynomial at new data points. Here `poly()` is referred to as a *helper* function, and sets up the transformation; `Poly()` is the actual workhorse that computes the transformation. See also
|
allows for easy evaluation of the polynomial at new data points. Here `poly()` is referred to as a *helper* function, and sets up the transformation; `Poly()` is the actual workhorse that computes the transformation. See also
|
||||||
the
|
the
|
||||||
discussion of transformations on
|
discussion of transformations on
|
||||||
page~\pageref{Ch3-linreg-lab:using-transformations-fit-and-transform}.
|
page 118.
|
||||||
|
|
||||||
In the code above, the first line executes the `fit()` method
|
In the code above, the first line executes the `fit()` method
|
||||||
using the dataframe
|
using the dataframe
|
||||||
@@ -140,7 +140,7 @@ def plot_wage_fit(age_df,
|
|||||||
We include an argument `alpha` to `ax.scatter()`
|
We include an argument `alpha` to `ax.scatter()`
|
||||||
to add some transparency to the points. This provides a visual indication
|
to add some transparency to the points. This provides a visual indication
|
||||||
of density. Notice the use of the `zip()` function in the
|
of density. Notice the use of the `zip()` function in the
|
||||||
`for` loop above (see Section~\ref{Ch2-statlearn-lab:for-loops}).
|
`for` loop above (see Section 2.3.8).
|
||||||
We have three lines to plot, each with different colors and line
|
We have three lines to plot, each with different colors and line
|
||||||
types. Here `zip()` conveniently bundles these together as
|
types. Here `zip()` conveniently bundles these together as
|
||||||
iterators in the loop. {In `Python`{} speak, an "iterator" is an object with a finite number of values, that can be iterated on, as in a loop.}
|
iterators in the loop. {In `Python`{} speak, an "iterator" is an object with a finite number of values, that can be iterated on, as in a loop.}
|
||||||
@@ -243,7 +243,7 @@ anova_lm(*[sm.OLS(y, X_).fit() for X_ in XEs])
|
|||||||
|
|
||||||
|
|
||||||
As an alternative to using hypothesis tests and ANOVA, we could choose
|
As an alternative to using hypothesis tests and ANOVA, we could choose
|
||||||
the polynomial degree using cross-validation, as discussed in Chapter~\ref{Ch5:resample}.
|
the polynomial degree using cross-validation, as discussed in Chapter 5.
|
||||||
|
|
||||||
Next we consider the task of predicting whether an individual earns
|
Next we consider the task of predicting whether an individual earns
|
||||||
more than $250,000 per year. We proceed much as before, except
|
more than $250,000 per year. We proceed much as before, except
|
||||||
@@ -302,7 +302,7 @@ value do not cover each other up. This type of plot is often called a
|
|||||||
*rug plot*.
|
*rug plot*.
|
||||||
|
|
||||||
In order to fit a step function, as discussed in
|
In order to fit a step function, as discussed in
|
||||||
Section~\ref{Ch7:sec:scolstep-function}, we first use the `pd.qcut()`
|
Section 7.2, we first use the `pd.qcut()`
|
||||||
function to discretize `age` based on quantiles. Then we use `pd.get_dummies()` to create the
|
function to discretize `age` based on quantiles. Then we use `pd.get_dummies()` to create the
|
||||||
columns of the model matrix for this categorical variable. Note that this function will
|
columns of the model matrix for this categorical variable. Note that this function will
|
||||||
include *all* columns for a given categorical, rather than the usual approach which drops one
|
include *all* columns for a given categorical, rather than the usual approach which drops one
|
||||||
@@ -334,7 +334,7 @@ evaluation functions are in the `scipy.interpolate` package;
|
|||||||
we have simply wrapped them as transforms
|
we have simply wrapped them as transforms
|
||||||
similar to `Poly()` and `PCA()`.
|
similar to `Poly()` and `PCA()`.
|
||||||
|
|
||||||
In Section~\ref{Ch7:sec:scolr-splin}, we saw
|
In Section 7.4, we saw
|
||||||
that regression splines can be fit by constructing an appropriate
|
that regression splines can be fit by constructing an appropriate
|
||||||
matrix of basis functions. The `BSpline()` function generates the
|
matrix of basis functions. The `BSpline()` function generates the
|
||||||
entire matrix of basis functions for splines with the specified set of
|
entire matrix of basis functions for splines with the specified set of
|
||||||
@@ -349,7 +349,7 @@ bs_age.shape
|
|||||||
```
|
```
|
||||||
This results in a seven-column matrix, which is what is expected for a cubic-spline basis with 3 interior knots.
|
This results in a seven-column matrix, which is what is expected for a cubic-spline basis with 3 interior knots.
|
||||||
We can form this same matrix using the `bs()` object,
|
We can form this same matrix using the `bs()` object,
|
||||||
which facilitates adding this to a model-matrix builder (as in `poly()` versus its workhorse `Poly()`) described in Section~\ref{Ch7-nonlin-lab:polynomial-regression-and-step-functions}.
|
which facilitates adding this to a model-matrix builder (as in `poly()` versus its workhorse `Poly()`) described in Section 7.8.1.
|
||||||
|
|
||||||
We now fit a cubic spline model to the `Wage` data.
|
We now fit a cubic spline model to the `Wage` data.
|
||||||
|
|
||||||
@@ -458,7 +458,7 @@ of a model matrix with a particular smoothing operation:
|
|||||||
`s` for smoothing spline; `l` for linear, and `f` for factor or categorical variables.
|
`s` for smoothing spline; `l` for linear, and `f` for factor or categorical variables.
|
||||||
The argument `0` passed to `s` below indicates that this smoother will
|
The argument `0` passed to `s` below indicates that this smoother will
|
||||||
apply to the first column of a feature matrix. Below, we pass it a
|
apply to the first column of a feature matrix. Below, we pass it a
|
||||||
matrix with a single column: `X_age`. The argument `lam` is the penalty parameter $\lambda$ as discussed in Section~\ref{Ch7:sec5.2}.
|
matrix with a single column: `X_age`. The argument `lam` is the penalty parameter $\lambda$ as discussed in Section 7.5.2.
|
||||||
|
|
||||||
```{python}
|
```{python}
|
||||||
X_age = np.asarray(age).reshape((-1,1))
|
X_age = np.asarray(age).reshape((-1,1))
|
||||||
@@ -548,7 +548,7 @@ The strength of generalized additive models lies in their ability to fit multiva
|
|||||||
|
|
||||||
We now fit a GAM by hand to predict
|
We now fit a GAM by hand to predict
|
||||||
`wage` using natural spline functions of `year` and `age`,
|
`wage` using natural spline functions of `year` and `age`,
|
||||||
treating `education` as a qualitative predictor, as in (\ref{Ch7:nsmod}).
|
treating `education` as a qualitative predictor, as in (7.16).
|
||||||
Since this is just a big linear regression model
|
Since this is just a big linear regression model
|
||||||
using an appropriate choice of basis functions, we can simply do this
|
using an appropriate choice of basis functions, we can simply do this
|
||||||
using the `sm.OLS()` function.
|
using the `sm.OLS()` function.
|
||||||
@@ -631,9 +631,9 @@ ax.set_title('Partial dependence of year on wage', fontsize=20);
|
|||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
We now fit the model (\ref{Ch7:nsmod}) using smoothing splines rather
|
We now fit the model (7.16) using smoothing splines rather
|
||||||
than natural splines. All of the
|
than natural splines. All of the
|
||||||
terms in (\ref{Ch7:nsmod}) are fit simultaneously, taking each other
|
terms in (7.16) are fit simultaneously, taking each other
|
||||||
into account to explain the response. The `pygam` package only works with matrices, so we must convert
|
into account to explain the response. The `pygam` package only works with matrices, so we must convert
|
||||||
the categorical series `education` to its array representation, which can be found
|
the categorical series `education` to its array representation, which can be found
|
||||||
with the `cat.codes` attribute of `education`. As `year` only has 7 unique values, we
|
with the `cat.codes` attribute of `education`. As `year` only has 7 unique values, we
|
||||||
|
|||||||
+314
-267
File diff suppressed because it is too large.
Load diff
@@ -86,11 +86,11 @@ clf.fit(X, High)
|
|||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
In our discussion of qualitative features in Section~\ref{ch3:sec3},
|
In our discussion of qualitative features in Section 3.3,
|
||||||
we noted that for a linear regression model such a feature could be
|
we noted that for a linear regression model such a feature could be
|
||||||
represented by including a matrix of dummy variables (one-hot-encoding) in the model
|
represented by including a matrix of dummy variables (one-hot-encoding) in the model
|
||||||
matrix, using the formula notation of `statsmodels`.
|
matrix, using the formula notation of `statsmodels`.
|
||||||
As mentioned in Section~\ref{Ch8:decison.tree.sec}, there is a more
|
As mentioned in Section 8.1, there is a more
|
||||||
natural way to handle qualitative features when building a decision
|
natural way to handle qualitative features when building a decision
|
||||||
tree, that does not require such dummy variables; each split amounts to partitioning the levels into two groups.
|
tree, that does not require such dummy variables; each split amounts to partitioning the levels into two groups.
|
||||||
However,
|
However,
|
||||||
@@ -121,7 +121,7 @@ resid_dev
|
|||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
This is closely related to the *entropy*, defined in (\ref{Ch8:eq:cross-entropy}).
|
This is closely related to the *entropy*, defined in (8.7).
|
||||||
A small deviance indicates a
|
A small deviance indicates a
|
||||||
tree that provides a good fit to the (training) data.
|
tree that provides a good fit to the (training) data.
|
||||||
|
|
||||||
@@ -158,7 +158,7 @@ on these data, we must estimate the test error rather than simply
|
|||||||
computing the training error. We split the observations into a
|
computing the training error. We split the observations into a
|
||||||
training set and a test set, build the tree using the training set,
|
training set and a test set, build the tree using the training set,
|
||||||
and evaluate its performance on the test data. This pattern is
|
and evaluate its performance on the test data. This pattern is
|
||||||
similar to that in Chapter~\ref{Ch6:varselect}, with the linear models
|
similar to that in Chapter 6, with the linear models
|
||||||
replaced here by decision trees --- the code for validation
|
replaced here by decision trees --- the code for validation
|
||||||
is almost identical. This approach leads to correct predictions
|
is almost identical. This approach leads to correct predictions
|
||||||
for 68.5% of the locations in the test data set.
|
for 68.5% of the locations in the test data set.
|
||||||
@@ -431,7 +431,7 @@ feature_imp.sort_values(by='importance', ascending=False)
|
|||||||
```
|
```
|
||||||
This
|
This
|
||||||
is a relative measure of the total decrease in node impurity that results from
|
is a relative measure of the total decrease in node impurity that results from
|
||||||
splits over that variable, averaged over all trees (this was plotted in Figure~\ref{Ch8:fig:varimp} for a model fit to the `Heart` data).
|
splits over that variable, averaged over all trees (this was plotted in Figure 8.9 for a model fit to the `Heart` data).
|
||||||
|
|
||||||
The results indicate that across all of the trees considered in the
|
The results indicate that across all of the trees considered in the
|
||||||
random forest, the wealth level of the community (`lstat`) and the
|
random forest, the wealth level of the community (`lstat`) and the
|
||||||
@@ -495,7 +495,7 @@ np.mean((y_test - y_hat_boost)**2)
|
|||||||
The test MSE obtained is 14.48,
|
The test MSE obtained is 14.48,
|
||||||
similar to the test MSE for bagging. If we want to, we can
|
similar to the test MSE for bagging. If we want to, we can
|
||||||
perform boosting with a different value of the shrinkage parameter
|
perform boosting with a different value of the shrinkage parameter
|
||||||
$\lambda$ in (\ref{Ch8:alphaboost}). The default value is 0.001, but
|
$\lambda$ in (8.10). The default value is 0.001, but
|
||||||
this is easily modified. Here we take $\lambda=0.2$.
|
this is easily modified. Here we take $\lambda=0.2$.
|
||||||
|
|
||||||
```{python}
|
```{python}
|
||||||
|
|||||||
+3868
-197
File diff suppressed because it is too large.
Load diff
+3
-3
@@ -255,9 +255,9 @@ kernel we use `kernel="poly"`, and to fit an SVM with a
|
|||||||
radial kernel we use
|
radial kernel we use
|
||||||
`kernel="rbf"`. In the former case we also use the
|
`kernel="rbf"`. In the former case we also use the
|
||||||
`degree` argument to specify a degree for the polynomial kernel
|
`degree` argument to specify a degree for the polynomial kernel
|
||||||
(this is $d$ in (\ref{Ch9:eq:polyd})), and in the latter case we use
|
(this is $d$ in (9.22)), and in the latter case we use
|
||||||
`gamma` to specify a value of $\gamma$ for the radial basis
|
`gamma` to specify a value of $\gamma$ for the radial basis
|
||||||
kernel (\ref{Ch9:eq:radial}).
|
kernel (9.24).
|
||||||
|
|
||||||
We first generate some data with a non-linear class boundary, as follows:
|
We first generate some data with a non-linear class boundary, as follows:
|
||||||
|
|
||||||
@@ -377,7 +377,7 @@ classifier, the fitted value for an observation $X= (X_1, X_2, \ldots,
|
|||||||
X_p)^T$ takes the form $\hat{\beta}_0 + \hat{\beta}_1 X_1 +
|
X_p)^T$ takes the form $\hat{\beta}_0 + \hat{\beta}_1 X_1 +
|
||||||
\hat{\beta}_2 X_2 + \ldots + \hat{\beta}_p X_p$. For an SVM with a
|
\hat{\beta}_2 X_2 + \ldots + \hat{\beta}_p X_p$. For an SVM with a
|
||||||
non-linear kernel, the equation that yields the fitted value is given
|
non-linear kernel, the equation that yields the fitted value is given
|
||||||
in (\ref{Ch9:eq:svmip}). The sign of the fitted value
|
in (9.23). The sign of the fitted value
|
||||||
determines on which side of the decision boundary the observation
|
determines on which side of the decision boundary the observation
|
||||||
lies. Therefore, the relationship between the fitted value and the
|
lies. Therefore, the relationship between the fitted value and the
|
||||||
class prediction for a given observation is simple: if the fitted
|
class prediction for a given observation is simple: if the fitted
|
||||||
|
|||||||
+2032
-158
File diff suppressed because it is too large.
Load diff
+33
-27
@@ -1,5 +1,4 @@
|
|||||||
|
|
||||||
|
|
||||||
# Deep Learning
|
# Deep Learning
|
||||||
|
|
||||||
<a target="_blank" href="https://colab.research.google.com/github/intro-stat-learning/ISLP_labs/blob/v2.2.1/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">
|
||||||
@@ -21,7 +20,8 @@ Much of our code is adapted from there, as well as the `pytorch_lightning` docum
|
|||||||
We start with several standard imports that we have seen before.
|
We start with several standard imports that we have seen before.
|
||||||
|
|
||||||
```{python}
|
```{python}
|
||||||
import numpy as np, pandas as pd
|
import numpy as np
|
||||||
|
import pandas as pd
|
||||||
from matplotlib.pyplot import subplots
|
from matplotlib.pyplot import subplots
|
||||||
from sklearn.linear_model import \
|
from sklearn.linear_model import \
|
||||||
(LinearRegression,
|
(LinearRegression,
|
||||||
@@ -57,7 +57,7 @@ the `torchmetrics` package has utilities to compute
|
|||||||
various metrics to evaluate performance when fitting
|
various metrics to evaluate performance when fitting
|
||||||
a model. The `torchinfo` package provides a useful
|
a model. The `torchinfo` package provides a useful
|
||||||
summary of the layers of a model. We use the `read_image()`
|
summary of the layers of a model. We use the `read_image()`
|
||||||
function when loading test images in Section~\ref{Ch13-deeplearning-lab:using-pretrained-cnn-models}.
|
function when loading test images in Section 10.9.4.
|
||||||
|
|
||||||
If you have not already installed the packages `torchvision`
|
If you have not already installed the packages `torchvision`
|
||||||
and `torchinfo` you can install them by running
|
and `torchinfo` you can install them by running
|
||||||
@@ -153,17 +153,19 @@ in our example applying the `ResNet50` model
|
|||||||
to some of our own images.
|
to some of our own images.
|
||||||
The `json` module will be used to load
|
The `json` module will be used to load
|
||||||
a JSON file for looking up classes to identify the labels of the
|
a JSON file for looking up classes to identify the labels of the
|
||||||
pictures in the `ResNet50` example.
|
pictures in the `ResNet50` example. We'll also import `warnings` to filter
|
||||||
|
out warnings when fitting the LASSO to the IMDB data.
|
||||||
|
|
||||||
```{python}
|
```{python}
|
||||||
from glob import glob
|
from glob import glob
|
||||||
import json
|
import json
|
||||||
|
import warnings
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## Single Layer Network on Hitters Data
|
## Single Layer Network on Hitters Data
|
||||||
We start by fitting the models in Section~\ref{Ch13:sec:when-use-deep} on the `Hitters` data.
|
We start by fitting the models in Section 10.6 on the `Hitters` data.
|
||||||
|
|
||||||
```{python}
|
```{python}
|
||||||
Hitters = load_data('Hitters').dropna()
|
Hitters = load_data('Hitters').dropna()
|
||||||
@@ -217,7 +219,7 @@ np.abs(Yhat_test - Y_test).mean()
|
|||||||
|
|
||||||
Next we fit the lasso using `sklearn`. We are using
|
Next we fit the lasso using `sklearn`. We are using
|
||||||
mean absolute error to select and evaluate a model, rather than mean squared error.
|
mean absolute error to select and evaluate a model, rather than mean squared error.
|
||||||
The specialized solver we used in Section~\ref{Ch6-varselect-lab:lab-2-ridge-regression-and-the-lasso} uses only mean squared error. So here, with a bit more work, we create a cross-validation grid and perform the cross-validation directly.
|
The specialized solver we used in Section 6.5.2 uses only mean squared error. So here, with a bit more work, we create a cross-validation grid and perform the cross-validation directly.
|
||||||
|
|
||||||
We encode a pipeline with two steps: we first normalize the features using a `StandardScaler()` transform,
|
We encode a pipeline with two steps: we first normalize the features using a `StandardScaler()` transform,
|
||||||
and then fit the lasso without further normalization.
|
and then fit the lasso without further normalization.
|
||||||
@@ -439,7 +441,7 @@ hit_module = SimpleModule.regression(hit_model,
|
|||||||
```
|
```
|
||||||
|
|
||||||
By using the `SimpleModule.regression()` method, we indicate that we will use squared-error loss as in
|
By using the `SimpleModule.regression()` method, we indicate that we will use squared-error loss as in
|
||||||
(\ref{Ch13:eq:4}).
|
(10.23).
|
||||||
We have also asked for mean absolute error to be tracked as well
|
We have also asked for mean absolute error to be tracked as well
|
||||||
in the metrics that are logged.
|
in the metrics that are logged.
|
||||||
|
|
||||||
@@ -476,7 +478,7 @@ hit_trainer = Trainer(deterministic=True,
|
|||||||
hit_trainer.fit(hit_module, datamodule=hit_dm)
|
hit_trainer.fit(hit_module, datamodule=hit_dm)
|
||||||
```
|
```
|
||||||
At each step of SGD, the algorithm randomly selects 32 training observations for
|
At each step of SGD, the algorithm randomly selects 32 training observations for
|
||||||
the computation of the gradient. Recall from Section~\ref{Ch13:sec:fitt-neur-netw}
|
the computation of the gradient. Recall from Section 10.7
|
||||||
that an epoch amounts to the number of SGD steps required to process $n$
|
that an epoch amounts to the number of SGD steps required to process $n$
|
||||||
observations. Since the training set has
|
observations. Since the training set has
|
||||||
$n=175$, and we specified a `batch_size` of 32 in the construction of `hit_dm`, an epoch is $175/32=5.5$ SGD steps.
|
$n=175$, and we specified a `batch_size` of 32 in the construction of `hit_dm`, an epoch is $175/32=5.5$ SGD steps.
|
||||||
@@ -765,8 +767,8 @@ mnist_trainer.test(mnist_module,
|
|||||||
datamodule=mnist_dm)
|
datamodule=mnist_dm)
|
||||||
```
|
```
|
||||||
|
|
||||||
Table~\ref{Ch13:tab:mnist} also reports the error rates resulting from LDA (Chapter~\ref{Ch4:classification}) and multiclass logistic
|
Table 10.1 also reports the error rates resulting from LDA (Chapter 4) and multiclass logistic
|
||||||
regression. For LDA we refer the reader to Section~\ref{Ch4-classification-lab:linear-discriminant-analysis}.
|
regression. For LDA we refer the reader to Section 4.7.3.
|
||||||
Although we could use the `sklearn` function `LogisticRegression()` to fit
|
Although we could use the `sklearn` function `LogisticRegression()` to fit
|
||||||
multiclass logistic regression, we are set up here to fit such a model
|
multiclass logistic regression, we are set up here to fit such a model
|
||||||
with `torch`.
|
with `torch`.
|
||||||
@@ -871,7 +873,7 @@ for idx, (X_ ,Y_) in enumerate(cifar_dm.train_dataloader()):
|
|||||||
|
|
||||||
|
|
||||||
Before we start, we look at some of the training images; similar code produced
|
Before we start, we look at some of the training images; similar code produced
|
||||||
Figure~\ref{Ch13:fig:cifar100} on page \pageref{Ch13:fig:cifar100}. The example below also illustrates
|
Figure 10.5 on page 406. The example below also illustrates
|
||||||
that `TensorDataset` objects can be indexed with integers --- we are choosing
|
that `TensorDataset` objects can be indexed with integers --- we are choosing
|
||||||
random images from the training data by indexing `cifar_train`. In order to display correctly,
|
random images from the training data by indexing `cifar_train`. In order to display correctly,
|
||||||
we must reorder the dimensions by a call to `np.transpose()`.
|
we must reorder the dimensions by a call to `np.transpose()`.
|
||||||
@@ -894,7 +896,7 @@ for i in range(5):
|
|||||||
Here the `imshow()` method recognizes from the shape of its argument that it is a 3-dimensional array, with the last dimension indexing the three RGB color channels.
|
Here the `imshow()` method recognizes from the shape of its argument that it is a 3-dimensional array, with the last dimension indexing the three RGB color channels.
|
||||||
|
|
||||||
We specify a moderately-sized CNN for
|
We specify a moderately-sized CNN for
|
||||||
demonstration purposes, similar in structure to Figure~\ref{Ch13:fig:DeepCNN}.
|
demonstration purposes, similar in structure to Figure 10.8.
|
||||||
We use several layers, each consisting of convolution, ReLU, and max-pooling steps.
|
We use several layers, each consisting of convolution, ReLU, and max-pooling steps.
|
||||||
We first define a module that defines one of these layers. As in our
|
We first define a module that defines one of these layers. As in our
|
||||||
previous examples, we overwrite the `__init__()` and `forward()` methods
|
previous examples, we overwrite the `__init__()` and `forward()` methods
|
||||||
@@ -1034,7 +1036,7 @@ summary_plot(cifar_results,
|
|||||||
ax,
|
ax,
|
||||||
col='accuracy',
|
col='accuracy',
|
||||||
ylabel='Accuracy')
|
ylabel='Accuracy')
|
||||||
ax.set_xticks(np.linspace(0, 10, 6).astype(int))
|
ax.set_xticks(np.linspace(0, 30, 7).astype(int))
|
||||||
ax.set_ylabel('Accuracy')
|
ax.set_ylabel('Accuracy')
|
||||||
ax.set_ylim([0, 1]);
|
ax.set_ylim([0, 1]);
|
||||||
```
|
```
|
||||||
@@ -1083,7 +1085,7 @@ clauses; if it works, we get the speedup, if it fails, nothing happens.
|
|||||||
|
|
||||||
## Using Pretrained CNN Models
|
## Using Pretrained CNN Models
|
||||||
We now show how to use a CNN pretrained on the `imagenet` database to classify natural
|
We now show how to use a CNN pretrained on the `imagenet` database to classify natural
|
||||||
images, and demonstrate how we produced Figure~\ref{Ch13:fig:homeimages}.
|
images, and demonstrate how we produced Figure 10.10.
|
||||||
We copied six JPEG images from a digital photo album into the
|
We copied six JPEG images from a digital photo album into the
|
||||||
directory `book_images`. These images are available
|
directory `book_images`. These images are available
|
||||||
from the data section of <www.statlearning.com>, the ISLP book website. Download `book_images.zip`; when
|
from the data section of <www.statlearning.com>, the ISLP book website. Download `book_images.zip`; when
|
||||||
@@ -1192,7 +1194,7 @@ del(cifar_test,
|
|||||||
|
|
||||||
|
|
||||||
## IMDB Document Classification
|
## IMDB Document Classification
|
||||||
We now implement models for sentiment classification (Section~\ref{Ch13:sec:docum-class}) on the `IMDB`
|
We now implement models for sentiment classification (Section 10.4) on the `IMDB`
|
||||||
dataset. As mentioned above code block~8, we are using
|
dataset. As mentioned above code block~8, we are using
|
||||||
a preprocessed version of the `IMDB` dataset found in the
|
a preprocessed version of the `IMDB` dataset found in the
|
||||||
`keras` package. As `keras` uses `tensorflow`, a different
|
`keras` package. As `keras` uses `tensorflow`, a different
|
||||||
@@ -1346,7 +1348,7 @@ matrix that is recognized by `sklearn.`
|
|||||||
```
|
```
|
||||||
|
|
||||||
Similar to what we did in
|
Similar to what we did in
|
||||||
Section~\ref{Ch13-deeplearning-lab:single-layer-network-on-hitters-data},
|
Section 10.9.1,
|
||||||
we construct a series of 50 values for the lasso reguralization parameter $\lambda$.
|
we construct a series of 50 values for the lasso reguralization parameter $\lambda$.
|
||||||
|
|
||||||
```{python}
|
```{python}
|
||||||
@@ -1369,16 +1371,20 @@ logit = LogisticRegression(penalty='l1',
|
|||||||
|
|
||||||
```
|
```
|
||||||
The path of 50 values takes approximately 40 seconds to run.
|
The path of 50 values takes approximately 40 seconds to run.
|
||||||
|
As in Chapter 6, we will filter out warnings, this time using a context manager.
|
||||||
|
|
||||||
```{python}
|
```{python}
|
||||||
coefs = []
|
with warnings.catch_warnings():
|
||||||
intercepts = []
|
warnings.simplefilter("ignore")
|
||||||
|
|
||||||
for l in lam_val:
|
coefs = []
|
||||||
logit.C = 1/l
|
intercepts = []
|
||||||
logit.fit(X_train, Y_train)
|
|
||||||
coefs.append(logit.coef_.copy())
|
for l in lam_val:
|
||||||
intercepts.append(logit.intercept_)
|
logit.C = 1/l
|
||||||
|
logit.fit(X_train, Y_train)
|
||||||
|
coefs.append(logit.coef_.copy())
|
||||||
|
intercepts.append(logit.intercept_)
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -1454,16 +1460,16 @@ del(imdb_model,
|
|||||||
|
|
||||||
## Recurrent Neural Networks
|
## Recurrent Neural Networks
|
||||||
In this lab we fit the models illustrated in
|
In this lab we fit the models illustrated in
|
||||||
Section~\ref{Ch13:sec:recurr-neur-netw}.
|
Section 10.5.
|
||||||
|
|
||||||
|
|
||||||
### Sequential Models for Document Classification
|
### Sequential Models for Document Classification
|
||||||
Here we fit a simple LSTM RNN for sentiment prediction to
|
Here we fit a simple LSTM RNN for sentiment prediction to
|
||||||
the `IMDb` movie-review data, as discussed in Section~\ref{Ch13:sec:sequ-models-docum}.
|
the `IMDb` movie-review data, as discussed in Section 10.5.1.
|
||||||
For an RNN we use the sequence of words in a document, taking their
|
For an RNN we use the sequence of words in a document, taking their
|
||||||
order into account. We loaded the preprocessed
|
order into account. We loaded the preprocessed
|
||||||
data at the beginning of
|
data at the beginning of
|
||||||
Section~\ref{Ch13-deeplearning-lab:imdb-document-classification}.
|
Section 10.9.5.
|
||||||
A script that details the preprocessing can be found in the
|
A script that details the preprocessing can be found in the
|
||||||
`ISLP` library. Notably, since more than 90% of the documents
|
`ISLP` library. Notably, since more than 90% of the documents
|
||||||
had fewer than 500 words, we set the document length to 500. For
|
had fewer than 500 words, we set the document length to 500. For
|
||||||
@@ -1578,7 +1584,7 @@ del(lstm_model,
|
|||||||
|
|
||||||
|
|
||||||
### Time Series Prediction
|
### Time Series Prediction
|
||||||
We now show how to fit the models in Section~\ref{Ch13:sec:time-seri-pred}
|
We now show how to fit the models in Section 10.5.2
|
||||||
for time series prediction.
|
for time series prediction.
|
||||||
We first load and standardize the data.
|
We first load and standardize the data.
|
||||||
|
|
||||||
|
|||||||
+562
-508
File diff suppressed because it is too large.
Load diff
+10
-10
@@ -10,9 +10,9 @@
|
|||||||
|
|
||||||
|
|
||||||
In this lab, we perform survival analyses on three separate data
|
In this lab, we perform survival analyses on three separate data
|
||||||
sets. In Section~\ref{brain.cancer.sec} we analyze the `BrainCancer`
|
sets. In Section 11.8.1 we analyze the `BrainCancer`
|
||||||
data that was first described in Section~\ref{sec:KM}. In Section~\ref{time.to.pub.sec}, we examine the `Publication`
|
data that was first described in Section 11.3. In Section 11.8.2, we examine the `Publication`
|
||||||
data from Section~\ref{sec:pub}. Finally, Section~\ref{call.center.sec} explores
|
data from Section 11.5.4. Finally, Section 11.8.3 explores
|
||||||
a simulated call-center data set.
|
a simulated call-center data set.
|
||||||
|
|
||||||
We begin by importing some of our libraries at this top
|
We begin by importing some of our libraries at this top
|
||||||
@@ -82,7 +82,7 @@ observation. But some scientists might use the opposite coding. For
|
|||||||
the `BrainCancer` data set 35 patients died before the end of
|
the `BrainCancer` data set 35 patients died before the end of
|
||||||
the study, so we are using the conventional coding.
|
the study, so we are using the conventional coding.
|
||||||
|
|
||||||
To begin the analysis, we re-create the Kaplan-Meier survival curve shown in Figure~\ref{fig:survbrain}. The main
|
To begin the analysis, we re-create the Kaplan-Meier survival curve shown in Figure 11.2. The main
|
||||||
package we will use for survival analysis
|
package we will use for survival analysis
|
||||||
is `lifelines`.
|
is `lifelines`.
|
||||||
The variable `time` corresponds to $y_i$, the time to the $i$th event (either censoring or
|
The variable `time` corresponds to $y_i$, the time to the $i$th event (either censoring or
|
||||||
@@ -102,7 +102,7 @@ km_brain.plot(label='Kaplan Meier estimate', ax=ax)
|
|||||||
```
|
```
|
||||||
|
|
||||||
Next we create Kaplan-Meier survival curves that are stratified by
|
Next we create Kaplan-Meier survival curves that are stratified by
|
||||||
`sex`, in order to reproduce Figure~\ref{fig:survbrain2}.
|
`sex`, in order to reproduce Figure 11.3.
|
||||||
We do this using the `groupby()` method of a dataframe.
|
We do this using the `groupby()` method of a dataframe.
|
||||||
This method returns a generator that can
|
This method returns a generator that can
|
||||||
be iterated over in the `for` loop. In this case,
|
be iterated over in the `for` loop. In this case,
|
||||||
@@ -130,7 +130,7 @@ for sex, df in BrainCancer.groupby('sex'):
|
|||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
As discussed in Section~\ref{sec:logrank}, we can perform a
|
As discussed in Section 11.4, we can perform a
|
||||||
log-rank test to compare the survival of males to females. We use
|
log-rank test to compare the survival of males to females. We use
|
||||||
the `logrank_test()` function from the `lifelines.statistics` module.
|
the `logrank_test()` function from the `lifelines.statistics` module.
|
||||||
The first two arguments are the event times, with the second
|
The first two arguments are the event times, with the second
|
||||||
@@ -266,9 +266,9 @@ predicted_survival.plot(ax=ax);
|
|||||||
|
|
||||||
|
|
||||||
## Publication Data
|
## Publication Data
|
||||||
The `Publication` data presented in Section~\ref{sec:pub} can be
|
The `Publication` data presented in Section 11.5.4 can be
|
||||||
found in the `ISLP` package.
|
found in the `ISLP` package.
|
||||||
We first reproduce Figure~\ref{fig:lauersurv} by plotting the Kaplan-Meier curves
|
We first reproduce Figure 11.5 by plotting the Kaplan-Meier curves
|
||||||
stratified on the `posres` variable, which records whether the
|
stratified on the `posres` variable, which records whether the
|
||||||
study had a positive or negative result.
|
study had a positive or negative result.
|
||||||
|
|
||||||
@@ -323,7 +323,7 @@ of the study, and whether the study had positive or negative results.
|
|||||||
|
|
||||||
In this section, we will simulate survival data using the relationship
|
In this section, we will simulate survival data using the relationship
|
||||||
between cumulative hazard and
|
between cumulative hazard and
|
||||||
the survival function explored in Exercise \ref{ex:all3}.
|
the survival function explored in Exercise 8.
|
||||||
Our simulated data will represent the observed
|
Our simulated data will represent the observed
|
||||||
wait times (in seconds) for 2,000 customers who have phoned a call
|
wait times (in seconds) for 2,000 customers who have phoned a call
|
||||||
center. In this context, censoring occurs if a customer hangs up
|
center. In this context, censoring occurs if a customer hangs up
|
||||||
@@ -394,7 +394,7 @@ that the risk of a call being answered at Center B is 0.74 times the
|
|||||||
risk that it will be answered at Center A; in other words, the wait
|
risk that it will be answered at Center A; in other words, the wait
|
||||||
times are a bit longer at Center B.
|
times are a bit longer at Center B.
|
||||||
|
|
||||||
Recall from Section~\ref{Ch2-statlearn-lab:loading-data} the use of `lambda`
|
Recall from Section 2.3.7 the use of `lambda`
|
||||||
for creating short functions on the fly.
|
for creating short functions on the fly.
|
||||||
We use the function
|
We use the function
|
||||||
`sim_time()` from the `ISLP.survival` package. This function
|
`sim_time()` from the `ISLP.survival` package. This function
|
||||||
|
|||||||
+176
-163
@@ -5,6 +5,7 @@
|
|||||||
"id": "13a32f39",
|
"id": "13a32f39",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"source": [
|
"source": [
|
||||||
|
"\n",
|
||||||
"# Survival Analysis\n",
|
"# Survival Analysis\n",
|
||||||
"\n",
|
"\n",
|
||||||
"<a target=\"_blank\" href=\"https://colab.research.google.com/github/intro-stat-learning/ISLP_labs/blob/v2.2.1/Ch11-surv-lab.ipynb\">\n",
|
"<a target=\"_blank\" href=\"https://colab.research.google.com/github/intro-stat-learning/ISLP_labs/blob/v2.2.1/Ch11-surv-lab.ipynb\">\n",
|
||||||
@@ -20,9 +21,9 @@
|
|||||||
"metadata": {},
|
"metadata": {},
|
||||||
"source": [
|
"source": [
|
||||||
" In this lab, we perform survival analyses on three separate data\n",
|
" In this lab, we perform survival analyses on three separate data\n",
|
||||||
"sets. In Section~\\ref{brain.cancer.sec} we analyze the `BrainCancer` \n",
|
"sets. In Section 11.8.1 we analyze the `BrainCancer` \n",
|
||||||
"data that was first described in Section~\\ref{sec:KM}. In Section~\\ref{time.to.pub.sec}, we examine the `Publication` \n",
|
"data that was first described in Section 11.3. In Section 11.8.2, we examine the `Publication` \n",
|
||||||
"data from Section~\\ref{sec:pub}. Finally, Section~\\ref{call.center.sec} explores\n",
|
"data from Section 11.5.4. Finally, Section 11.8.3 explores\n",
|
||||||
"a simulated call-center data set.\n",
|
"a simulated call-center data set.\n",
|
||||||
"\n",
|
"\n",
|
||||||
"We begin by importing some of our libraries at this top\n",
|
"We begin by importing some of our libraries at this top\n",
|
||||||
@@ -37,10 +38,10 @@
|
|||||||
"id": "80c238e6",
|
"id": "80c238e6",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:40:28.233456Z",
|
"iopub.execute_input": "2026-02-05T00:46:24.138888Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:40:28.233170Z",
|
"iopub.status.busy": "2026-02-05T00:46:24.138775Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:40:29.349388Z",
|
"iopub.status.idle": "2026-02-05T00:46:58.531055Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:40:29.349073Z"
|
"shell.execute_reply": "2026-02-05T00:46:58.530449Z"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
@@ -67,13 +68,22 @@
|
|||||||
"id": "a236fb17",
|
"id": "a236fb17",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:40:29.351117Z",
|
"iopub.execute_input": "2026-02-05T00:46:58.534797Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:40:29.350968Z",
|
"iopub.status.busy": "2026-02-05T00:46:58.534595Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:40:29.458922Z",
|
"iopub.status.idle": "2026-02-05T00:46:59.067150Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:40:29.458662Z"
|
"shell.execute_reply": "2026-02-05T00:46:59.066449Z"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"outputs": [],
|
"outputs": [
|
||||||
|
{
|
||||||
|
"name": "stderr",
|
||||||
|
"output_type": "stream",
|
||||||
|
"text": [
|
||||||
|
"/Users/jonathantaylor/git-repos/ISLP/ISLP_labs/.venv/lib/python3.12/site-packages/ISLP/survival.py:24: SyntaxWarning: invalid escape sequence '\\c'\n",
|
||||||
|
" H_l(t) = e^l \\cdot H(t)\n"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
"source": [
|
"source": [
|
||||||
"from lifelines import \\\n",
|
"from lifelines import \\\n",
|
||||||
" (KaplanMeierFitter,\n",
|
" (KaplanMeierFitter,\n",
|
||||||
@@ -100,17 +110,17 @@
|
|||||||
"id": "4dd4ddba",
|
"id": "4dd4ddba",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:40:29.460452Z",
|
"iopub.execute_input": "2026-02-05T00:46:59.070532Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:40:29.460361Z",
|
"iopub.status.busy": "2026-02-05T00:46:59.070384Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:40:29.466324Z",
|
"iopub.status.idle": "2026-02-05T00:46:59.081286Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:40:29.466096Z"
|
"shell.execute_reply": "2026-02-05T00:46:59.080691Z"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"outputs": [
|
"outputs": [
|
||||||
{
|
{
|
||||||
"data": {
|
"data": {
|
||||||
"text/plain": [
|
"text/plain": [
|
||||||
"Index(['sex', 'diagnosis', 'loc', 'ki', 'gtv', 'stereo', 'status', 'time'], dtype='object')"
|
"Index(['sex', 'diagnosis', 'loc', 'ki', 'gtv', 'stereo', 'status', 'time'], dtype='str')"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"execution_count": 3,
|
"execution_count": 3,
|
||||||
@@ -138,10 +148,10 @@
|
|||||||
"id": "ae9435b1",
|
"id": "ae9435b1",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:40:29.467504Z",
|
"iopub.execute_input": "2026-02-05T00:46:59.082752Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:40:29.467412Z",
|
"iopub.status.busy": "2026-02-05T00:46:59.082634Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:40:29.470004Z",
|
"iopub.status.idle": "2026-02-05T00:46:59.086240Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:40:29.469792Z"
|
"shell.execute_reply": "2026-02-05T00:46:59.085810Z"
|
||||||
},
|
},
|
||||||
"lines_to_next_cell": 2
|
"lines_to_next_cell": 2
|
||||||
},
|
},
|
||||||
@@ -149,9 +159,10 @@
|
|||||||
{
|
{
|
||||||
"data": {
|
"data": {
|
||||||
"text/plain": [
|
"text/plain": [
|
||||||
|
"sex\n",
|
||||||
"Female 45\n",
|
"Female 45\n",
|
||||||
"Male 43\n",
|
"Male 43\n",
|
||||||
"Name: sex, dtype: int64"
|
"Name: count, dtype: int64"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"execution_count": 4,
|
"execution_count": 4,
|
||||||
@@ -169,10 +180,10 @@
|
|||||||
"id": "a6e94032",
|
"id": "a6e94032",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:40:29.471059Z",
|
"iopub.execute_input": "2026-02-05T00:46:59.087801Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:40:29.470973Z",
|
"iopub.status.busy": "2026-02-05T00:46:59.087700Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:40:29.473403Z",
|
"iopub.status.idle": "2026-02-05T00:46:59.090768Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:40:29.473149Z"
|
"shell.execute_reply": "2026-02-05T00:46:59.090351Z"
|
||||||
},
|
},
|
||||||
"lines_to_next_cell": 2
|
"lines_to_next_cell": 2
|
||||||
},
|
},
|
||||||
@@ -180,11 +191,12 @@
|
|||||||
{
|
{
|
||||||
"data": {
|
"data": {
|
||||||
"text/plain": [
|
"text/plain": [
|
||||||
|
"diagnosis\n",
|
||||||
"Meningioma 42\n",
|
"Meningioma 42\n",
|
||||||
"HG glioma 22\n",
|
"HG glioma 22\n",
|
||||||
"Other 14\n",
|
"Other 14\n",
|
||||||
"LG glioma 9\n",
|
"LG glioma 9\n",
|
||||||
"Name: diagnosis, dtype: int64"
|
"Name: count, dtype: int64"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"execution_count": 5,
|
"execution_count": 5,
|
||||||
@@ -202,10 +214,10 @@
|
|||||||
"id": "afa05da1",
|
"id": "afa05da1",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:40:29.474413Z",
|
"iopub.execute_input": "2026-02-05T00:46:59.092076Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:40:29.474348Z",
|
"iopub.status.busy": "2026-02-05T00:46:59.091980Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:40:29.477359Z",
|
"iopub.status.idle": "2026-02-05T00:46:59.094835Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:40:29.477157Z"
|
"shell.execute_reply": "2026-02-05T00:46:59.094405Z"
|
||||||
},
|
},
|
||||||
"lines_to_next_cell": 2
|
"lines_to_next_cell": 2
|
||||||
},
|
},
|
||||||
@@ -213,9 +225,10 @@
|
|||||||
{
|
{
|
||||||
"data": {
|
"data": {
|
||||||
"text/plain": [
|
"text/plain": [
|
||||||
|
"status\n",
|
||||||
"0 53\n",
|
"0 53\n",
|
||||||
"1 35\n",
|
"1 35\n",
|
||||||
"Name: status, dtype: int64"
|
"Name: count, dtype: int64"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"execution_count": 6,
|
"execution_count": 6,
|
||||||
@@ -240,7 +253,7 @@
|
|||||||
"the `BrainCancer` data set 35 patients died before the end of\n",
|
"the `BrainCancer` data set 35 patients died before the end of\n",
|
||||||
"the study, so we are using the conventional coding.\n",
|
"the study, so we are using the conventional coding.\n",
|
||||||
"\n",
|
"\n",
|
||||||
"To begin the analysis, we re-create the Kaplan-Meier survival curve shown in Figure~\\ref{fig:survbrain}. The main\n",
|
"To begin the analysis, we re-create the Kaplan-Meier survival curve shown in Figure 11.2. The main\n",
|
||||||
"package we will use for survival analysis\n",
|
"package we will use for survival analysis\n",
|
||||||
"is `lifelines`.\n",
|
"is `lifelines`.\n",
|
||||||
"The variable `time` corresponds to $y_i$, the time to the $i$th event (either censoring or\n",
|
"The variable `time` corresponds to $y_i$, the time to the $i$th event (either censoring or\n",
|
||||||
@@ -258,10 +271,10 @@
|
|||||||
"id": "34c7c534",
|
"id": "34c7c534",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:40:29.478404Z",
|
"iopub.execute_input": "2026-02-05T00:46:59.096438Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:40:29.478324Z",
|
"iopub.status.busy": "2026-02-05T00:46:59.096323Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:40:29.594965Z",
|
"iopub.status.idle": "2026-02-05T00:46:59.177555Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:40:29.592314Z"
|
"shell.execute_reply": "2026-02-05T00:46:59.177119Z"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"outputs": [
|
"outputs": [
|
||||||
@@ -277,7 +290,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"data": {
|
"data": {
|
||||||
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAp8AAAKnCAYAAADAwSbIAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8g+/7EAAAACXBIWXMAAA9hAAAPYQGoP6dpAABKkElEQVR4nO3de3RU5dn+8WvPTGaG4ZCgkQnBICgIRhEUhEZxFdvUqEhFraUVCcRKXyyoGP2ptEhAq6m1Iqgo1oq00haspa1Vi/pGsS8aRUNpUTEqoqFIEmKFQAIzmcPvD5uRkEkyk0z2HPL9rDVrmZ19eAIbuXj2fu7bCAaDQQEAAAAmsMR7AAAAAOg5CJ8AAAAwDeETAAAApiF8AgAAwDSETwAAAJiG8AkAAADTED4BAABgGsInAAAATGOL9wAiEQgE9Nlnn6lv374yDCPewwEAAMBRgsGgDhw4oOzsbFksbc9vJkX4/Oyzz5STkxPvYQAAAKADu3bt0vHHH9/m95MifPbt21fSlz9Mv3794jwaAAAAHK2+vl45OTmh3NaWpAifzY/a+/XrR/gEAABIYB29IsmCIwAAAJiG8AkAAADTED4BAABgmqR45xMAgO4SDAbl8/nk9/vjPRQ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HNnDlTmzZt0htvvKHhw4froosu0oEDB1rst2TJEn33u9/Vv/71L1100UWaPn26/vOf/7T7s9jtdk2fPl1PPPFEaNvq1at19dVXt9p33rx5Ki8v19q1a/Wvf/1LV1xxhS644AJ9+OGHYc/9f//3fyosLNQNN9yg9957T48++qhWr17dKmAuXrxYl156qbZt2xb2upFce+7cufJ4PPr73/+ubdu26Z577lGfPn2Uk5OjP/7xj5KkyspK7dmzR8uXL2/z1+P+++/XOeeco3/84x+aPHmyZsyYocLCQl111VXasmWLTjrpJBUWFobum8OHD2vs2LF67rnn9M477+iHP/yhZsyYoc2bN0uSli9frry8PM2ePVt79uzRnj17lJOTo3379ukb3/iGzjjjDL399tvasGGDampq9N3vfrfNscWCEezMHW+y+vp6paena//+/erXr1+8hwMASAGHDx/Wzp07NXToUDmdTjV6fcpd9EJcxvLeHQVy2SMrvT1r1iz9/ve/l9frVVlZmb7xjW90eMzTTz+tOXPmhGa0Vq9eraKiIr3xxhuaMGGCJOn999/XKaecojfffFPjx4/X4sWL9ec//1lbt24Ne85AIKCMjAz97ne/08UXXyzpyxnEhQsXht5hbGhoUJ8+ffS3v/1NF1xwQdjzTJo0SWPGjFFRUZHOPfdc7dmzRxUVFbriiiu0e/dujRs3TlOnTtXixYtVVVWlE088UVVVVcrOzg6dIz8/X+PHj9fdd9+t1atXa/78+aF3K/Pz8/XNb35TCxYsCO2/Zs0a3XLLLfrss89C454/f77uv//+Nn8NI7n26aefrssvv1wlJSWtjt+4caPOO+88ffHFFy1mZpt//mXLlkn6cubz3HPP1ZNPPilJqq6u1sCBA3X77bfrjjvukCS98cYbysvL0549e5SVlRV2vBdffLFGjhypX/ziF2GvI0k//elP9X//93964YWv7vt///vfysnJUWVlpU4++eRW5z36z82RIs1rFJkHACDJnH766aqrq1NJSYnGjx+vPn36tPj+//7v/6q0tFTvv/++6uvr5fP5dPjwYTU2NoYK6ttsNp111lmhY0aOHKmMjAxt375d48ePb3XNmpoaLVy4UBs3blRtba38fr8aGxtV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0Jh/oQTTpBhGHr22We1d+/eFtUHumr48OF66aWX9Prrr2v79u36n//5H9XU1LTYZ8iQIXrzzTf1ySefqK6uToFAQHPnztV//vMfff/739dbb72lHTt26IUXXlBRUVG3hORmhE8AAJLY8ccfr40bN6qurk4FBQUaOnSoli5dqnvuuUennXaafvvb36q0tLTVcS6XS7feequuvPJKnXPOOerTp4/WrVvX5nUef/xxffHFFzrzzDM1Y8YMXX/99V2upxlORkZGu4/An3jiCRUWFuqmm27SiBEjNHXqVL311lsaPHhw2P0LCgr07LPP6sUXX9RZZ52lr33ta7r//vt1wgknRD22jq7t9/s1d+5cnXLKKbrgggt08skn6+GHH5b05asSS5Ys0W233Sa326158+ZFff22LFy4UGeeeaYKCgo0adIkZWVltWpEcPPNN8tqtSo3N1fHHXdcaOHUa6+9Jr/fr/PPP1+jRo3S/PnzlZGREZMe7m2JerX73//+d917772qqKjQnj179Kc//anVD3i0jRs3qri4WO+++65ycnK0cOHCUH2rSLDaHQAQa+2t2k11R68IByIVi9XuUcfahoYGjR49WitWrIho/507d2ry5Mk677zztHXrVs2fP1/XXHNNi2X9AAAA6Bmifrv0wgsv1IUXXhjx/itXrtTQoUND/WZPOeUUbdq0Sffff78KCuKzqhAAAADx0e3vfJaXlys/P7/FtoKCApWXl3f3pTvlyA4XSVB/HwCAqM2aNYtH7oibbl9XX11dHSqG2sztdqu+vl6HDh0Ku1LO4/HI4/GEvq6vr+/uYYYcavKHOlxE03ECAAAAHUvI1e6lpaVKT08PfXJycuIyjpr9Hh30+Nr9HG7qvlIEAAAAqabbp/WysrJa1ZqqqalRv3792qwPtmDBAhUXF4e+rq+vj0sAffvTz+Wwtd91wuWwaeKLine truncated
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAp8AAAKnCAYAAADAwSbIAAAAOnRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjEwLjgsIGh0dHBzOi8vbWF0cGxvdGxpYi5vcmcvwVt1zgAAAAlwSFlzAAAPYQ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EUGFgEz67vm9zCZ7RtGmi+PwJoX4/52c9+lqpNU2N9mjy+JRWKmHY3VQ9QPmKk85hjjsnaREY/dKB/MdU+nBHPLuoIlSCAFium6gEoH/ELtRS/VIEDEz4H0NreccBSSs2N9dYIAQAMkvA5gPd/454DvoAzJh6alp89s+gA2nuTkk1IAEAtED57OWhMQzrt2MPSzzY9NagXcOOWXdkI6WDrfPa3SckmJACgFgifvcQI5j+8bW5a8/Mn0yFNY9LYfkotReC88KYNJdmkZBMSAFArhM9+Amh0Nmoe0zAi9Tj72qRkExIAUAvKsrc7AADVychnGenahGTzEQBQrYTPMtB7E5LNRwBAtRI+y0DPTUg2HwEA1Uz4LIHY+V6MvgrT99yEZPMRAFCthM8SKLbk0lAL0wMAVDq73YcoRi8jRA5FV2FLine truncated
|
||||||
"text/plain": [
|
"text/plain": [
|
||||||
"<Figure size 800x800 with 1 Axes>"
|
"<Figure size 800x800 with 1 Axes>"
|
||||||
]
|
]
|
||||||
@@ -299,7 +312,7 @@
|
|||||||
"metadata": {},
|
"metadata": {},
|
||||||
"source": [
|
"source": [
|
||||||
"Next we create Kaplan-Meier survival curves that are stratified by\n",
|
"Next we create Kaplan-Meier survival curves that are stratified by\n",
|
||||||
"`sex`, in order to reproduce Figure~\\ref{fig:survbrain2}.\n",
|
"`sex`, in order to reproduce Figure 11.3.\n",
|
||||||
"We do this using the `groupby()` method of a dataframe.\n",
|
"We do this using the `groupby()` method of a dataframe.\n",
|
||||||
"This method returns a generator that can\n",
|
"This method returns a generator that can\n",
|
||||||
"be iterated over in the `for` loop. In this case,\n",
|
"be iterated over in the `for` loop. In this case,\n",
|
||||||
@@ -324,16 +337,16 @@
|
|||||||
"id": "5e742ebe",
|
"id": "5e742ebe",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:40:29.605351Z",
|
"iopub.execute_input": "2026-02-05T00:46:59.185914Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:40:29.604913Z",
|
"iopub.status.busy": "2026-02-05T00:46:59.185752Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:40:29.756933Z",
|
"iopub.status.idle": "2026-02-05T00:46:59.262531Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:40:29.751150Z"
|
"shell.execute_reply": "2026-02-05T00:46:59.262083Z"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"outputs": [
|
"outputs": [
|
||||||
{
|
{
|
||||||
"data": {
|
"data": {
|
||||||
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAp8AAAKnCAYAAADAwSbIAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8g+/7EAAAACXBIWXMAAA9hAAAPYQGoP6dpAABXuElEQVR4nO3de3wU9b3/8ffM7CU3kiCXBCIIqIgcEYQUimilNRovtWKtpS0KhUKPKD+1OZ5WvBCrvxrFG16oWC3Sn7U/sf1Ze44XWk8qKC2KYrVWKlQEsWgCWCGwSfYyM78/ogsxt91cZjeb1/Px2IfZ2e/MfAJj8uY78/1+Ddd1XQEAAAAeMFNdAAAAAPoOwicAAAA8Q/gEAACAZwifAAAA8AzhEwAAAJ4hfAIAAMAzhE8AAAB4hvAJAAAAz/hSXUAiHMfRhx9+qH79+skwjFSXAwAAgM9xXVcHDhzQ0KFDZZpt92/2ivD54YcfatiwYakuAwAAAB344IMPdOSRR7b5ea8In/369ZPU9M3k5+enuBoAAAB8Xl1dnYYNGxbPbW3pFeHzs1vt+fn5hE8AAIA01tEjkgw4AgAAgGcInwAAAPAM4RMAAACe6RXPfAIAAO/Ytq1oNJrqMpBmLMuSz+fr8rSXhE8AABB38OBB/fOf/5TruqkuBWkoJydHQ4YMUSAQ6PQxCJ8AAEBSU4/nP//5T+Xk5GjQoEEs7II413UViUS0Z88ebd++Xccee2y7E8m3h/AJAAAkSdFoVK7ratCgQcrOzk51OUgz2dnZ8vv9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upqTZs2TZL0ve99T6tWrYq3/8pXvtLs/D/72c9UWFiodevW6atf/WqLelevXi3HcfTwww/H53Z95JFHVFhYqLVr1+rMM89s9/vtLMInAABoVbbf0uabylN27mRceOGFOvfcc/XSSy/p5Zdf1nPPPaelS5fq4YcfVigU0sGDBzVgwIBm+zQ0NGjbtm3x93fccYdOOOEE/frXv9amTZua9aBmZ2frmGOOSaqmWbNm6brrrou/LywsVCgU0rZt2/S9731PCxYsiH8Wi8VUUFDQbP8TTzwx/vVnwXbcuHHNtu3evTv+vra2Vtdff73Wrl2r3bt3y7Zt1dfXa+fOna3W9+abb+rdd99t0Sva2NjY7M+luxE+AQBAqwzDSPjWdzrIysrSGWecoTPOOEM33HCD5s+fr8rKSl122WUaMmSI1q5d22KfwsLC+Nfbtm3Thx9+KMdxtGPHjmZBrzO33QsKCloE1traWknSQw89pClTpjT7zLKaB26/3x//+rOeyc9vcxwn/n7OnDn6+OOPdc899+ioo45SMBjU1KlTFYlEWq334MGDmjRpkh577LEWnw0aNKjd77Ures8VBQAAkISxY8fqqaee0sSJE1VTUyOfz6cRI0a02jYSiejiiy/WzJkzddxxx2n+/Pl66623NHjwYEmdu+3eVpuhQ4fqvffeS+j50GT86U9/0k9/+lOdc845kpoGE+3du7fN9hMnTtTq1as1ePBg5efnd2st7SF8AgCAXu3jjz/WRRddpHnz5unEE09Uv3799Nprr2np0qU6//zzVVZWpqlTp2rGjBlaunSpRo8erQ8//FDPPPOMLrjgApWWluq6667T/v37de+99yovL0/PPvus5s2bp6efflpS5267t+XHP/6xrrjiChUUFOiss85SOBzWa6+9pk8++UQVFRWdPu6xxx6rRx99VKWlpaqrq9N//ud/Kjs7u832s2bN0u23367zzz9fN910k4488ki9//77evLJJ/XDH/5QRx55ZKdraQ9TLQEAgF4tLy9PU6ZM0d13360vfelLOuGEE3TDDTdowYIFuv/++2UYhp599ll96Utf0ty5czV69Gh961vf0vvvv6+ioiKtXbtWy5Yt06OPPqr8/HyZpqlHH31UL730Unwke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rRq1SqtXbu2xT5/+ctfFA6HtW3btqRWNwIAAOjInj17tHDhQg0fPlzBYFDFxcUqLy/Xn/70p5TUM336dBmGoVtvvbXFZ+eee64Mw9CNN97ofWFpIC1Hu/c60danjGohYse/tGIhmdHDbtkbPjm+Q3OKNhzWtj2MjAcAQLrwwgsViUT0i1/8QqNGjVJtba2qq6v18ccfp6ymYcOGadWqVbrmmmvi23bt2qXq6moNGTIkZXWlGuGzKwyracDR9hcTax+TpKZR8Ud89KLyg4c6nm1/juqKp8kyAwpFYtqwbW9Ch2RkPACgr9u3b59eeuklrV27Vqeddpok6aijjtLkyZObtbn66qv1u9/9TuFwWKWlpbr77rs1fvx47dmzR+PGjdMVV1yha6+9VpL05z//WdOnT9dzzz2n008/vVN1ffWrX9UTTzyhP/3pT5o2bZok6Re/+IXOPPPMZo8oStKjjz6qe+65R1u2bFFubq6+8pWvaNmyZRo8eHCbx1+/fr0WL16s1157TQMHDtQFF1ygqqoq5ebmdqper/T4JPMZzReU8kuaRsQn8grkxXeN+fNkf/pyzICsaL3kxhTwmRpakKO8oL/Dl98yGRkPAOg5rtvUyZKKl5v477a8vDzl5eXpqaeearZC4uEuuugi7d69W88995w2bdqkiRMn6vTTT9e//vUvDRo0SCtXrtSNN96o1157TQcOHNAll1yiRYsWxYPnSy+9FD9PW6/HHnus2TkDgYBmzZqlRx55JL5t1apVmjdvXov6otGobr75Zr355pt66qmntGPHjnYfU9y2bZvOOussXXjhhfrLine truncated
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAp8AAAKnCAYAAADAwSbIAAAAOnRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjEwLjgsIGh0dHBzOi8vbWF0cGxvdGxpYi5vcmcvwVt1zgAAAAlwSFlzAAAPYQAAD2EBqD+naQAAUbNJREFUeJzt3QucVXW99/Hv2mtf5gIzIAgDI0qIiCSCghCiSScS01Nh5aFCITriEePJDqdTogllJ8lLhhJHzCfSx8sj2qN1UqM6KJiJYph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mmW9TQWxkAumpp56qhx9+2AbF5gvemIVxhg8fnvF1mWZ9EwxNyH3qqadsRdWE5dbM+UwgNZXP9957T8nkoWkXTfP8qFGjjtjf7Gcqns2rrWYAuDnOTIN5yimnKFcRPgEAQNvMXNemApkNR5tnuw2m2veJT3zCPq677jpddtllWrx4sa688ko7wKf1bDxGnz59mj42QfTtt9+2Ac40e5t+oI1MqP3kJz/Z4fnvvPNOW41szVQ1ly9frk2bNtkKbGsmHJuR+eZhwqTpBmBCp3luBlGLine truncated
|
||||||
"text/plain": [
|
"text/plain": [
|
||||||
"<Figure size 800x800 with 1 Axes>"
|
"<Figure size 800x800 with 1 Axes>"
|
||||||
]
|
]
|
||||||
@@ -356,7 +369,7 @@
|
|||||||
"id": "2d1575e8",
|
"id": "2d1575e8",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"source": [
|
"source": [
|
||||||
"As discussed in Section~\\ref{sec:logrank}, we can perform a\n",
|
"As discussed in Section 11.4, we can perform a\n",
|
||||||
"log-rank test to compare the survival of males to females. We use\n",
|
"log-rank test to compare the survival of males to females. We use\n",
|
||||||
"the `logrank_test()` function from the `lifelines.statistics` module.\n",
|
"the `logrank_test()` function from the `lifelines.statistics` module.\n",
|
||||||
"The first two arguments are the event times, with the second\n",
|
"The first two arguments are the event times, with the second\n",
|
||||||
@@ -369,10 +382,10 @@
|
|||||||
"id": "4106e397",
|
"id": "4106e397",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:40:29.769387Z",
|
"iopub.execute_input": "2026-02-05T00:46:59.264159Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:40:29.769225Z",
|
"iopub.status.busy": "2026-02-05T00:46:59.264034Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:40:29.818623Z",
|
"iopub.status.idle": "2026-02-05T00:46:59.358145Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:40:29.818386Z"
|
"shell.execute_reply": "2026-02-05T00:46:59.357588Z"
|
||||||
},
|
},
|
||||||
"lines_to_next_cell": 2
|
"lines_to_next_cell": 2
|
||||||
},
|
},
|
||||||
@@ -482,10 +495,10 @@
|
|||||||
"id": "8962942d",
|
"id": "8962942d",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:40:29.819898Z",
|
"iopub.execute_input": "2026-02-05T00:46:59.359853Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:40:29.819778Z",
|
"iopub.status.busy": "2026-02-05T00:46:59.359712Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:40:29.842571Z",
|
"iopub.status.idle": "2026-02-05T00:46:59.392583Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:40:29.842339Z"
|
"shell.execute_reply": "2026-02-05T00:46:59.392024Z"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"outputs": [
|
"outputs": [
|
||||||
@@ -575,10 +588,10 @@
|
|||||||
"id": "d923fe3d",
|
"id": "d923fe3d",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:40:29.844036Z",
|
"iopub.execute_input": "2026-02-05T00:46:59.394108Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:40:29.843960Z",
|
"iopub.status.busy": "2026-02-05T00:46:59.393971Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:40:29.848436Z",
|
"iopub.status.idle": "2026-02-05T00:46:59.400446Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:40:29.848213Z"
|
"shell.execute_reply": "2026-02-05T00:46:59.399897Z"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"outputs": [
|
"outputs": [
|
||||||
@@ -681,10 +694,10 @@
|
|||||||
"id": "43b23849",
|
"id": "43b23849",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:40:29.849715Z",
|
"iopub.execute_input": "2026-02-05T00:46:59.401822Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:40:29.849642Z",
|
"iopub.status.busy": "2026-02-05T00:46:59.401708Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:40:29.878002Z",
|
"iopub.status.idle": "2026-02-05T00:46:59.440236Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:40:29.877763Z"
|
"shell.execute_reply": "2026-02-05T00:46:59.439741Z"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"outputs": [
|
"outputs": [
|
||||||
@@ -829,10 +842,10 @@
|
|||||||
"id": "20f95f4d",
|
"id": "20f95f4d",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:40:29.879409Z",
|
"iopub.execute_input": "2026-02-05T00:46:59.441882Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:40:29.879331Z",
|
"iopub.status.busy": "2026-02-05T00:46:59.441756Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:40:29.882681Z",
|
"iopub.status.idle": "2026-02-05T00:46:59.445370Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:40:29.882457Z"
|
"shell.execute_reply": "2026-02-05T00:46:59.444972Z"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
@@ -862,10 +875,10 @@
|
|||||||
"id": "18ef52a9",
|
"id": "18ef52a9",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:40:29.883885Z",
|
"iopub.execute_input": "2026-02-05T00:46:59.447062Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:40:29.883777Z",
|
"iopub.status.busy": "2026-02-05T00:46:59.446962Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:40:29.888549Z",
|
"iopub.status.idle": "2026-02-05T00:46:59.453531Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:40:29.888317Z"
|
"shell.execute_reply": "2026-02-05T00:46:59.453068Z"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"outputs": [
|
"outputs": [
|
||||||
@@ -990,10 +1003,10 @@
|
|||||||
"id": "dc826bbc",
|
"id": "dc826bbc",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:40:29.896273Z",
|
"iopub.execute_input": "2026-02-05T00:46:59.455458Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:40:29.896164Z",
|
"iopub.status.busy": "2026-02-05T00:46:59.455320Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:40:29.904155Z",
|
"iopub.status.idle": "2026-02-05T00:46:59.466192Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:40:29.903918Z"
|
"shell.execute_reply": "2026-02-05T00:46:59.465722Z"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"outputs": [
|
"outputs": [
|
||||||
@@ -1132,10 +1145,10 @@
|
|||||||
"id": "867045f7",
|
"id": "867045f7",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:40:29.905454Z",
|
"iopub.execute_input": "2026-02-05T00:46:59.467886Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:40:29.905357Z",
|
"iopub.status.busy": "2026-02-05T00:46:59.467750Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:40:29.911172Z",
|
"iopub.status.idle": "2026-02-05T00:46:59.474857Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:40:29.910926Z"
|
"shell.execute_reply": "2026-02-05T00:46:59.474306Z"
|
||||||
},
|
},
|
||||||
"lines_to_next_cell": 0
|
"lines_to_next_cell": 0
|
||||||
},
|
},
|
||||||
@@ -1293,17 +1306,17 @@
|
|||||||
"id": "9fa60bac",
|
"id": "9fa60bac",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:40:29.912461Z",
|
"iopub.execute_input": "2026-02-05T00:46:59.479066Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:40:29.912377Z",
|
"iopub.status.busy": "2026-02-05T00:46:59.478889Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:40:29.992285Z",
|
"iopub.status.idle": "2026-02-05T00:46:59.542903Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:40:29.992056Z"
|
"shell.execute_reply": "2026-02-05T00:46:59.542497Z"
|
||||||
},
|
},
|
||||||
"lines_to_next_cell": 2
|
"lines_to_next_cell": 2
|
||||||
},
|
},
|
||||||
"outputs": [
|
"outputs": [
|
||||||
{
|
{
|
||||||
"data": {
|
"data": {
|
||||||
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAp8AAAKTCAYAAABfKmNzAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8g+/7EAAAACXBIWXMAAA9hAAAPYQGoP6dpAACKg0lEQVR4nOzdd3hTZePG8W+S7j3potCyN8gUcKEoDlD0pyKooChOXLjAAW7cooLi3gpOHCAoKMoG2XvP0gGU7t3k90eg2pfVkeYk6f25rlxJk3NO7r7y6s1zzvMck81msyEiIiIi4gRmowOIiIiISP2h8ikiIiIiTqPyKSIiIiJOo/IpIiIiIk6j8ikiIiIiTqPyKSIiIiJOo/IpIiIiIk7jZXSAqrBarezfv5/g4GBMJpPRcURERETkf9hsNnJzc4mPj8dsPvH4pluUz/3795OYmGh0DBERERE5hb1799KwYcMTfu4W5TM4OBiw/zIhISEGpxERERGR/5WTk0NiYmJFbzsRtyifR0+1h4SEqHyKiIiIuLBTXSKpCUciIiIi4jQqnyIiIiLiNCqfIiIiIuI0bnHNp4iIiDif1WqlpKTE6BjiIry9vbFYLLU+jsqniIiIHKOkpISdO3ditVqNjiIuJCwsjNjY2Fqtu67yKSIiIpXYbDZSU1OxWCwkJiaedMFwqR9sNhsFBQVkZGQAEBcXV+NjqXyKiIhIJWVlZRQUFBAfH09AQIDRccRF+Pv7A5CRkUGDBg1qfApef5URERGRSsrLywHw8fExOIm4mqN/GSktLa3xMVQ+RURE5Lhqc12feCZH/JlQ+RQRERERp1H5FBEREamBJ554gk6dOjn8uCaTiWnTpjn8uK5C5VNEREQ8wg033IDJZOK222475rM777wTk8nEDTfc4LDve+CBB5gzZ47DjndUamoqF110kcOP6ypUPkVERMRjJCYmMmXKFAoLCyveKyoq4ssvv6RRo0YO/a6goCAiIyMdekyA2NhYfH19HX5cV6HyKSIiIh6jc+fOJCYm8v3331e89/3339OoUSNOO+20ivesVivjx48nOTkZf39/OnbsyLffflvx+dy5czGZTMyZM4euXbsSEBBAr1692Lx5c8U2/3va/YYbbmDgwIG8/PLLxMXFERkZyZ133llpZnhqaiqXXHIJ/v7+JCcn8+WXX5KUlMSECRMqtvnf0+5r167l3HPPxd/fn8jISG655Rby8vKO+d7nnnuOmJgYwsLCeOqppygrK+PBBx8kIiKChg0b8tFHH1X63+rhhx+mRYsWBAQE0KRJEx5//PFazWKvKq3zKSIiIidls9koLC035Lv9vS3VnmE9fPhwPvroI6699loAPvzwQ2688Ubmzp1bsc348eP5/PPPmTx5Ms2bN+fvv//muuuuIzo6mrPPPrtiu0cffZRXXnmF6OhobrvtNoYPH86CBQtO+N1//vkncXFx/Pnnn2zbto1BgwbRqVMnRowYAcDQoUM5ePAgc+fOxdvbm1GjRlUs3H48+fn59OvXj549e7Js2TIyMjK4+eabGTlyJB9//HHFdn/88QcNGzbk77//ZsGCBdx0000sXLiQs846iyVLljB16lRuvfVWzj//fBo2bAhAcHAwH3/8MfHx8axdu5YRI0YQHBzMQw89VK3/vatL5VNEREROqrC0nDZjZxny3Rue6keAT/XqynXXXceYMWPYvXs3AAsWLGDKlCkV5bO4uJjnnnuO2bNn07NnTwCaNGnC/PnzeeeddyqVz2effbbi59GjR3PJJZdQVFS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FOtio4NjdXg465XateT9etNQ9Tn72wVPztei1PXq9NDz8gvIKDK79WjaZxuHtBat078Rx/PSdXw41vJn92UAAB1xYz5Mo0zrhAULvk5dsfATz75RG3bttWZZ555wMdN8DsY0+V87rnn6pZbbtFVV12lBQsW6I477qjW57/wwgt69tln9dprr+mII46wuv5NWUz3vwm15R588EGNHTvWCsZmuUrTWhsVFWW9Pjw8XOeff75GjRqlV1991Xp+dna2tfrQSy+9ZLXums849dRTtWrVKut17oLwua/QaKnHsIPXWGyTsvC5tkYV3iSuuc58Y7I+uf98nfBDmgI/m6wFGzep2yvvyT/8v2WbDueUzom658sApWfla822PWqd4D5fKgCAlzHB84kk13z2vZvtw92q6Pvvv9+vi7ukpKTSbdOCaMLn3swYTTMG1DDjQjdt2nTA9zeB0bx2zJgx1m1zvWTLine truncated
|
||||||
"text/plain": [
|
"text/plain": [
|
||||||
"<Figure size 800x800 with 1 Axes>"
|
"<Figure size 800x800 with 1 Axes>"
|
||||||
]
|
]
|
||||||
@@ -1323,9 +1336,9 @@
|
|||||||
"metadata": {},
|
"metadata": {},
|
||||||
"source": [
|
"source": [
|
||||||
"## Publication Data\n",
|
"## Publication Data\n",
|
||||||
"The `Publication` data presented in Section~\\ref{sec:pub} can be\n",
|
"The `Publication` data presented in Section 11.5.4 can be\n",
|
||||||
"found in the `ISLP` package.\n",
|
"found in the `ISLP` package.\n",
|
||||||
"We first reproduce Figure~\\ref{fig:lauersurv} by plotting the Kaplan-Meier curves\n",
|
"We first reproduce Figure 11.5 by plotting the Kaplan-Meier curves\n",
|
||||||
"stratified on the `posres` variable, which records whether the\n",
|
"stratified on the `posres` variable, which records whether the\n",
|
||||||
"study had a positive or negative result."
|
"study had a positive or negative result."
|
||||||
]
|
]
|
||||||
@@ -1336,16 +1349,16 @@
|
|||||||
"id": "f8c1a98e",
|
"id": "f8c1a98e",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:40:29.993691Z",
|
"iopub.execute_input": "2026-02-05T00:46:59.544559Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:40:29.993598Z",
|
"iopub.status.busy": "2026-02-05T00:46:59.544431Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:40:30.079014Z",
|
"iopub.status.idle": "2026-02-05T00:46:59.618015Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:40:30.078774Z"
|
"shell.execute_reply": "2026-02-05T00:46:59.617523Z"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"outputs": [
|
"outputs": [
|
||||||
{
|
{
|
||||||
"data": {
|
"data": {
|
||||||
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAp8AAAKnCAYAAADAwSbIAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8g+/7EAAAACXBIWXMAAA9hAAAPYQGoP6dpAABxNUlEQVR4nO3de3ycdZ33//d1mFPSJik90lJoK62lgBRbqKWwwFpB1p+77CI3i3Up6OLDLtwqvRGFFSq6UmER0ZWlri6w9+0BdW/c2wVEsNKyYBFoxYUWKNCWcuoJ2iRN5nQdfn9MZjKTzCQzkzkmr+fjcWlyzXVd882Vknzyvb6fz8fwfd8XAAAAUANmvQcAAACAsYPgEwAAADVD8AkAAICaIfgEAABAzRB8AgAAoGYIPgEAAFAzBJ8AAACoGYJPAAAA1Ixd7wEUw/M8vfXWWxo/frwMw6j3cAAAADCA7/vq7u7W9OnTZZqF5zebIvh86623NHPmzHoPAwAAAMN4/fXXddRRRxV8vSmCz/Hjx0tKfTFtbW11Hg0AAAAG6urq0syZMzNxWyFNEXymH7W3tbURfAIAADSw4ZZIknAEAACAmiH4BAAAQM0QfAIAAKBmmmLNJwAAGD1c11Uymaz3MFAiy7Jk2/aIy14SfAIAgJo5fPiw3njjDfm+X++hoAwtLS068sgjFQwGy74GwScAAKgJ13X1xhtvqKWlRZMnT6ZxTBPxf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zZhiAyz3tboqgzPaAV155Rf39/aOhd7o9RKfCafdpiNvSsjnS2u2FP55ODerPf92qgxbMUizWlfOBkc3A7P8EAKAlmT2fF154oa677rowCJoVTFP1vn79es2ePVtHHnlkuDqaXam89NJLw9ZJXV1d4crnrbfeOloE9MMf/jDcF3rooYfqmGOO0T/8wz+E4bYYs3/09ttvD/ehmhZNpm2TaRhfrr/9278NtwNkZfeoTjbJshqsoNafoQr6+vrCNgLmLwnzV0TdmRnt636hoUi3Hn8pqa6Yo7iT3aMhJUdWvoc96UP3DOupxAcmPseey6RTviD151TXsf8TANBBzFQdE9RMP8xEIuc0Idria1hqXqPJfJX6foYLine truncated
|
||||||
"text/plain": [
|
"text/plain": [
|
||||||
"<Figure size 800x800 with 1 Axes>"
|
"<Figure size 800x800 with 1 Axes>"
|
||||||
]
|
]
|
||||||
@@ -1381,10 +1394,10 @@
|
|||||||
"id": "cd1ed9ac",
|
"id": "cd1ed9ac",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:40:30.080486Z",
|
"iopub.execute_input": "2026-02-05T00:46:59.619503Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:40:30.080397Z",
|
"iopub.status.busy": "2026-02-05T00:46:59.619380Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:40:30.111760Z",
|
"iopub.status.idle": "2026-02-05T00:46:59.652204Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:40:30.111406Z"
|
"shell.execute_reply": "2026-02-05T00:46:59.651713Z"
|
||||||
},
|
},
|
||||||
"lines_to_next_cell": 2
|
"lines_to_next_cell": 2
|
||||||
},
|
},
|
||||||
@@ -1470,10 +1483,10 @@
|
|||||||
"id": "d53335b0",
|
"id": "d53335b0",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:40:30.113137Z",
|
"iopub.execute_input": "2026-02-05T00:46:59.653858Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:40:30.113022Z",
|
"iopub.status.busy": "2026-02-05T00:46:59.653722Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:40:30.146933Z",
|
"iopub.status.idle": "2026-02-05T00:46:59.696330Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:40:30.146681Z"
|
"shell.execute_reply": "2026-02-05T00:46:59.695757Z"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"outputs": [
|
"outputs": [
|
||||||
@@ -1593,7 +1606,7 @@
|
|||||||
"\n",
|
"\n",
|
||||||
"In this section, we will simulate survival data using the relationship\n",
|
"In this section, we will simulate survival data using the relationship\n",
|
||||||
"between cumulative hazard and\n",
|
"between cumulative hazard and\n",
|
||||||
"the survival function explored in Exercise \\ref{ex:all3}.\n",
|
"the survival function explored in Exercise 8.\n",
|
||||||
"Our simulated data will represent the observed\n",
|
"Our simulated data will represent the observed\n",
|
||||||
"wait times (in seconds) for 2,000 customers who have phoned a call\n",
|
"wait times (in seconds) for 2,000 customers who have phoned a call\n",
|
||||||
"center. In this context, censoring occurs if a customer hangs up\n",
|
"center. In this context, censoring occurs if a customer hangs up\n",
|
||||||
@@ -1614,10 +1627,10 @@
|
|||||||
"id": "582c992b",
|
"id": "582c992b",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:40:30.148205Z",
|
"iopub.execute_input": "2026-02-05T00:46:59.697982Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:40:30.148127Z",
|
"iopub.status.busy": "2026-02-05T00:46:59.697840Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:40:30.151319Z",
|
"iopub.status.idle": "2026-02-05T00:46:59.701582Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:40:30.151090Z"
|
"shell.execute_reply": "2026-02-05T00:46:59.701058Z"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
@@ -1652,10 +1665,10 @@
|
|||||||
"id": "f3367dad",
|
"id": "f3367dad",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:40:30.152366Z",
|
"iopub.execute_input": "2026-02-05T00:46:59.702856Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:40:30.152298Z",
|
"iopub.status.busy": "2026-02-05T00:46:59.702759Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:40:30.159456Z",
|
"iopub.status.idle": "2026-02-05T00:46:59.713355Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:40:30.159240Z"
|
"shell.execute_reply": "2026-02-05T00:46:59.712725Z"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
@@ -1684,10 +1697,10 @@
|
|||||||
"id": "fdfd2789",
|
"id": "fdfd2789",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:40:30.160732Z",
|
"iopub.execute_input": "2026-02-05T00:46:59.714824Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:40:30.160661Z",
|
"iopub.status.busy": "2026-02-05T00:46:59.714732Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:40:30.164225Z",
|
"iopub.status.idle": "2026-02-05T00:46:59.719225Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:40:30.163999Z"
|
"shell.execute_reply": "2026-02-05T00:46:59.718867Z"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"outputs": [
|
"outputs": [
|
||||||
@@ -1796,10 +1809,10 @@
|
|||||||
"id": "1a9b68c8",
|
"id": "1a9b68c8",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:40:30.165320Z",
|
"iopub.execute_input": "2026-02-05T00:46:59.720840Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:40:30.165249Z",
|
"iopub.status.busy": "2026-02-05T00:46:59.720735Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:40:30.181030Z",
|
"iopub.status.idle": "2026-02-05T00:46:59.723005Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:40:30.179683Z"
|
"shell.execute_reply": "2026-02-05T00:46:59.722537Z"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
@@ -1825,7 +1838,7 @@
|
|||||||
"risk that it will be answered at Center A; in other words, the wait\n",
|
"risk that it will be answered at Center A; in other words, the wait\n",
|
||||||
"times are a bit longer at Center B.\n",
|
"times are a bit longer at Center B.\n",
|
||||||
"\n",
|
"\n",
|
||||||
"Recall from Section~\\ref{Ch2-statlearn-lab:loading-data} the use of `lambda`\n",
|
"Recall from Section 2.3.7 the use of `lambda`\n",
|
||||||
"for creating short functions on the fly.\n",
|
"for creating short functions on the fly.\n",
|
||||||
"We use the function\n",
|
"We use the function\n",
|
||||||
"`sim_time()` from the `ISLP.survival` package. This function\n",
|
"`sim_time()` from the `ISLP.survival` package. This function\n",
|
||||||
@@ -1843,10 +1856,10 @@
|
|||||||
"id": "d2118fdd",
|
"id": "d2118fdd",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:40:30.185644Z",
|
"iopub.execute_input": "2026-02-05T00:46:59.724282Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:40:30.185283Z",
|
"iopub.status.busy": "2026-02-05T00:46:59.724172Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:40:30.249849Z",
|
"iopub.status.idle": "2026-02-05T00:46:59.726062Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:40:30.249050Z"
|
"shell.execute_reply": "2026-02-05T00:46:59.725582Z"
|
||||||
},
|
},
|
||||||
"lines_to_next_cell": 0
|
"lines_to_next_cell": 0
|
||||||
},
|
},
|
||||||
@@ -1874,10 +1887,10 @@
|
|||||||
"id": "68304ba6",
|
"id": "68304ba6",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:40:30.262130Z",
|
"iopub.execute_input": "2026-02-05T00:46:59.727372Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:40:30.261849Z",
|
"iopub.status.busy": "2026-02-05T00:46:59.727267Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:40:30.398029Z",
|
"iopub.status.idle": "2026-02-05T00:46:59.827051Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:40:30.396818Z"
|
"shell.execute_reply": "2026-02-05T00:46:59.826636Z"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
@@ -1903,10 +1916,10 @@
|
|||||||
"id": "becf4cd2",
|
"id": "becf4cd2",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:40:30.410349Z",
|
"iopub.execute_input": "2026-02-05T00:46:59.834720Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:40:30.403028Z",
|
"iopub.status.busy": "2026-02-05T00:46:59.834516Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:40:30.435600Z",
|
"iopub.status.idle": "2026-02-05T00:46:59.840229Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:40:30.435349Z"
|
"shell.execute_reply": "2026-02-05T00:46:59.839638Z"
|
||||||
},
|
},
|
||||||
"lines_to_next_cell": 2
|
"lines_to_next_cell": 2
|
||||||
},
|
},
|
||||||
@@ -2011,17 +2024,17 @@
|
|||||||
"id": "e480331c",
|
"id": "e480331c",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:40:30.436950Z",
|
"iopub.execute_input": "2026-02-05T00:46:59.841579Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:40:30.436873Z",
|
"iopub.status.busy": "2026-02-05T00:46:59.841464Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:40:30.438955Z",
|
"iopub.status.idle": "2026-02-05T00:46:59.844198Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:40:30.438757Z"
|
"shell.execute_reply": "2026-02-05T00:46:59.843652Z"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"outputs": [
|
"outputs": [
|
||||||
{
|
{
|
||||||
"data": {
|
"data": {
|
||||||
"text/plain": [
|
"text/plain": [
|
||||||
"0.9075"
|
"np.float64(0.9075)"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"execution_count": 28,
|
"execution_count": 28,
|
||||||
@@ -2047,10 +2060,10 @@
|
|||||||
"id": "a194c96e",
|
"id": "a194c96e",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:40:30.439995Z",
|
"iopub.execute_input": "2026-02-05T00:46:59.845590Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:40:30.439929Z",
|
"iopub.status.busy": "2026-02-05T00:46:59.845474Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:40:30.560685Z",
|
"iopub.status.idle": "2026-02-05T00:46:59.958564Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:40:30.560280Z"
|
"shell.execute_reply": "2026-02-05T00:46:59.957930Z"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"outputs": [
|
"outputs": [
|
||||||
@@ -2066,7 +2079,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"data": {
|
"data": {
|
||||||
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAp8AAAK9CAYAAABijAc1AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8g+/7EAAAACXBIWXMAAA9hAAAPYQGoP6dpAAEAAElEQVR4nOzdd5gdZ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sADD2AYRq/3fvbZZxk6dCh2u51x48bx3//+N+v8unXruPbaaxk6dCgOh4PCwkK++c1v9jn+LBQK8b3vfY/CwkK8Xi+XXnopHR0dWWV2ZJzi1mM+FUUhGAzy1FNPpbuOL7/8cubOnYuiKLz88ss593juuedQFIUPP/xwm89as2YN3/zmNykoKMDpdHLsscfy2muvpc9vHg5hGAYzZsxIP78vq1evBuD444/POWe32/F6vYD5c5wxY0b6/ba+79ZjPveGsrIygJxAf9myZZx//vkUFBRgt9s5+uij+ec//5lVprcxn5MmTWLkyJEsWbKEyZMn43Q6qays5P7778959rp16zj77LNxuVyUlJSkhzXs6DjSzz77jKlTp+L1enG73ZxyyinMmzcvq8zmn93777/PLbfcQnFxMS6Xi/POO4+WlpYd/C7tnJ39G9zS4sWLOfnkk3E4HPTr149f/OIXpFKpvVJPIQ5kB1bTgxCHoc3BTGFhYfpYIpFgypQpnHDCCTzwwAM4nU4Mw+Dss89m7ty5fPe732XMmDG88cYb/OAHP6C+vp7f/e53Wfd95513eOGFF7jxxhux2Wz84Q9/4Ktf/Srz589n5MiRAHz88cd88MEHTJs2jX79+lFXV8cjjzzCpEmTWLJkSc4wgOuvv568vDzuuusuli9fziOPPMK6devSgcquevrpp7nyyisZP348V199NQCDBg3i2GOPpaqqimeffZbzzjsv65pnn32WQYMGMWHChD7v29TUxHHHHUcoFOLGG2+ksLCQp556irPPPpsXX3yR8847j4kTJ/L0009zySWXcNppp3HppZdus67V1dUA/PWvf+UnP/lJn+/9ve99j02bNvHWW2/x9NNP78y3Y5fE4/H02MVIJMJnn33Gb3/7WyZOnMiAAQPS5RYvXszxxx9PZWUlP/rRj3C5XPz973/n3HPP5aWXXsr5Pm+to6ODr371q3z961/nggsu4MUXX+S2225j1KhRTJ06FTADtJNPPpmGhgZuuukmysrKeO6555g7d+4OvcvixYs58cQT8Xq9/PCHP0TXdR599FEmTZrEO++8wzHHHJNV/oYbbiA/P58777yTuro6HnzwQa6//npeeOGFHXpeX+Nitw4Md/Z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OTB8vLy/noosu4r333qO7uzvrmquvvjqrBfrEE08kmUyybt267T4P4KWXXkp/77b8lJaWZpXb2b/Bra899thjGT9+fPpYcXFxekiNEIcT6XYXYh+bMWMGQ4YMwWKxUFpaytChQ1HV7H8HWiwW+vXrl3Vs3bp1VFRU4PF4so4PHz48fX5LvU0wGTJkCKFQiJaWFsrKygiHw9x33308+eST1NfXZ41b6+rqyrl+63u63W7Ky8v3ao7CYcOG8ZWvfIVnn32W7373u4DZ5X7ssccyePDgbV67bt26nC5ayP6ebR6CsDN8Ph/3338/999/P+vWrWP27Nk88MADPPzww/h8Pn7xi1/s9D13V1FREaeeemp6/8wzz2To0KGcf/75PPbYY9xwww2sWrUKwzC44447uOOOO3q9T3Nzc84/hLbUr1+/nKEG+fn5fPHFF+n9devWMWjQoJxy2/t5AbS0tBAKhRg6dGjOueHDh5NKpdiwYQNHHHFE+nj//v1z6gPkjEfuy8SJEykqKso5vvWEq539G9z62t5+F3t7TyEOdRJ8CrGPjR8/Pj3bvS82my0nIN0bbrjhBp588kmmT5/OhAkT8Pl8KIrCtGnTDqiJEJdeeik33XQTGzduJBqNMm/ePB5++OH9XS3AHAP6ne98h/POO4+BAwfy7LPP7pfgszennHIKAP/973+54YYb0j/T73//+0yZMqXXa7YXIGqa1utxYwcm3OwtB2KdhBB9k+BTiINEdXU1//nPf/D7/VktL8uWLUuf39LKlStz7rFixQqcTifFxcUAvPjii1x22WX85je/SZeJRCJ0dnb2WoeVK1cyefLk9H4gEKChoYEzzjhjl99rs21NWJo2bRq33HILf/vb3wiHw+i6zre+9a3t3rO6uprly5fnHO/re7Y78vPzGTRoEIsWLUof29+rOCUSCcD8OQHpbmxd17NaSfe06upqlixZgmEYWd+DVatWbffa4uJinE5nnz83VVWpqqrao/XdUTv7N7j1tb39Tfb2nkIc6mTMpxAHiTPOOINkMpnT4ve73/0ORVHSM403+/DDD7PGbW7YsIFXXnmF008/Pd1SpGlaTuvQ73//+/SY0K396U9/Ih6Pp/cfeeQREol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tnhMV/72tfwpS99qSz4FCOPZ599NvaFxx9/HO9///vxhS98YczjUqkUjjvuOKxZswYf+9jH8OlPf1oGo2+//Tb+/Oc/45xzzkFTU5M8Vvxcb7nllooBaCwWg6btvv8JFsHvtddeK7fF79Zrr70mR2+feuopvPzyyzt9PvEZxTWazebddo1ERAKDT6K97IwzzsAhhxwity+77DI5avajH/0I//znP3HBBRdUfE0kEpEjbJPBeIIVEXTtzsBrd+jp6YHX693hcWJ09vXXX8f//d//4cILLyx5TgR9yWRyXO8nRid3p+bmZlx00UWFx+J3y+l04oc//CHWr18vR0J3hqIou/0aiYjk/77wayDat0466SR5v3nzZnkv1omJoGHjxo14z3veA5fLhY985COFIFSMbrW0tMBisWD+/PkyuMjlchXPLQIkcYwIIpYvX46nn3665PmtW7fiqquuksfYbDYZCH/oQx8adf1ZNBrFJz/5SXmc2+3GRz/6UQwODpYcM551iiPXfIpt8dluv/32wtSx+B6eeOIJuX3PPfeUnUOMMornXnjhhTHfa9OmTfIzVVVVyZHlI444Ag888EDZcgjxHYpRyvz7j0b8XISjjz667DnxPYvvRRDXL86X/3wjzztyzeee0NDQIO9HBvpi1FaMMovvRFyz+MfQfffdt8M1n+LnKpYavPPOOzjxxBPl9ymC3ptuuqnsvcXv1vve9z75j6a6urrCsobxriMVAb74h5r4PsXfw8knn4wXX3yx5Jj8z+65557D5z//edTW1sr3E6PPvb292BN29m9wODE6Lv7exd/atGnT8J3vfAfZbHaPXCfRRDaxhh6I9kP5YEYEdHnpdBqnn346jjnmGPkfNvEfefEfN/EfcxGQfeITn5DTrOI/5mJdX3t7O3784x+XnFdMt/71r3/FNddcI/8j+b//+79yHaOYghUBhPDKK6/g+eefx/nnny//YyiCTrEMQAQZIsAYuQxArE8Vo4MiaFq7dq08VgQZ+UBlV4k1lmKk7rDDDsMVV1wh982ePVsGiuI/8iKIFgHFcGKfOObII48c9bxiLe1RRx0lg2bxPYjvWAS44nu866675DnF9LJ4/4svvhinnnqqDKjHMmPGDHn/xz/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Rs3XZh3tc+1p//rXv+T9kiVL5L0oeSQyxkXmuPhHw0i7qzyRGFUVyziGl28S/6j5zW9+s8PXit9J8TsqfleHL+cQlQtExrxYv5svZzXR/wZHvlaM2A8v+C++b/H7TLS/4cgn0SRx1llnyVHHr371q/I/yiKgEIkZ4j/SYtpcjLoNJ9YyiiBgeKkl4Vvf+lbhGNE6UJQBEtPtIhATQZoY2Rle9mk4UUBdTOWKhBUxYiPOKYKB4Yklu0okR4n3FuWBxLo6UR5o+Bo5MfUu1i8K3/72t8d1TlHSRoyWiqBAfA+irqUotSRqqookk11Z2iASUURJH/GZxbpTse5VJNvcdtttcknA8Nqd+YQv8d7iZyECKzGKuyeIYE8E5/mfkwiSRZApgnQx5T58zbH4mYnSSCIBSIyGisBO/OzFsgbxundLlJkSAZpomiCWS4h1wSLIyq+h3NGIsFi2IL5ncZ2iDq1YAy0+i/h+K9UUnah/g8OJklH5tq3iO8mXWhIjosPXyxLtF/Z1uj3R/iJfFuaVV14Z8zhRnkWUHapElAkSZWSamppyuq7L0jg/+MEPSsrMDC8b9Kc//UkeI0oVLVu2rKzEzeDgYO7SSy/N1dTU5JxOZ+7000/PrVmzpqxMTP7an3rqqdwVV1yR8/l88viPfOQjuf7+/pJz7mqpJfG+ooyOKDslnhtZdkmU9BHvK0rTiLI94yXK9YhSOF6vV5aaOuyww3L3339/2XHjLbW0adOm3Ne//vXcEUcckaurq5Mln2pra2VJnscff7zk2HQ6nfv0pz8tnxeleIZ/5j1ZaklRFHltF1xwQUn5n+HLine truncated
|
||||||
"text/plain": [
|
"text/plain": [
|
||||||
"<Figure size 800x800 with 1 Axes>"
|
"<Figure size 800x800 with 1 Axes>"
|
||||||
]
|
]
|
||||||
@@ -2099,10 +2112,10 @@
|
|||||||
"id": "3c9eae8a",
|
"id": "3c9eae8a",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:40:30.562105Z",
|
"iopub.execute_input": "2026-02-05T00:46:59.960115Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:40:30.561994Z",
|
"iopub.status.busy": "2026-02-05T00:46:59.960009Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:40:30.721091Z",
|
"iopub.status.idle": "2026-02-05T00:47:00.074116Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:40:30.720845Z"
|
"shell.execute_reply": "2026-02-05T00:47:00.073549Z"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"outputs": [
|
"outputs": [
|
||||||
@@ -2118,7 +2131,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"data": {
|
"data": {
|
||||||
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAp8AAAK9CAYAAABijAc1AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8g+/7EAAAACXBIWXMAAA9hAAAPYQGoP6dpAAEAAElEQVR4nOzdd5wdVfn48c/M3N6395ZKGgkthB6KhICUKFKkSxGFYCgiKAIqoiiK/gQRkaa0+AXBAkoNPSGhJaSSbNpms73dvb3N748h9+7N3rtJID3P+/XaV87MnJl75majD6c8R9F1XUcIIYQQQoidQN3VDRBCCCGEEPsOCT6FEEIIIcROI8GnEEIIIYTYaST4FEIIIYQQO40En0IIIYQQYqeR4FMIIYQQQuw0EnwKIYQQQoidRoJPIYQQQgix00jwKYQQQgghdhoJPoXYCymKwtVXX73dnvfoo4+iKAoffPDBFutOnTqVqVOnpo/Xrl2Loig8+uij6XO33347iqJst/ZtD21tbZx55pkUFRWhKAq/+93vdujnKYrC7bffnj7e9B2vXbs2fW7z73JneuONN1AUhTfeeGOXfP6err6+nosvvniL9XL9vQuxt5PgU4idZNP/yWz6sdlsjBo1iquvvpq2trZd3bxd7s477+T555/fZZ9/7bXX8tJLL3HzzTfzt7/9jZNOOilv3UAgwG233cb48eNxOp0UFRUxadIkvve977Fx48Z0vRdffD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Dgc1vfbb79Bz8zljDPO0C0Wi97Y2Jg+t3HjRt3tdutHH310+tym7+yEE07QU6lU+vy1116ra5qW9TuTy6bfw6F+TjnllHT9bfk3WFdXl/X7vOl38f3330+fa29v171e76C/dyH2djLsLsROdsIJJ1BSUkJNTQ3nnHMOLpeL5557jqqqqqx63/nOd7KOX3zxRTRN45prrsk6f/3116PrOv/973+zzh922GEcdNBB6ePa2lpOP/10XnrpJZLJJEBWr0s8Hqerq4sRI0bg8/n46KOPBrX9iiuuwGw2Z7XRZDLx4osvbuO3sPUuvPBCotEozzzzTPrc7NmzSSQSWXMcc3nxxReZPHkyRx55ZPqcy+XiiiuuYO3atSxdunSb22O323n//ff5/ve/DxhDv5deeikVFRXMnDmTaDS6zc/cHg499FBeeeUVXnnlFf7zn//w85//nCVLlnDaaacRDocBo4fv9ddf56yzzqK/v5/Ozk46Ozvp6upi2rRprFy5kubm5iE/x+VyZX3vFouFyZMns3r16vS5//3vf1RVVXHaaaelz9lsNi6//PItvkcymeTll1/mjDPOYNiwYenzFRUVfPOb3+Sdd97B7/dn3XPFFVdk9UAfddRRJJNJ1q1bt8XPA3j22WfT393An7Kysqx62/pvcPN7p0yZwuTJk9PnSkpK0lNqhNiXyLC7EDvZfffdx6hRozCZTJSVlTF69GhUNfu/A00mE9XV1Vnn1q1bR2VlJW63O+v8mDFj0tcHyrXAZNSoUYRCITo6OigvLyccDvOLX/yCRx55hObm5qx5a319fYPu3/yZLpeLioqKHZqjcL/99uOQQw7hiSee4NJLLwWMIfcpU6YwYsSIIe9dt27doCFayP7ONk1B2BZer5df/epX/OpXv2LdunW89tpr3H333dx77714vV7uuOOObX7ml1VcXMwJJ5yQPj7llFMYPXo0Z555Jn/5y1+YOXMmq1atQtd1fvzjH/PjH/8453Pa29sH/YfQQNXV1YOmGhQUFLBo0aL08bp16xg+fPigelv6+wLo6OggFAoxevToQdfGjBlDKpWiqamJcePGpc/X1tYOag8waD5yPkcffTTFxcWDzm++4Gpb/w1ufm+u38V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5q7X5axSWFfp9szNlmky8KsWLGi5HlUnoXKDimhMkFURqauri6l1WpFaZyf//zneWVmcssGPfLII+IcKlV00EEHFZS4GRoaSl1++eWpioqKlMViSZ122mmpTZs2FZSJSb/2119/PXX11VennE6nOP/iiy9ODQ4O5j3nRy21RD+XyuhQ2Sm6b2TZJSrpQz+XStNQ2Z7dReV6qBSOw+EQpaYOPfTQ1NNPP11w3u6WWmpra0vddtttqcMPPzxVVVUlSj5VVlaKkjyvvvpq3rnxeDx1ww03iPupFE/ue96bpZbUarV4bRdddFFe+Z/cz+TSSy8VJZLoe1RfX5/6xCc+kXr88cdHLbU0d+7cguej3xW9hpGfE30m9Puk9/+Nb3wj9cQLine truncated
|
||||||
"text/plain": [
|
"text/plain": [
|
||||||
"<Figure size 800x800 with 1 Axes>"
|
"<Figure size 800x800 with 1 Axes>"
|
||||||
]
|
]
|
||||||
@@ -2155,10 +2168,10 @@
|
|||||||
"id": "bb8a37eb",
|
"id": "bb8a37eb",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:40:30.722369Z",
|
"iopub.execute_input": "2026-02-05T00:47:00.075673Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:40:30.722280Z",
|
"iopub.status.busy": "2026-02-05T00:47:00.075534Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:40:30.737149Z",
|
"iopub.status.idle": "2026-02-05T00:47:00.155654Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:40:30.736914Z"
|
"shell.execute_reply": "2026-02-05T00:47:00.155035Z"
|
||||||
},
|
},
|
||||||
"lines_to_next_cell": 2
|
"lines_to_next_cell": 2
|
||||||
},
|
},
|
||||||
@@ -2262,10 +2275,10 @@
|
|||||||
"id": "e3299d19",
|
"id": "e3299d19",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:40:30.738404Z",
|
"iopub.execute_input": "2026-02-05T00:47:00.157114Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:40:30.738333Z",
|
"iopub.status.busy": "2026-02-05T00:47:00.156978Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:40:30.751890Z",
|
"iopub.status.idle": "2026-02-05T00:47:00.175601Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:40:30.751672Z"
|
"shell.execute_reply": "2026-02-05T00:47:00.175033Z"
|
||||||
},
|
},
|
||||||
"lines_to_next_cell": 2
|
"lines_to_next_cell": 2
|
||||||
},
|
},
|
||||||
@@ -2372,10 +2385,10 @@
|
|||||||
"id": "b9004e25",
|
"id": "b9004e25",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:40:30.753076Z",
|
"iopub.execute_input": "2026-02-05T00:47:00.177047Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:40:30.753002Z",
|
"iopub.status.busy": "2026-02-05T00:47:00.176929Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:40:30.859788Z",
|
"iopub.status.idle": "2026-02-05T00:47:00.305419Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:40:30.859420Z"
|
"shell.execute_reply": "2026-02-05T00:47:00.304956Z"
|
||||||
},
|
},
|
||||||
"lines_to_next_cell": 2
|
"lines_to_next_cell": 2
|
||||||
},
|
},
|
||||||
@@ -2477,10 +2490,10 @@
|
|||||||
"id": "1780384e",
|
"id": "1780384e",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:40:30.861381Z",
|
"iopub.execute_input": "2026-02-05T00:47:00.306869Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:40:30.861250Z",
|
"iopub.status.busy": "2026-02-05T00:47:00.306748Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:40:30.959129Z",
|
"iopub.status.idle": "2026-02-05T00:47:00.431990Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:40:30.958885Z"
|
"shell.execute_reply": "2026-02-05T00:47:00.431526Z"
|
||||||
},
|
},
|
||||||
"lines_to_next_cell": 2
|
"lines_to_next_cell": 2
|
||||||
},
|
},
|
||||||
@@ -2585,10 +2598,10 @@
|
|||||||
"id": "19f93f96",
|
"id": "19f93f96",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:40:30.960384Z",
|
"iopub.execute_input": "2026-02-05T00:47:00.433707Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:40:30.960309Z",
|
"iopub.status.busy": "2026-02-05T00:47:00.433586Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:40:31.098814Z",
|
"iopub.status.idle": "2026-02-05T00:47:00.570269Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:40:31.098085Z"
|
"shell.execute_reply": "2026-02-05T00:47:00.569715Z"
|
||||||
},
|
},
|
||||||
"lines_to_next_cell": 2
|
"lines_to_next_cell": 2
|
||||||
},
|
},
|
||||||
@@ -2719,7 +2732,7 @@
|
|||||||
"name": "python",
|
"name": "python",
|
||||||
"nbconvert_exporter": "python",
|
"nbconvert_exporter": "python",
|
||||||
"pygments_lexer": "ipython3",
|
"pygments_lexer": "ipython3",
|
||||||
"version": "3.11.4"
|
"version": "3.12.10"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nbformat": 4,
|
"nbformat": 4,
|
||||||
|
|||||||
+16
-16
@@ -164,7 +164,7 @@ for k in range(pcaUS.components_.shape[1]):
|
|||||||
USArrests.columns[k])
|
USArrests.columns[k])
|
||||||
|
|
||||||
```
|
```
|
||||||
Notice that this figure is a reflection of Figure~\ref{Ch10:fig:USArrests:obs} through the $y$-axis. Recall that the
|
Notice that this figure is a reflection of Figure 12.1 through the $y$-axis. Recall that the
|
||||||
principal components are only unique up to a sign change, so we can
|
principal components are only unique up to a sign change, so we can
|
||||||
reproduce that figure by flipping the
|
reproduce that figure by flipping the
|
||||||
signs of the second set of scores and loadings.
|
signs of the second set of scores and loadings.
|
||||||
@@ -241,7 +241,7 @@ ax.set_xticks(ticks)
|
|||||||
fig
|
fig
|
||||||
|
|
||||||
```
|
```
|
||||||
The result is similar to that shown in Figure~\ref{Ch10:fig:USArrests:scree}. Note
|
The result is similar to that shown in Figure 12.3. Note
|
||||||
that the method `cumsum()` computes the cumulative sum of
|
that the method `cumsum()` computes the cumulative sum of
|
||||||
the elements of a numeric vector. For instance:
|
the elements of a numeric vector. For instance:
|
||||||
|
|
||||||
@@ -253,15 +253,15 @@ np.cumsum(a)
|
|||||||
## Matrix Completion
|
## Matrix Completion
|
||||||
|
|
||||||
We now re-create the analysis carried out on the `USArrests` data in
|
We now re-create the analysis carried out on the `USArrests` data in
|
||||||
Section~\ref{Ch10:sec:princ-comp-with}.
|
Section 12.3.
|
||||||
|
|
||||||
We saw in Section~\ref{ch10:sec2.2} that solving the optimization
|
We saw in Section 12.2.2 that solving the optimization
|
||||||
problem~(\ref{Ch10:eq:mc2}) on a centered data matrix $\bf X$ is
|
problem~(12.6) on a centered data matrix $\bf X$ is
|
||||||
equivalent to computing the first $M$ principal
|
equivalent to computing the first $M$ principal
|
||||||
components of the data. We use our scaled
|
components of the data. We use our scaled
|
||||||
and centered `USArrests` data as $\bf X$ below. The *singular value decomposition*
|
and centered `USArrests` data as $\bf X$ below. The *singular value decomposition*
|
||||||
(SVD) is a general algorithm for solving
|
(SVD) is a general algorithm for solving
|
||||||
(\ref{Ch10:eq:mc2}).
|
(12.6).
|
||||||
|
|
||||||
```{python}
|
```{python}
|
||||||
X = USArrests_scaled
|
X = USArrests_scaled
|
||||||
@@ -319,9 +319,9 @@ Here the array `r_idx`
|
|||||||
contains 20 integers from 0 to 49; this represents the states (rows of `X`) that are selected to contain missing values. And `c_idx` contains
|
contains 20 integers from 0 to 49; this represents the states (rows of `X`) that are selected to contain missing values. And `c_idx` contains
|
||||||
20 integers from 0 to 3, representing the features (columns in `X`) that contain the missing values for each of the selected states.
|
20 integers from 0 to 3, representing the features (columns in `X`) that contain the missing values for each of the selected states.
|
||||||
|
|
||||||
We now write some code to implement Algorithm~\ref{Ch10:alg:hardimpute}.
|
We now write some code to implement Algorithm 12.1.
|
||||||
We first write a function that takes in a matrix, and returns an approximation to the matrix using the `svd()` function.
|
We first write a function that takes in a matrix, and returns an approximation to the matrix using the `svd()` function.
|
||||||
This will be needed in Step 2 of Algorithm~\ref{Ch10:alg:hardimpute}.
|
This will be needed in Step 2 of Algorithm 12.1.
|
||||||
|
|
||||||
```{python}
|
```{python}
|
||||||
def low_rank(X, M=1):
|
def low_rank(X, M=1):
|
||||||
@@ -330,7 +330,7 @@ def low_rank(X, M=1):
|
|||||||
return L.dot(V[:M])
|
return L.dot(V[:M])
|
||||||
|
|
||||||
```
|
```
|
||||||
To conduct Step 1 of the algorithm, we initialize `Xhat` --- this is $\tilde{\bf X}$ in Algorithm~\ref{Ch10:alg:hardimpute} --- by replacing
|
To conduct Step 1 of the algorithm, we initialize `Xhat` --- this is $\tilde{\bf X}$ in Algorithm 12.1 --- by replacing
|
||||||
the missing values with the column means of the non-missing entries. These are stored in
|
the missing values with the column means of the non-missing entries. These are stored in
|
||||||
`Xbar` below after running `np.nanmean()` over the row axis.
|
`Xbar` below after running `np.nanmean()` over the row axis.
|
||||||
We make a copy so that when we assign values to `Xhat` below we do not also overwrite the
|
We make a copy so that when we assign values to `Xhat` below we do not also overwrite the
|
||||||
@@ -360,11 +360,11 @@ a given element is `True` if the corresponding matrix element is missing. The no
|
|||||||
because it allows us to access both the missing and non-missing entries. We store the mean of the squared non-missing elements in `mss0`.
|
because it allows us to access both the missing and non-missing entries. We store the mean of the squared non-missing elements in `mss0`.
|
||||||
We store the mean squared error of the non-missing elements of the old version of `Xhat` in `mssold` (which currently
|
We store the mean squared error of the non-missing elements of the old version of `Xhat` in `mssold` (which currently
|
||||||
agrees with `mss0`). We plan to store the mean squared error of the non-missing elements of the current version of `Xhat` in `mss`, and will then
|
agrees with `mss0`). We plan to store the mean squared error of the non-missing elements of the current version of `Xhat` in `mss`, and will then
|
||||||
iterate Step 2 of Algorithm~\ref{Ch10:alg:hardimpute} until the *relative error*, defined as
|
iterate Step 2 of Algorithm 12.1 until the *relative error*, defined as
|
||||||
`(mssold - mss) / mss0`, falls below `thresh = 1e-7`.
|
`(mssold - mss) / mss0`, falls below `thresh = 1e-7`.
|
||||||
{Algorithm~\ref{Ch10:alg:hardimpute} tells us to iterate Step 2 until \eqref{Ch10:eq:mc6} is no longer decreasing. Determining whether \eqref{Ch10:eq:mc6} is decreasing requires us only to keep track of `mssold - mss`. However, in practice, we keep track of `(mssold - mss) / mss0` instead: this makes it so that the number of iterations required for Algorithm~\ref{Ch10:alg:hardimpute} to converge does not depend on whether we multiplied the raw data $\bf X$ by a constant factor.}
|
{Algorithm 12.1 tells us to iterate Step 2 until 12.14 is no longer decreasing. Determining whether 12.14 is decreasing requires us only to keep track of `mssold - mss`. However, in practice, we keep track of `(mssold - mss) / mss0` instead: this makes it so that the number of iterations required for Algorithm 12.1 to converge does not depend on whether we multiplied the raw data $\bf X$ by a constant factor.}
|
||||||
|
|
||||||
In Step 2(a) of Algorithm~\ref{Ch10:alg:hardimpute}, we approximate `Xhat` using `low_rank()`; we call this `Xapp`. In Step 2(b), we use `Xapp` to update the estimates for elements in `Xhat` that are missing in `Xna`. Finally, in Step 2(c), we compute the relative error. These three steps are contained in the following `while` loop:
|
In Step 2(a) of Algorithm 12.1, we approximate `Xhat` using `low_rank()`; we call this `Xapp`. In Step 2(b), we use `Xapp` to update the estimates for elements in `Xhat` that are missing in `Xna`. Finally, in Step 2(c), we compute the relative error. These three steps are contained in the following `while` loop:
|
||||||
|
|
||||||
```{python}
|
```{python}
|
||||||
while rel_err > thresh:
|
while rel_err > thresh:
|
||||||
@@ -393,7 +393,7 @@ np.corrcoef(Xapp[ismiss], X[ismiss])[0,1]
|
|||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
In this lab, we implemented Algorithm~\ref{Ch10:alg:hardimpute} ourselves for didactic purposes. However, a reader who wishes to apply matrix completion to their data might look to more specialized `Python`{} implementations.
|
In this lab, we implemented Algorithm 12.1 ourselves for didactic purposes. However, a reader who wishes to apply matrix completion to their data might look to more specialized `Python`{} implementations.
|
||||||
|
|
||||||
|
|
||||||
## Clustering
|
## Clustering
|
||||||
@@ -464,7 +464,7 @@ We have used the `n_init` argument to run the $K$-means with 20
|
|||||||
initial cluster assignments (the default is 10). If a
|
initial cluster assignments (the default is 10). If a
|
||||||
value of `n_init` greater than one is used, then $K$-means
|
value of `n_init` greater than one is used, then $K$-means
|
||||||
clustering will be performed using multiple random assignments in
|
clustering will be performed using multiple random assignments in
|
||||||
Step 1 of Algorithm~\ref{Ch10:alg:km}, and the `KMeans()`
|
Step 1 of Algorithm 12.2, and the `KMeans()`
|
||||||
function will report only the best results. Here we compare using
|
function will report only the best results. Here we compare using
|
||||||
`n_init=1` to `n_init=20`.
|
`n_init=1` to `n_init=20`.
|
||||||
|
|
||||||
@@ -480,7 +480,7 @@ kmeans1.inertia_, kmeans20.inertia_
|
|||||||
```
|
```
|
||||||
Note that `kmeans.inertia_` is the total within-cluster sum
|
Note that `kmeans.inertia_` is the total within-cluster sum
|
||||||
of squares, which we seek to minimize by performing $K$-means
|
of squares, which we seek to minimize by performing $K$-means
|
||||||
clustering \eqref{Ch10:eq:kmeans}.
|
clustering 12.17.
|
||||||
|
|
||||||
We *strongly* recommend always running $K$-means clustering with
|
We *strongly* recommend always running $K$-means clustering with
|
||||||
a large value of `n_init`, such as 20 or 50, since otherwise an
|
a large value of `n_init`, such as 20 or 50, since otherwise an
|
||||||
@@ -846,7 +846,7 @@ results in four distinct clusters. It is easy to verify that the
|
|||||||
resulting clusters are the same as the ones we obtained in
|
resulting clusters are the same as the ones we obtained in
|
||||||
`comp_cut`.
|
`comp_cut`.
|
||||||
|
|
||||||
We claimed earlier in Section~\ref{Ch10:subsec:hc} that
|
We claimed earlier in Section 12.4.2 that
|
||||||
$K$-means clustering and hierarchical clustering with the dendrogram
|
$K$-means clustering and hierarchical clustering with the dendrogram
|
||||||
cut to obtain the same number of clusters can yield very different
|
cut to obtain the same number of clusters can yield very different
|
||||||
results. How do these `NCI60` hierarchical clustering results compare
|
results. How do these `NCI60` hierarchical clustering results compare
|
||||||
|
|||||||
+2714
-290
File diff suppressed because it is too large.
Load diff
+13
-13
@@ -91,7 +91,7 @@ truth = pd.Categorical(true_mean == 0,
|
|||||||
|
|
||||||
```
|
```
|
||||||
Since this is a simulated data set, we can create a $2 \times 2$ table
|
Since this is a simulated data set, we can create a $2 \times 2$ table
|
||||||
similar to Table~\ref{Ch12:tab-hypotheses}.
|
similar to Table 13.2.
|
||||||
|
|
||||||
```{python}
|
```{python}
|
||||||
pd.crosstab(decision,
|
pd.crosstab(decision,
|
||||||
@@ -102,7 +102,7 @@ pd.crosstab(decision,
|
|||||||
```
|
```
|
||||||
Therefore, at level $\alpha=0.05$, we reject 15 of the 50 false
|
Therefore, at level $\alpha=0.05$, we reject 15 of the 50 false
|
||||||
null hypotheses, and we incorrectly reject 5 of the true null
|
null hypotheses, and we incorrectly reject 5 of the true null
|
||||||
hypotheses. Using the notation from Section~\ref{sec:fwer}, we have
|
hypotheses. Using the notation from Section 13.3, we have
|
||||||
$V=5$, $S=15$, $U=45$ and $W=35$.
|
$V=5$, $S=15$, $U=45$ and $W=35$.
|
||||||
We have set $\alpha=0.05$, which means that we expect to reject around
|
We have set $\alpha=0.05$, which means that we expect to reject around
|
||||||
5% of the true null hypotheses. This is in line with the $2 \times 2$
|
5% of the true null hypotheses. This is in line with the $2 \times 2$
|
||||||
@@ -140,12 +140,12 @@ pd.crosstab(decision,
|
|||||||
|
|
||||||
|
|
||||||
## Family-Wise Error Rate
|
## Family-Wise Error Rate
|
||||||
Recall from \eqref{eq:FWER.indep} that if the null hypothesis is true
|
Recall from 13.5 that if the null hypothesis is true
|
||||||
for each of $m$ independent hypothesis tests, then the FWER is equal
|
for each of $m$ independent hypothesis tests, then the FWER is equal
|
||||||
to $1-(1-\alpha)^m$. We can use this expression to compute the FWER
|
to $1-(1-\alpha)^m$. We can use this expression to compute the FWER
|
||||||
for $m=1,\ldots, 500$ and $\alpha=0.05$, $0.01$, and $0.001$.
|
for $m=1,\ldots, 500$ and $\alpha=0.05$, $0.01$, and $0.001$.
|
||||||
We plot the FWER for these values of $\alpha$ in order to
|
We plot the FWER for these values of $\alpha$ in order to
|
||||||
reproduce Figure~\ref{Ch12:fwer}.
|
reproduce Figure 13.2.
|
||||||
|
|
||||||
```{python}
|
```{python}
|
||||||
m = np.linspace(1, 501)
|
m = np.linspace(1, 501)
|
||||||
@@ -263,7 +263,7 @@ However, we decided to perform this test only after examining the data
|
|||||||
and noting that Managers One and Two had the highest and lowest mean
|
and noting that Managers One and Two had the highest and lowest mean
|
||||||
performances. In a sense, this means that we have implicitly
|
performances. In a sense, this means that we have implicitly
|
||||||
performed ${5 \choose 2} = 5(5-1)/2=10$ hypothesis tests, rather than
|
performed ${5 \choose 2} = 5(5-1)/2=10$ hypothesis tests, rather than
|
||||||
just one, as discussed in Section~\ref{tukey.sec}. Hence, we use the
|
just one, as discussed in Section 13.3.2. Hence, we use the
|
||||||
`pairwise_tukeyhsd()` function from
|
`pairwise_tukeyhsd()` function from
|
||||||
`statsmodels.stats.multicomp` to apply Tukey’s method
|
`statsmodels.stats.multicomp` to apply Tukey’s method
|
||||||
in order to adjust for multiple testing. This function takes
|
in order to adjust for multiple testing. This function takes
|
||||||
@@ -350,7 +350,7 @@ null hypotheses!
|
|||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
Figure~\ref{Ch12:fig:BonferroniBenjamini} displays the ordered
|
Figure 13.6 displays the ordered
|
||||||
$p$-values, $p_{(1)} \leq p_{(2)} \leq \cdots \leq p_{(2000)}$, for
|
$p$-values, $p_{(1)} \leq p_{(2)} \leq \cdots \leq p_{(2000)}$, for
|
||||||
the `Fund` dataset, as well as the threshold for rejection by the
|
the `Fund` dataset, as well as the threshold for rejection by the
|
||||||
Benjamini--Hochberg procedure. Recall that the Benjamini--Hochberg
|
Benjamini--Hochberg procedure. Recall that the Benjamini--Hochberg
|
||||||
@@ -379,7 +379,7 @@ else:
|
|||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
We now reproduce the middle panel of Figure~\ref{Ch12:fig:BonferroniBenjamini}.
|
We now reproduce the middle panel of Figure 13.6.
|
||||||
|
|
||||||
```{python}
|
```{python}
|
||||||
fig, ax = plt.subplots()
|
fig, ax = plt.subplots()
|
||||||
@@ -398,7 +398,7 @@ ax.axline((0, 0), (1,q/m), c='k', ls='--', linewidth=3);
|
|||||||
## A Re-Sampling Approach
|
## A Re-Sampling Approach
|
||||||
Here, we implement the re-sampling approach to hypothesis testing
|
Here, we implement the re-sampling approach to hypothesis testing
|
||||||
using the `Khan` dataset, which we investigated in
|
using the `Khan` dataset, which we investigated in
|
||||||
Section~\ref{sec:permutations}. First, we merge the training and
|
Section 13.5. First, we merge the training and
|
||||||
testing data, which results in observations on 83 patients for
|
testing data, which results in observations on 83 patients for
|
||||||
2,308 genes.
|
2,308 genes.
|
||||||
|
|
||||||
@@ -464,7 +464,7 @@ for b in range(B):
|
|||||||
This fraction, 0.0398,
|
This fraction, 0.0398,
|
||||||
is our re-sampling-based $p$-value.
|
is our re-sampling-based $p$-value.
|
||||||
It is almost identical to the $p$-value of 0.0412 obtained using the theoretical null distribution.
|
It is almost identical to the $p$-value of 0.0412 obtained using the theoretical null distribution.
|
||||||
We can plot a histogram of the re-sampling-based test statistics in order to reproduce Figure~\ref{Ch12:fig-permp-1}.
|
We can plot a histogram of the re-sampling-based test statistics in order to reproduce Figure 13.7.
|
||||||
|
|
||||||
```{python}
|
```{python}
|
||||||
fig, ax = plt.subplots(figsize=(8,8))
|
fig, ax = plt.subplots(figsize=(8,8))
|
||||||
@@ -487,7 +487,7 @@ ax.set_xlabel("Null Distribution of Test Statistic");
|
|||||||
The re-sampling-based null distribution is almost identical to the theoretical null distribution, which is displayed in red.
|
The re-sampling-based null distribution is almost identical to the theoretical null distribution, which is displayed in red.
|
||||||
|
|
||||||
Finally, we implement the plug-in re-sampling FDR approach outlined in
|
Finally, we implement the plug-in re-sampling FDR approach outlined in
|
||||||
Algorithm~\ref{Ch12:alg-plugin-fdr}. Depending on the speed of your
|
Algorithm 13.4. Depending on the speed of your
|
||||||
computer, calculating the FDR for all 2,308 genes in the `Khan`
|
computer, calculating the FDR for all 2,308 genes in the `Khan`
|
||||||
dataset may take a while. Hence, we will illustrate the approach on a
|
dataset may take a while. Hence, we will illustrate the approach on a
|
||||||
random subset of 100 genes. For each gene, we first compute the
|
random subset of 100 genes. For each gene, we first compute the
|
||||||
@@ -520,7 +520,7 @@ for j in range(m):
|
|||||||
Next, we compute the number of rejected null hypotheses $R$, the
|
Next, we compute the number of rejected null hypotheses $R$, the
|
||||||
estimated number of false positives $\widehat{V}$, and the estimated
|
estimated number of false positives $\widehat{V}$, and the estimated
|
||||||
FDR, for a range of threshold values $c$ in
|
FDR, for a range of threshold values $c$ in
|
||||||
Algorithm~\ref{Ch12:alg-plugin-fdr}. The threshold values are chosen
|
Algorithm 13.4. The threshold values are chosen
|
||||||
using the absolute values of the test statistics from the 100 genes.
|
using the absolute values of the test statistics from the 100 genes.
|
||||||
|
|
||||||
```{python}
|
```{python}
|
||||||
@@ -559,8 +559,8 @@ sorted(idx[np.abs(T_vals) >= cutoffs[FDRs < 0.2].min()])
|
|||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
The next line generates Figure~\ref{fig:labfdr}, which is similar
|
The next line generates Figure 13.11, which is similar
|
||||||
to Figure~\ref{Ch12:fig-plugin-fdr},
|
to Figure 13.9,
|
||||||
except that it is based on only a subset of the genes.
|
except that it is based on only a subset of the genes.
|
||||||
|
|
||||||
```{python}
|
```{python}
|
||||||
|
|||||||
+162
-152
@@ -5,6 +5,7 @@
|
|||||||
"id": "ec6b504d",
|
"id": "ec6b504d",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"source": [
|
"source": [
|
||||||
|
"\n",
|
||||||
"# Multiple Testing\n",
|
"# Multiple Testing\n",
|
||||||
"\n",
|
"\n",
|
||||||
"<a target=\"_blank\" href=\"https://colab.research.google.com/github/intro-stat-learning/ISLP_labs/blob/v2.2.1/Ch13-multiple-lab.ipynb\">\n",
|
"<a target=\"_blank\" href=\"https://colab.research.google.com/github/intro-stat-learning/ISLP_labs/blob/v2.2.1/Ch13-multiple-lab.ipynb\">\n",
|
||||||
@@ -31,10 +32,10 @@
|
|||||||
"id": "bd52a066",
|
"id": "bd52a066",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:40:41.491441Z",
|
"iopub.execute_input": "2026-02-05T00:47:11.395883Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:40:41.491149Z",
|
"iopub.status.busy": "2026-02-05T00:47:11.395786Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:40:42.558004Z",
|
"iopub.status.idle": "2026-02-05T00:47:12.446225Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:40:42.557613Z"
|
"shell.execute_reply": "2026-02-05T00:47:12.445607Z"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
@@ -61,10 +62,10 @@
|
|||||||
"id": "90117cbf",
|
"id": "90117cbf",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:40:42.560098Z",
|
"iopub.execute_input": "2026-02-05T00:47:12.448067Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:40:42.559789Z",
|
"iopub.status.busy": "2026-02-05T00:47:12.447887Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:40:42.562039Z",
|
"iopub.status.idle": "2026-02-05T00:47:12.450079Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:40:42.561801Z"
|
"shell.execute_reply": "2026-02-05T00:47:12.449643Z"
|
||||||
},
|
},
|
||||||
"lines_to_next_cell": 2
|
"lines_to_next_cell": 2
|
||||||
},
|
},
|
||||||
@@ -100,10 +101,10 @@
|
|||||||
"id": "db60f055",
|
"id": "db60f055",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:40:42.563289Z",
|
"iopub.execute_input": "2026-02-05T00:47:12.451638Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:40:42.563196Z",
|
"iopub.status.busy": "2026-02-05T00:47:12.451522Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:40:42.565237Z",
|
"iopub.status.idle": "2026-02-05T00:47:12.453650Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:40:42.565023Z"
|
"shell.execute_reply": "2026-02-05T00:47:12.453197Z"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
@@ -130,17 +131,17 @@
|
|||||||
"id": "2f769e32",
|
"id": "2f769e32",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:40:42.566311Z",
|
"iopub.execute_input": "2026-02-05T00:47:12.455030Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:40:42.566225Z",
|
"iopub.status.busy": "2026-02-05T00:47:12.454914Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:40:42.569835Z",
|
"iopub.status.idle": "2026-02-05T00:47:12.458734Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:40:42.569565Z"
|
"shell.execute_reply": "2026-02-05T00:47:12.458209Z"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"outputs": [
|
"outputs": [
|
||||||
{
|
{
|
||||||
"data": {
|
"data": {
|
||||||
"text/plain": [
|
"text/plain": [
|
||||||
"0.9307442156164141"
|
"np.float64(0.9307442156164141)"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"execution_count": 4,
|
"execution_count": 4,
|
||||||
@@ -177,10 +178,10 @@
|
|||||||
"id": "662e8a87",
|
"id": "662e8a87",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:40:42.570975Z",
|
"iopub.execute_input": "2026-02-05T00:47:12.460253Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:40:42.570881Z",
|
"iopub.status.busy": "2026-02-05T00:47:12.460153Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:40:42.590875Z",
|
"iopub.status.idle": "2026-02-05T00:47:12.484340Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:40:42.590643Z"
|
"shell.execute_reply": "2026-02-05T00:47:12.483841Z"
|
||||||
},
|
},
|
||||||
"lines_to_next_cell": 0
|
"lines_to_next_cell": 0
|
||||||
},
|
},
|
||||||
@@ -204,7 +205,7 @@
|
|||||||
"metadata": {},
|
"metadata": {},
|
||||||
"source": [
|
"source": [
|
||||||
"Since this is a simulated data set, we can create a $2 \\times 2$ table\n",
|
"Since this is a simulated data set, we can create a $2 \\times 2$ table\n",
|
||||||
"similar to Table~\\ref{Ch12:tab-hypotheses}."
|
"similar to Table 13.2."
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -213,10 +214,10 @@
|
|||||||
"id": "b25f9969",
|
"id": "b25f9969",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:40:42.592212Z",
|
"iopub.execute_input": "2026-02-05T00:47:12.486017Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:40:42.592128Z",
|
"iopub.status.busy": "2026-02-05T00:47:12.485891Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:40:42.600326Z",
|
"iopub.status.idle": "2026-02-05T00:47:12.494356Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:40:42.600082Z"
|
"shell.execute_reply": "2026-02-05T00:47:12.493847Z"
|
||||||
},
|
},
|
||||||
"lines_to_next_cell": 0
|
"lines_to_next_cell": 0
|
||||||
},
|
},
|
||||||
@@ -292,7 +293,7 @@
|
|||||||
"source": [
|
"source": [
|
||||||
"Therefore, at level $\\alpha=0.05$, we reject 15 of the 50 false\n",
|
"Therefore, at level $\\alpha=0.05$, we reject 15 of the 50 false\n",
|
||||||
"null hypotheses, and we incorrectly reject 5 of the true null\n",
|
"null hypotheses, and we incorrectly reject 5 of the true null\n",
|
||||||
"hypotheses. Using the notation from Section~\\ref{sec:fwer}, we have\n",
|
"hypotheses. Using the notation from Section 13.3, we have\n",
|
||||||
"$V=5$, $S=15$, $U=45$ and $W=35$.\n",
|
"$V=5$, $S=15$, $U=45$ and $W=35$.\n",
|
||||||
"We have set $\\alpha=0.05$, which means that we expect to reject around\n",
|
"We have set $\\alpha=0.05$, which means that we expect to reject around\n",
|
||||||
"5% of the true null hypotheses. This is in line with the $2 \\times 2$\n",
|
"5% of the true null hypotheses. This is in line with the $2 \\times 2$\n",
|
||||||
@@ -314,10 +315,10 @@
|
|||||||
"id": "4c158b0b",
|
"id": "4c158b0b",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:40:42.601626Z",
|
"iopub.execute_input": "2026-02-05T00:47:12.495749Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:40:42.601550Z",
|
"iopub.status.busy": "2026-02-05T00:47:12.495629Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:40:42.625065Z",
|
"iopub.status.idle": "2026-02-05T00:47:12.524219Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:40:42.624786Z"
|
"shell.execute_reply": "2026-02-05T00:47:12.523767Z"
|
||||||
},
|
},
|
||||||
"lines_to_next_cell": 0
|
"lines_to_next_cell": 0
|
||||||
},
|
},
|
||||||
@@ -400,7 +401,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "markdown",
|
"cell_type": "markdown",
|
||||||
"id": "4cc20385",
|
"id": "e672cce4",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"source": [
|
"source": [
|
||||||
" "
|
" "
|
||||||
@@ -412,12 +413,12 @@
|
|||||||
"metadata": {},
|
"metadata": {},
|
||||||
"source": [
|
"source": [
|
||||||
"## Family-Wise Error Rate\n",
|
"## Family-Wise Error Rate\n",
|
||||||
"Recall from \\eqref{eq:FWER.indep} that if the null hypothesis is true\n",
|
"Recall from 13.5 that if the null hypothesis is true\n",
|
||||||
"for each of $m$ independent hypothesis tests, then the FWER is equal\n",
|
"for each of $m$ independent hypothesis tests, then the FWER is equal\n",
|
||||||
"to $1-(1-\\alpha)^m$. We can use this expression to compute the FWER\n",
|
"to $1-(1-\\alpha)^m$. We can use this expression to compute the FWER\n",
|
||||||
"for $m=1,\\ldots, 500$ and $\\alpha=0.05$, $0.01$, and $0.001$.\n",
|
"for $m=1,\\ldots, 500$ and $\\alpha=0.05$, $0.01$, and $0.001$.\n",
|
||||||
"We plot the FWER for these values of $\\alpha$ in order to\n",
|
"We plot the FWER for these values of $\\alpha$ in order to\n",
|
||||||
"reproduce Figure~\\ref{Ch12:fwer}."
|
"reproduce Figure 13.2."
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -426,16 +427,16 @@
|
|||||||
"id": "093264ed",
|
"id": "093264ed",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:40:42.626420Z",
|
"iopub.execute_input": "2026-02-05T00:47:12.525786Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:40:42.626339Z",
|
"iopub.status.busy": "2026-02-05T00:47:12.525660Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:40:42.833591Z",
|
"iopub.status.idle": "2026-02-05T00:47:12.707622Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:40:42.832647Z"
|
"shell.execute_reply": "2026-02-05T00:47:12.707134Z"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"outputs": [
|
"outputs": [
|
||||||
{
|
{
|
||||||
"data": {
|
"data": {
|
||||||
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAjcAAAG1CAYAAAAFuNXgAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8g+/7EAAAACXBIWXMAAA9hAAAPYQGoP6dpAAB/j0lEQVR4nO3deVwU9R/H8dfucglyCAgIInhfKHjnlVooqWlWmmmlmfXL8irUyjKvyis1M+0+zErTrCyPvMgr81a8wftCTlHuc3d+f6yukqiAi7Msn+fjsQ9nZ78z+15Ydz/MfOf71SiKoiCEEEIIYSW0agcQQgghhDAnKW6EEEIIYVWkuBFCCCGEVZHiRgghhBBWRYobIYQQQlgVKW6EEEIIYVWkuBFCCCGEVZHiRgghhBBWxUbtAPebwWDg0qVLODs7o9Fo1I4jhBBCiCJQFIW0tDR8fX3Rau98bKbcFTeXLl3C399f7RhCCCGEKIELFy5QtWrVO7Ypd8WNs7MzYPzhuLi4qJxGCCGEEEWRmpqKv7+/6Xv8TspdcXP9VJSLi4sUN0IIIUQZU5QuJdKhWAghhBBWRYobIYQQQliVcndaqqj0ej15eXlqxxD3wNbWFp1Op3YMIYQQ95kUN/+hKApxcXFcvXpV7SjCDNzc3PDx8ZHL/oUQohyR4uY/rhc2Xl5eODo6ypdiGaUoCpmZmSQkJABQpUoVlRMJIYS4X6S4uYlerzcVNh4eHmrHEfeoQoUKACQkJODl5SWnqIQQopyQDsU3ud7HxtHRUeUkwlyu/y6l/5QQQpQfUtwUQk5FWQ/5XQohRPkjxY0QQgghrIqqxc2WLVvo0aMHvr6+aDQali9fftdtNm3aRNOmTbG3t6dWrVosWLCg1HMKIYQQouxQtbjJyMggODiY+fPnF6n9mTNn6N69O506dSIyMpLXXnuNF198kbVr15ZyUiGEEEKUFaoWN127duX999/n8ccfL1L7zz//nOrV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6h1tthOLFi8uNiExXbFI6+v58CGdvxcHGygKfdaiOd5pX4Nw1pi4tCfj73QfrQrUeBzz/CWRfI+UJg5unsXHUt6Ao9dx5dP78efmzXr16WedCQkLQqFEj1KpV65HrRbeU2J7k3LlzKFu2bI5znp6esLKyQkSE/ltiJnFcsmTJXB+nIPchoqe32Lzxy2EZ2Hg42eK3AQ1Ru4w7q83UJUYLine truncated
|
||||||
"text/plain": [
|
"text/plain": [
|
||||||
"<Figure size 640x480 with 1 Axes>"
|
"<Figure size 640x480 with 1 Axes>"
|
||||||
]
|
]
|
||||||
@@ -482,10 +483,10 @@
|
|||||||
"id": "1a3ac106",
|
"id": "1a3ac106",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:40:42.838668Z",
|
"iopub.execute_input": "2026-02-05T00:47:12.709270Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:40:42.838263Z",
|
"iopub.status.busy": "2026-02-05T00:47:12.709124Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:40:42.909564Z",
|
"iopub.status.idle": "2026-02-05T00:47:12.749413Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:40:42.909245Z"
|
"shell.execute_reply": "2026-02-05T00:47:12.748911Z"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"outputs": [
|
"outputs": [
|
||||||
@@ -550,10 +551,10 @@
|
|||||||
"id": "b9f1eac7",
|
"id": "b9f1eac7",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:40:42.911009Z",
|
"iopub.execute_input": "2026-02-05T00:47:12.750978Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:40:42.910932Z",
|
"iopub.status.busy": "2026-02-05T00:47:12.750865Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:40:42.913088Z",
|
"iopub.status.idle": "2026-02-05T00:47:12.753234Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:40:42.912887Z"
|
"shell.execute_reply": "2026-02-05T00:47:12.752822Z"
|
||||||
},
|
},
|
||||||
"lines_to_next_cell": 2
|
"lines_to_next_cell": 2
|
||||||
},
|
},
|
||||||
@@ -589,10 +590,10 @@
|
|||||||
"id": "0cee9c30",
|
"id": "0cee9c30",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:40:42.914211Z",
|
"iopub.execute_input": "2026-02-05T00:47:12.754593Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:40:42.914139Z",
|
"iopub.status.busy": "2026-02-05T00:47:12.754488Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:40:42.916323Z",
|
"iopub.status.idle": "2026-02-05T00:47:12.756997Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:40:42.916073Z"
|
"shell.execute_reply": "2026-02-05T00:47:12.756504Z"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"outputs": [
|
"outputs": [
|
||||||
@@ -631,10 +632,10 @@
|
|||||||
"id": "1f7cee90",
|
"id": "1f7cee90",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:40:42.917445Z",
|
"iopub.execute_input": "2026-02-05T00:47:12.758332Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:40:42.917375Z",
|
"iopub.status.busy": "2026-02-05T00:47:12.758215Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:40:42.957649Z",
|
"iopub.status.idle": "2026-02-05T00:47:12.803498Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:40:42.957396Z"
|
"shell.execute_reply": "2026-02-05T00:47:12.802980Z"
|
||||||
},
|
},
|
||||||
"lines_to_next_cell": 2
|
"lines_to_next_cell": 2
|
||||||
},
|
},
|
||||||
@@ -671,10 +672,10 @@
|
|||||||
"id": "59cdfe23",
|
"id": "59cdfe23",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:40:42.958881Z",
|
"iopub.execute_input": "2026-02-05T00:47:12.804910Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:40:42.958809Z",
|
"iopub.status.busy": "2026-02-05T00:47:12.804803Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:40:42.961378Z",
|
"iopub.status.idle": "2026-02-05T00:47:12.807904Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:40:42.961187Z"
|
"shell.execute_reply": "2026-02-05T00:47:12.807476Z"
|
||||||
},
|
},
|
||||||
"lines_to_next_cell": 2
|
"lines_to_next_cell": 2
|
||||||
},
|
},
|
||||||
@@ -715,17 +716,17 @@
|
|||||||
"id": "bf01100e",
|
"id": "bf01100e",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:40:42.962467Z",
|
"iopub.execute_input": "2026-02-05T00:47:12.809286Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:40:42.962393Z",
|
"iopub.status.busy": "2026-02-05T00:47:12.809187Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:40:42.964706Z",
|
"iopub.status.idle": "2026-02-05T00:47:12.812089Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:40:42.964522Z"
|
"shell.execute_reply": "2026-02-05T00:47:12.811573Z"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"outputs": [
|
"outputs": [
|
||||||
{
|
{
|
||||||
"data": {
|
"data": {
|
||||||
"text/plain": [
|
"text/plain": [
|
||||||
"0.038391072368079586"
|
"np.float64(0.038391072368079586)"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"execution_count": 14,
|
"execution_count": 14,
|
||||||
@@ -750,7 +751,7 @@
|
|||||||
"and noting that Managers One and Two had the highest and lowest mean\n",
|
"and noting that Managers One and Two had the highest and lowest mean\n",
|
||||||
"performances. In a sense, this means that we have implicitly\n",
|
"performances. In a sense, this means that we have implicitly\n",
|
||||||
"performed ${5 \\choose 2} = 5(5-1)/2=10$ hypothesis tests, rather than\n",
|
"performed ${5 \\choose 2} = 5(5-1)/2=10$ hypothesis tests, rather than\n",
|
||||||
"just one, as discussed in Section~\\ref{tukey.sec}. Hence, we use the\n",
|
"just one, as discussed in Section 13.3.2. Hence, we use the\n",
|
||||||
"`pairwise_tukeyhsd()` function from\n",
|
"`pairwise_tukeyhsd()` function from\n",
|
||||||
"`statsmodels.stats.multicomp` to apply Tukey’s method\n",
|
"`statsmodels.stats.multicomp` to apply Tukey’s method\n",
|
||||||
" in order to adjust for multiple testing. This function takes\n",
|
" in order to adjust for multiple testing. This function takes\n",
|
||||||
@@ -767,10 +768,10 @@
|
|||||||
"id": "60146e08",
|
"id": "60146e08",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:40:42.965724Z",
|
"iopub.execute_input": "2026-02-05T00:47:12.813422Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:40:42.965661Z",
|
"iopub.status.busy": "2026-02-05T00:47:12.813318Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:40:43.337336Z",
|
"iopub.status.idle": "2026-02-05T00:47:13.280056Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:40:43.337101Z"
|
"shell.execute_reply": "2026-02-05T00:47:13.279564Z"
|
||||||
},
|
},
|
||||||
"lines_to_next_cell": 2
|
"lines_to_next_cell": 2
|
||||||
},
|
},
|
||||||
@@ -827,16 +828,16 @@
|
|||||||
"id": "2ec0aae4",
|
"id": "2ec0aae4",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:40:43.338635Z",
|
"iopub.execute_input": "2026-02-05T00:47:13.281827Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:40:43.338557Z",
|
"iopub.status.busy": "2026-02-05T00:47:13.281689Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:40:43.400697Z",
|
"iopub.status.idle": "2026-02-05T00:47:13.334077Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:40:43.400471Z"
|
"shell.execute_reply": "2026-02-05T00:47:13.333519Z"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"outputs": [
|
"outputs": [
|
||||||
{
|
{
|
||||||
"data": {
|
"data": {
|
||||||
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAy0AAAIQCAYAAACMg4HBAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8g+/7EAAAACXBIWXMAAA9hAAAPYQGoP6dpAAA9PElEQVR4nO3de1yUdf7//+eICchhPKGikBhuHlPLykxB8ZinVMJzamZlfbST28ndWx4qw87SybR2Zdc0TUPdTPNQKlRr6yFbc9N006+CqHgCoUIb3r8//DHrCCigMG/xcb/d5nZzrnlfc72uay7Gec71fr/HYYwxAgAAAABLVfJ2AQAAAABwIYQWAAAAAFYjtAAAAACwGqEFAAAAgNUILQAAAACsRmgBAAAAYDVCCwAAAACrEVoAAAAAWI3QAgAAAMBqhBaggpkyZYocDkex2iYmJsrhcGjfvn0l3s769evlcDi0fv36Eq+LonXq1EmdOnXydhmwWGF/t944by7l/aOksrOzVbt2bc2bN++yP3f+fmzevPmyP3dRjh07poCAAK1YsaLctglc6QgtQDnK/8/R4XDoq6++KvC4MUbh4eFyOBzq06fPZdvuiy++qKVLl1625ytLWVlZmjp1qlq1aqXAwED5+/urRYsWevrpp3Xw4EFvl4eL6NSpk/scdzgcqlKliho2bKgHHnhABw4cKNVzHjx4UFOmTNG2bdsub7GWuvXWW+VwODRz5szL/twREREer0/t2rUVFRWlJUuWXPZtXU4JCQkKCgrSkCFDtG/fPo99uNCtPAJVadSsWVP33Xefnn32WW+XAlwxKnu7AOBq5Ofnp/nz56tDhw4eyzds2KDU1FT5+vpe1u29+OKLiouLU//+/T2WjxgxQkOGDLns2yutn3/+WV27dtX+/fs1cOBAPfDAA6pSpYr+/e9/6y9/+YuWLFmin376ydtllqnVq1d7u4RLFhYWpvj4eEnS6dOn9Z///EfvvfeeVq1apR9//FFVq1Yt0fMdPHhQU6dOVUREhFq3bl0GFdtj9+7d2rRpkyIiIjRv3jw99NBDl30brVu31h//+EdJZ4/trFmzFBsbq5kzZ+rBBx8s9vOU1/vHmTNnlJCQoMcff1w+Pj4KCQnR3LlzPdq89tprSk1N1RtvvOGxPCQkpExruxQPPvig3nzzTX355Zfq3Lmzt8sBrEdoAbygV69eWrRokd58801Vrvy/P8P58+erTZs2Onr0aLnU4ePjIx8fn3LZ1sX8/vvvio2N1eHDh7V+/foCgW7atGl66aWXvFRd2fvll19UtWpVValSxdulXDKn06m7777bY1nDhg01fvx4ff311+rWrZuXKrPfhx9+qNq1a+u1115TXFyc9u3bp4iIiMu6jfr163u8PiNHjlSjRo30xhtvlCi0FOf9wxij3377Tf7+/qWud/ny5crIyNCgQYMkSQEBAQXOrwULFujEiRMFltusadOmatGihRITEwktQDHQPQzwgqFDh+rYsWNas2aNe9np06e1ePFiDRs2rED7osaP5HeTSExMLHJbDodDOTk5+tvf/ubuMnHPPfdIKrxPekREhPr06aPVq1erdevW8vPzU7NmzZSUlFSsffv22291xx13yOl0qmrVqurYsaO+/vrri673ySef6Pvvv9ef//znAoFFkoKDgzVt2jSPZYsWLVKbNm3k7++vWrVq6e6771ZaWppHm3vuuUeBgYHav3+/+vTpo8DAQNWvX1/vvPOOJGn79u3q3LmzAgIC1KBBA82fP99j/fxjlJycrLFjx6pmzZoKDg7WyJEjdeLECY+2y5YtU+/evVWvXj35+voqMjJSzz//vFwul0e7Tp06qUWLFtqyZYuio6NVtWpV/elPf3I/dv7YhLfeekvNmzdX1apVVb16dd18880F6vzuu+/Us2dPBQcHKzAwUF26dNHGjRsL3Zevv/5aEyZMUEhIiAICAjRgwABlZGR4tN28ebN69OihWrVqyd/fXw0bNtS9995b4HUprrp160qSR0iXpLS0NN17772qU6eOfH191bx5c/31r391P75+/XrdcsstkqTRo0e7z+HExES9+eab8vHx0cmTJ93tX3vtNTkcDk2YMMG9zOVyKSgoSE8//bR7WV5enmbMmKHmzZvLz89PderU0dixYwu8ppK0cuVKRUVFKSAgQEFBQerdu7d27Njh0Sb/PEtLS1P//v0VGBiokJAQPfHEEwVe/wuZP3++4uLi1KdPHzmdzgKvc1moW7eumjZtqr1790qS/v3vf+uee+7RddddJz8/P9WtW1f33nuvjh075rHehd4/Vq1apZtvvln+/v6aNWuWJGnNmjXq0KGDqlWrpsDAQDVu3Nh93l/I0qVLFRERocjIyBLtl8Ph0JQpUwosj4iIcL8HFuXEiRO69dZbFRYWpl27dkmScnNzNXnyZDVq1Ei+vr4KDw/XU089pdzcXPd6HTt2VKtWrQp9zsaNG6tHjx4ey7p166ZPP/1UxpgS7RtwNSK0AF4QERGhdu3a6aOPPnIvW7lypTIzMzVkyJDLuq25c+fK19dXUVFRmjt3rubOnauxY8decJ3du3dr8ODB6tmzp+Lj41W5cmUNHDjQI2QV5ssvv1R0dLSysrI0efJkvfjiizp58qQ6d+6sf/3rXxdc9x//+Ieks11OiiMxMVGDBg2Sj4+P4uPjdf/99yspKUkdOnTw+BArnf3Q2rNnT4WHh+vll19WRESExo8fr8TERN1xxx26+eab9dJLLykoKEgjR450f3g71/jx4/Xjjz9qypQpGjlypObNm6f+/ft7fNhITExUYGCgJkyYoISEBLVp00aTJk3SM888U+D5jh07pp49e6p169aaMWOGYmJiCt3P999/X4888oiaNWumGTNmaOrUqWrdurW+/fZbd5sdO3YoKipK33//vZ566ik9++yz2rt3rzp16uTRLt/DDz+s77//XpMnT9ZDDz2kTz/9VOPHj3c/fuTIEXXv3l379u3TM888o7feekvDhw8vEIKK4nK5dPToUR09elTp6en68ssv3R/22rdv7253+PBh3XbbbVq7dq3Gjx+vhIQENWrUSGPGjNGMGTMknf02+rnnnpMkPfDAA+5zODo6WlFRUcrLy/MYH5aSkqJKlSopJSXFvey7775Tdna2oqOj3cvGjh2rJ598Uu3bt1dCQoJGjx6tefPmqUePHjpz5oy73dy5c9W7d28FBgbqpZde0rPPPqv//Oc/6tChQ4HxEi6XSz169FDNmjX16quvqmPHjnrttdc0e/bsYh23b7/9Vnv27NHQoUNVpUoVxcbGlsnA8/OdOXNGBw4cUM2aNSWdDRc///yzRo8erbfeektDhgzRggUL1KtXr2J9uN61a5eGDh2qbt26KSEhQa1bt9aOHTvUp08f5ebm6rnnntNrr72mO++8s1hfaHzzzTe66aabLnk/i+vo0aPq3LmzDh8+rA0bNqhx48bKy8vTnXfeqVdffVV9+/bVW2+9pf79++uNN97Q4MGD3euOGDFC//73v/XDDz94POemTZv0008/FbgS1KZNG508ebJACAZQCAOg3MyZM8dIMps2bTJvv/22CQoKMr/88osxxpiBAweamJgYY4wxDRo0ML1793avt27dOiPJrFu3zuP59u7daySZOXPmuJdNnjzZnP+nHRAQYEaNGlVkPXv37nUva9CggZFkPvnkE/eyzMxMExoaam688cYia8rLyzN/+MMfTI8ePUxeXp673S+//GIaNmxounXrdsFjc+ONNxqn03nBNvlOnz5tateubVq0aGF+/fVX9/Lly5cbSWbSpEnuZaNGjTKSzIsvvuheduLECePv728cDodZsGCBe/nOnTuNJDN58mT3svxj1KZNG3P69Gn38pdfftlIMsuWLfPY1/ONHTvWVK1a1fz222/uZR07djSSzHvvvVegfceOHU3Hjh3d9/v162eaN29+wePRv39/U6VKFfPf//7XvezgwYMmKCjIREdHF9iXrl27erxGjz/+uPHx8TEnT540xhizZMkS93laUvn7dv6tadOm5ueff/ZoO2bMGBMaGmqOHj3qsXzIkCHG6XS6j+emTZsKnOfGGONyuUxwcLB56qmnjDFnz8GaNWuagQMHGh8fH3Pq1CljjDGvv/66qVSpkjlx4oQxxpiUlBQjycybN8/j+T7//HOP5adOnTLVqlUz999/v0e7Q4cOGafT6bE8/zx77rnnPNreeOONpk2bNsU6duPHjzfh4eHu12b16tVGkvnuu+882hX2d3v+eVOUBg0amO7du5uMjAyTkZFhvv/+ezNkyBAjyTz88MPGmMLP448++shIMsnJyResI//94/PPP/dY/4033jCSTEZGxkVrPNeZM2eMw+Ewf/zjHy/Yrnfv3qZBgwYey87/Wz63xnPfD899X05PTzfNmzc31113ndm3b5+7zdy5c02lSpVMSkqKx3O99957RpL5+uuvjTHGnDx50vj5+Zmnn37ao90jjzxiAgICTHZ2tsfyb775xkgyCxcuvOD+ATCGKy2AlwwaNEi//vqrli9frlOnTmn58uWFdg3zhnr16mnAgAHu+/ndob777jsdOnSo0HW2bdum3bt3a9iwYTp27Jj7m/acnBx16dJFycnJysvLK3KbWVlZCgoKKlZ9mzdv1pEjR/R///d/8vPzcy/v3bu3mjRpos8++6zAOvfdd5/739WqVVPjxo0VEBDg7icvne2+Ua1aNf38888F1n/ggQd0zTXXuO8/9NBDqly5sseUpef22z916pSOHj2qqKgo/fLLL9q5c6fH8/n6+mr06NEX3ddq1aopNTVVmzZtKvRxl8ul1atXq3///rruuuvcy0NDQzVs2DB99dVXysrKKrAv506LHRUVJZfLpf/3//6fe5vS2bEE5151KK6IiAitWbNGa9as0cqVKzVjxgxlZmaqZ8+e7m5oxhh98skn6tu3r4wx7vPLine truncated
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAy0AAAIQCAYAAACMg4HBAAAAOnRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjEwLjgsIGh0dHBzOi8vbWF0cGxvdGxpYi5vcmcvwVt1zgAAAAlwSFlzAAAPYQAAD2EBqD+naQAAMttJREFUeJzt3QmUXFWBBuDbBA2akCAoEkggiAsC4r6gJhpZVFCBiAswCg6uAwLiinNGwS24jCbjgrgMOG6oCDiDAcQFEheURRzEFQ0DiUERJYGogUlqzv9mqqe60p10J+n07e7vO6dOd7+urnrvvlvV9393qZ5Wq9UqAAAAldpqpHcAAABgfYQWAACgakILAABQNaEFAAComtACAABUTWgBAACqJrQAAABVE1oAAICqCS0AAEDVhBYYY0477bTS09MzqPuec845zX1vuummIT/P5Zdf3vxtvrL5PP3pT29uMJTX7UjUm015/xiqu+66q+y4447l85///LAdx9VXX122lNtvv71MmjSpLFy4cIs9J4x2QgtsQe1/jrl997vfXef3rVarzJgxo/n9c57znM32vO95z3vKhRdeWEaDlStXltNPP7088pGPLJMnTy73uc99yj777FPe/OY3l9/97ncjvXtsQBrO7Tqe273vfe+y++67l1e+8pXllltu2ajyy3lPGL/uuuvGRfk/4QlPaMruzDPP3OyPPXPmzD7nJ0Fg1qxZ5YILLig1W7BgQdl2223Li1/84iYkdR7D+m5bIlBtjB122KG8/OUvL//0T/800rsCo8bWI70DMB5ts8025Qtf+EJ56lOf2mf7FVdcUZYuXVomTpy4WZ8voeWII44ohx12WJ/tL3nJS5pGwOZ+vo3129/+thxwwAHl5ptvLi94wQuahm4avf/5n/9ZPv3pTzcNq1/96ldlLPvGN75RRrvp06eXefPmNd/ffffd5Wc/+1n5+Mc/Xi699NLy85//vNz3vvcdcmhJkE2D+1GPelQZy37961+Xq666qjnW9Cq85jWv2ezPkTJ8/etf31u2Z511Vpk7d24Tkl796lcP+nG21PvHPffc04SW173udWXChAnlAQ94QPnsZz/b5z7//M//3Lx3fuhDH+qzPfetVcr6X/7lX8q3v/3t8oxnPGOkdweqJ7TACDj44IPLV77yleYf1tZb///LMEHmsY99bPnjH/+4RfYjDYDcavDf//3fTcPp97//fTPkrDvQvfvd7y7vfe97y1j1l7/8pWnMJ6SNdlOnTi1/93d/12dbeltOOOGE8r3vfa8ceOCBI7Zvtfvc5z7X9H6kEZ4LDekpSIDZnHbZZZc+5+elL31pefCDH9w0+IcSWgbz/pHe47/97W9Nj+nGuuiii8ptt91WXvjCFzY/Z1hVd/0699xzy5///Od1ttfs4Q9/eNOLnB54oQU2zPAwGAFHHnlkM6b5sssu692WK9LnnXdeOeqoowY9f6Q9TCL/9AaS369atap85jOf6R0yceyxxw44Jj0NpAxNyxX/XJFNr9Bee+1Vzj///EEd2w9/+MPyrGc9q2m4phH+tK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ovs9wwXYdTj3LMSd8dM4PW7x4cdlqq62ar52BLhO58zdteQ288Y1vbPYnz5tAlHOaRmWGI7XluRJScl5TR1K2Ge6WetY9XyLHnb9PsP3ABz7QNGAToj7xiU8Mqtxyrm688cbmokZ63NLzOBwTz7vleDPfKPsdeZ1nqGbKJOc+70npyUgP8WAa12nk5xjSIE/Zpr6mjibMpIGf85lyed7znjeoCxrf//73y2Me85iypaTe5j0r9TNDdhM2Us+yvzmvz33uc5tyyes/vVN5r2zL+1dC309/+tM+j5khfxna2t0TlPeIvF91h2CgHy1gizn77LPzH7911VVXtT7ykY+0tt1229Zf/vKX5ncveMELWnPmzGm+32233VqHHHJI79995zvfaf4uXzstWbKk2Z7HbXv729/ebOs0adKk1jHHHDPg/uRx2vLc2fbVr361d9uKFSta06ZNaz360Y8ecJ/Wrl3beshDHtJ65jOf2XzfluPbfffdWwceeOB6yyaPPXXq1NZg3H333a0dd9yxtc8++7T++te/9m6/6KKLmn1629ve1rstx51t73nPe3q3/fnPf27d5z73afX09LTOPffc3u2/+MUvmvumDLvL6LGPfWzzvG3ve9/7mu1f+9rX+hxrt1e96lWt+973vq2//e1vvdue9rSnNX/78Y9/fJ3753e5tR166KGtvffee73lcdhhh7Xufe97t37zm9/0bvvd737X1K/Zs2evcywHHHBAn3P0ute9rjVhwoTWHXfc0fx8wQUX9NbToWofW/ft4Q9/eOu3v/1tn/sed9xxTb364x//2Gf7i1/84qYutMsz+9Fdz2PNmjWtKVOmtN70pjc1P+eYdthhh+a1lOO58847m+0f/OAHW1tttVVz3mPx4sXN433+85/v83iXXHJJn+35++222671ile8os/9br311mb/Ore369k73vGOdep16s5gnHDCCa0ZM2b0nptvfOMbzWP++Mc/3uDrtrveDCSv74MOOqh12223Nbef/OQnTXnn8V772tcOWI+/+MUvNvdZtGjRoN4/UpadPvShDzXb85xDcc899zSv09e//vXrvV/eL/Pcnbpfy5372Pl+2Pm+vHz58ub19qAHPah100039d7ns5/9bFOHUnc65TWcv/3e977X/Jz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WGlQSFnLPM88m2HFOCSKzvNdzWvm+nhLEMxcvLine truncated
|
||||||
"text/plain": [
|
"text/plain": [
|
||||||
"<Figure size 1000x600 with 1 Axes>"
|
"<Figure size 1000x600 with 1 Axes>"
|
||||||
]
|
]
|
||||||
@@ -868,10 +869,10 @@
|
|||||||
"id": "1de94dbc",
|
"id": "1de94dbc",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:40:43.401915Z",
|
"iopub.execute_input": "2026-02-05T00:47:13.335629Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:40:43.401843Z",
|
"iopub.status.busy": "2026-02-05T00:47:13.335509Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:40:43.724524Z",
|
"iopub.status.idle": "2026-02-05T00:47:13.809112Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:40:43.724263Z"
|
"shell.execute_reply": "2026-02-05T00:47:13.808624Z"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
@@ -897,10 +898,10 @@
|
|||||||
"id": "b0aa032c",
|
"id": "b0aa032c",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:40:43.726078Z",
|
"iopub.execute_input": "2026-02-05T00:47:13.810697Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:40:43.725996Z",
|
"iopub.status.busy": "2026-02-05T00:47:13.810579Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:40:43.728507Z",
|
"iopub.status.idle": "2026-02-05T00:47:13.813539Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:40:43.728266Z"
|
"shell.execute_reply": "2026-02-05T00:47:13.813087Z"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"outputs": [
|
"outputs": [
|
||||||
@@ -942,10 +943,10 @@
|
|||||||
"id": "ba6dcb50",
|
"id": "ba6dcb50",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:40:43.729744Z",
|
"iopub.execute_input": "2026-02-05T00:47:13.814983Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:40:43.729667Z",
|
"iopub.status.busy": "2026-02-05T00:47:13.814869Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:40:43.732002Z",
|
"iopub.status.idle": "2026-02-05T00:47:13.817274Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:40:43.731704Z"
|
"shell.execute_reply": "2026-02-05T00:47:13.816873Z"
|
||||||
},
|
},
|
||||||
"lines_to_next_cell": 0
|
"lines_to_next_cell": 0
|
||||||
},
|
},
|
||||||
@@ -953,7 +954,7 @@
|
|||||||
{
|
{
|
||||||
"data": {
|
"data": {
|
||||||
"text/plain": [
|
"text/plain": [
|
||||||
"146"
|
"np.int64(146)"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"execution_count": 19,
|
"execution_count": 19,
|
||||||
@@ -986,10 +987,10 @@
|
|||||||
"id": "44c1b26a",
|
"id": "44c1b26a",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:40:43.733204Z",
|
"iopub.execute_input": "2026-02-05T00:47:13.818684Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:40:43.733131Z",
|
"iopub.status.busy": "2026-02-05T00:47:13.818568Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:40:43.735178Z",
|
"iopub.status.idle": "2026-02-05T00:47:13.820908Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:40:43.734967Z"
|
"shell.execute_reply": "2026-02-05T00:47:13.820500Z"
|
||||||
},
|
},
|
||||||
"lines_to_next_cell": 2
|
"lines_to_next_cell": 2
|
||||||
},
|
},
|
||||||
@@ -997,7 +998,7 @@
|
|||||||
{
|
{
|
||||||
"data": {
|
"data": {
|
||||||
"text/plain": [
|
"text/plain": [
|
||||||
"0"
|
"np.int64(0)"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"execution_count": 20,
|
"execution_count": 20,
|
||||||
@@ -1014,7 +1015,7 @@
|
|||||||
"id": "bb9aba03",
|
"id": "bb9aba03",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"source": [
|
"source": [
|
||||||
"Figure~\\ref{Ch12:fig:BonferroniBenjamini} displays the ordered\n",
|
"Figure 13.6 displays the ordered\n",
|
||||||
"$p$-values, $p_{(1)} \\leq p_{(2)} \\leq \\cdots \\leq p_{(2000)}$, for\n",
|
"$p$-values, $p_{(1)} \\leq p_{(2)} \\leq \\cdots \\leq p_{(2000)}$, for\n",
|
||||||
"the `Fund` dataset, as well as the threshold for rejection by the\n",
|
"the `Fund` dataset, as well as the threshold for rejection by the\n",
|
||||||
"Benjamini--Hochberg procedure. Recall that the Benjamini--Hochberg\n",
|
"Benjamini--Hochberg procedure. Recall that the Benjamini--Hochberg\n",
|
||||||
@@ -1036,10 +1037,10 @@
|
|||||||
"id": "f23a1f9f",
|
"id": "f23a1f9f",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:40:43.736262Z",
|
"iopub.execute_input": "2026-02-05T00:47:13.822386Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:40:43.736193Z",
|
"iopub.status.busy": "2026-02-05T00:47:13.822275Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:40:43.738272Z",
|
"iopub.status.idle": "2026-02-05T00:47:13.824875Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:40:43.738070Z"
|
"shell.execute_reply": "2026-02-05T00:47:13.824369Z"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
@@ -1061,7 +1062,7 @@
|
|||||||
"id": "b84d7916",
|
"id": "b84d7916",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"source": [
|
"source": [
|
||||||
"We now reproduce the middle panel of Figure~\\ref{Ch12:fig:BonferroniBenjamini}."
|
"We now reproduce the middle panel of Figure 13.6."
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -1070,17 +1071,17 @@
|
|||||||
"id": "3c3018cc",
|
"id": "3c3018cc",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:40:43.739348Z",
|
"iopub.execute_input": "2026-02-05T00:47:13.826330Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:40:43.739279Z",
|
"iopub.status.busy": "2026-02-05T00:47:13.826218Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:40:43.914663Z",
|
"iopub.status.idle": "2026-02-05T00:47:14.010340Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:40:43.914426Z"
|
"shell.execute_reply": "2026-02-05T00:47:14.009791Z"
|
||||||
},
|
},
|
||||||
"lines_to_next_cell": 2
|
"lines_to_next_cell": 2
|
||||||
},
|
},
|
||||||
"outputs": [
|
"outputs": [
|
||||||
{
|
{
|
||||||
"data": {
|
"data": {
|
||||||
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAkIAAAG1CAYAAAAV2Js8AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8g+/7EAAAACXBIWXMAAA9hAAAPYQGoP6dpAABRv0lEQVR4nO3deVhU5d8G8HuGVVRQREEQ0hRUUsENNMstFK001ywrcSnLTNPBFPckFZVYLCn75VaZZmVarwsu5JaZoIIbKmAU5EIayKayzMz7BzmJnGEGmJkzy/25Lq+3Oc8zc7783knunvMsEqVSqQQRERGRBZKKXQARERGRWBiEiIiIyGIxCBEREZHFYhAiIiIii8UgRERERBaLQYiIiIgsFoMQERERWSwGISIiIrJY1mIXYOwUCgWuX7+Ohg0bQiKRiF0OERERaUGpVKKwsBDu7u6QStWP+z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elc+fOUqlSJfnhhx/induzZ49MnjzZb2Pz+9KYr8rwAADOVn6w9a7EMSJyZ6ZU3sM051b7gWmS89mzZy2v0fzfO+/0XwBq60AoX758EhYWZiLJuPS+7iPgTVqppjdXO1kCAAKrq/zZyKR/nq/sW99n43FCHtA333wjffr0kd9++83ymvDwcBk1apQ89thjlsnSvmLrpTHtHVKlShVZunRp7LGoqChzv2bNml597q5du5reJrphEwAguLvKs3u052zatMns36fdHKyCoCxZssjQoUNNOXzbtm39GgTZYkbo3LlzsQlT6sCBA6YKLE+ePBIREWGSqNq1a2e6yVavXt2Uz2vJfUwVGQAASRn83bYkz1eKyMWSmAf8/fff8uqrr5pdn3VGyMpTTz0lr7/+uhQpUkTswu+B0IYNG+LtHqmBj9LgZ/r06dKmTRs5duyYDBo0yCRI655B2n02YQI1AABWvcQuXXFdK58+TGeDvLdHjZPMmDHDbG1jRfcB0g0Sq1WrJnYTEu0qbHO4uDlCmtGupfRUkAFA4Lh14AK5eCUqyWvoKu85ly5dknLlypmVnRg333yz6QzvatNEb9INkXPmzJns57etc4T8iRwhAAhcLSb9mGwQRF6QZ2kbrLFjx5qvtQ2GLoHt3LlTHnnkEb/nASWFQAgAEFQ2Hzopmw+fTvIaSuVT56+//pJPP/3U5XltlaWVYLqSohsUZ86cWeyOpTEPTa0BAOyhRP95SbbQUCyJpcyFCxdk3LhxJsjRvYF0h2hdBrMzlsYAAI5TrF/SQZAu0BALine truncated
|
||||||
"text/plain": [
|
"text/plain": [
|
||||||
"<Figure size 640x480 with 1 Axes>"
|
"<Figure size 640x480 with 1 Axes>"
|
||||||
]
|
]
|
||||||
@@ -1109,7 +1110,7 @@
|
|||||||
"## A Re-Sampling Approach\n",
|
"## A Re-Sampling Approach\n",
|
||||||
"Here, we implement the re-sampling approach to hypothesis testing\n",
|
"Here, we implement the re-sampling approach to hypothesis testing\n",
|
||||||
"using the `Khan` dataset, which we investigated in\n",
|
"using the `Khan` dataset, which we investigated in\n",
|
||||||
"Section~\\ref{sec:permutations}. First, we merge the training and\n",
|
"Section 13.5. First, we merge the training and\n",
|
||||||
"testing data, which results in observations on 83 patients for\n",
|
"testing data, which results in observations on 83 patients for\n",
|
||||||
"2,308 genes."
|
"2,308 genes."
|
||||||
]
|
]
|
||||||
@@ -1120,22 +1121,31 @@
|
|||||||
"id": "d49b3de7",
|
"id": "d49b3de7",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:40:43.916217Z",
|
"iopub.execute_input": "2026-02-05T00:47:14.012072Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:40:43.916122Z",
|
"iopub.status.busy": "2026-02-05T00:47:14.011949Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:40:43.973817Z",
|
"iopub.status.idle": "2026-02-05T00:47:14.157393Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:40:43.973588Z"
|
"shell.execute_reply": "2026-02-05T00:47:14.156590Z"
|
||||||
},
|
},
|
||||||
"lines_to_next_cell": 2
|
"lines_to_next_cell": 2
|
||||||
},
|
},
|
||||||
"outputs": [
|
"outputs": [
|
||||||
|
{
|
||||||
|
"name": "stderr",
|
||||||
|
"output_type": "stream",
|
||||||
|
"text": [
|
||||||
|
"/var/folders/16/8y65_zv174qgdp4ktlmpv12h0000gq/T/ipykernel_26045/2840220789.py:3: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
|
||||||
|
" D['Y'] = pd.concat([Khan['ytrain'], Khan['ytest']])\n"
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"data": {
|
"data": {
|
||||||
"text/plain": [
|
"text/plain": [
|
||||||
|
"Y\n",
|
||||||
"2 29\n",
|
"2 29\n",
|
||||||
"4 25\n",
|
"4 25\n",
|
||||||
"3 18\n",
|
"3 18\n",
|
||||||
"1 11\n",
|
"1 11\n",
|
||||||
"Name: Y, dtype: int64"
|
"Name: count, dtype: int64"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"execution_count": 23,
|
"execution_count": 23,
|
||||||
@@ -1171,10 +1181,10 @@
|
|||||||
"id": "18eaeb65",
|
"id": "18eaeb65",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:40:43.975057Z",
|
"iopub.execute_input": "2026-02-05T00:47:14.158842Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:40:43.974970Z",
|
"iopub.status.busy": "2026-02-05T00:47:14.158732Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:40:43.978337Z",
|
"iopub.status.idle": "2026-02-05T00:47:14.183189Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:40:43.978117Z"
|
"shell.execute_reply": "2026-02-05T00:47:14.182446Z"
|
||||||
},
|
},
|
||||||
"lines_to_next_cell": 2
|
"lines_to_next_cell": 2
|
||||||
},
|
},
|
||||||
@@ -1182,7 +1192,7 @@
|
|||||||
{
|
{
|
||||||
"data": {
|
"data": {
|
||||||
"text/plain": [
|
"text/plain": [
|
||||||
"(-2.0936330736768185, 0.04118643782678394)"
|
"(np.float64(-2.0936330736768185), np.float64(0.04118643782678394))"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"execution_count": 24,
|
"execution_count": 24,
|
||||||
@@ -1224,10 +1234,10 @@
|
|||||||
"id": "8e2f821c",
|
"id": "8e2f821c",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:40:43.979564Z",
|
"iopub.execute_input": "2026-02-05T00:47:14.184750Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:40:43.979493Z",
|
"iopub.status.busy": "2026-02-05T00:47:14.184627Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:40:45.736220Z",
|
"iopub.status.idle": "2026-02-05T00:47:17.380369Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:40:45.735978Z"
|
"shell.execute_reply": "2026-02-05T00:47:17.379890Z"
|
||||||
},
|
},
|
||||||
"lines_to_next_cell": 2
|
"lines_to_next_cell": 2
|
||||||
},
|
},
|
||||||
@@ -1235,7 +1245,7 @@
|
|||||||
{
|
{
|
||||||
"data": {
|
"data": {
|
||||||
"text/plain": [
|
"text/plain": [
|
||||||
"0.9602"
|
"np.float64(0.9602)"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"execution_count": 25,
|
"execution_count": 25,
|
||||||
@@ -1266,7 +1276,7 @@
|
|||||||
"This fraction, 0.0398,\n",
|
"This fraction, 0.0398,\n",
|
||||||
"is our re-sampling-based $p$-value.\n",
|
"is our re-sampling-based $p$-value.\n",
|
||||||
"It is almost identical to the $p$-value of 0.0412 obtained using the theoretical null distribution.\n",
|
"It is almost identical to the $p$-value of 0.0412 obtained using the theoretical null distribution.\n",
|
||||||
"We can plot a histogram of the re-sampling-based test statistics in order to reproduce Figure~\\ref{Ch12:fig-permp-1}."
|
"We can plot a histogram of the re-sampling-based test statistics in order to reproduce Figure 13.7."
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -1275,17 +1285,17 @@
|
|||||||
"id": "f10d3bf0",
|
"id": "f10d3bf0",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:40:45.737603Z",
|
"iopub.execute_input": "2026-02-05T00:47:17.382043Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:40:45.737525Z",
|
"iopub.status.busy": "2026-02-05T00:47:17.381928Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:40:45.904098Z",
|
"iopub.status.idle": "2026-02-05T00:47:17.489426Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:40:45.903787Z"
|
"shell.execute_reply": "2026-02-05T00:47:17.488927Z"
|
||||||
},
|
},
|
||||||
"lines_to_next_cell": 0
|
"lines_to_next_cell": 0
|
||||||
},
|
},
|
||||||
"outputs": [
|
"outputs": [
|
||||||
{
|
{
|
||||||
"data": {
|
"data": {
|
||||||
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAqgAAAKnCAYAAABK7r+JAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8g+/7EAAAACXBIWXMAAA9hAAAPYQGoP6dpAAB6eElEQVR4nO3deXhU5f3+8fckIfvGmhAI+45AWCOiGDUarLViXdAf36Kpxdal1caVtoJbG3ArLijuoqLQWkXbahSjoS7siCCboCBrQggkQxLINvP742QGAgkwIckzy/26rrnOmZkzZz6ThHDn2Y7N6XQ6ERERERHxEkGmCxAREREROZoCqoiIiIh4FQVUEREREfEqCqgiIiIi4lUUUEVERETEqyigioiIiIhXUUAVEREREa+igCoiIiIiXiXEdAFNweFwsHv3bmJiYrDZbKbLEREREZFjOJ1ODh48SFJSEkFBJ24j9YuAunv3bpKTk02XISIiIiInsWPHDjp37nzCY/wioMbExADWB46NjTVcjYjnysogKcna370boqLM1iMiItLU7HY7ycnJ7tx2In4RUF3d+rGxsQqo4pOCg4/sx8YqoIqIiP86leGYmiQlIiIiIl5FAVVEREREvIoCqoiIiIh4Fb8YgyoiIiK+zel0Ul1dTU1NjelS5DQEBwcTEhJy2st+KqCKiIiIUZWVlezZs4fy8nLTpUgTiIyMpGPHjoSGhjb6HAqoIiIiYozD4WDr1q0EBweTlJREaGioLrrjo5xOJ5WVlRQWFrJ161Z69+590gX5G6KAKiIiIsZUVlbicDhITk4mMjLSdDlymiIiImjVqhU//fQTlZWVhIeHN+o8miQlIiIixjW2pU28T1N8L/XTICIiIiJeRQFVRERExKDrr7+e8ePHu++npaVx++23G6vHG2gMqoiIiHidvLyWnSiVlub0+DXXX389c+bMITs7m3vvvdf9+IIFC7j88stxOj0/p1jUgioiIiLSSOHh4cyYMYMDBw6YLsWvKKCKiIiINFJ6ejqJiYlkZ2fX+/z9999PSkpKncdmzpxJt27dmr84H6aAKiIiItJIwcHB/O1vf+Ppp59m586dpsvxGwqoIiIiIqfh8ssvJyUlhWnTppkuxW8ooIqIiIicphkzZjBnzhw2bNhguhS/oIAqIiIicprGjh1LRkYGU6ZMqfN4UFDQcbP5q6qqWrI0n6RlpkRERESawPTp00lJSaFv377ux9q3b09+fj5OpxObzVo6a/Xq1YYq9B1qQRURERFpAoMGDWLixIk89dRT7sfS0tIoLCzkkUce4YcffmDWrFl89NFHBqv0DQqoIiIiIk3kwQcfxOFwuO/379+fZ599llmzZjFkyBCWLVvGnXfeabBC32Bz+sFlDux2O3FxcZSUlBAbG2u6HBGPlZVBdLS1X1oKUVFm6xERaSmHDx9m69atdO/enfDwcNPlSBNo6HvqSV5TC6qIiIiIeBUFVBERERHxKgqoIiIiIuJVFFBFRERExKsooIqIiIiIV9FC/SIiASQvz3bcY2lpPr+Yi4j4GbWgioiIiIhXUUAVEREREa+iLn4RER+nbnsR8TdqQRURERFpRt26dWPmzJmmy2gyLfF5FFBFREREGmnHjh38+te/JikpidDQULp27cptt91GUVGR6dJ8mgKqiIiISCP8+OOPjBgxgs2bN/P222+zZcsWZs+eTW5uLqNHj2b//v1G6qqpqcHhcBh576aigCoiIiLSCLfccguhoaF88sknnHvuuXTp0oWLL76YTz/9lF27dvHnP//ZfezBgwe59tpriYqKolOnTsyaNcv9nNPp5P7776dLly6EhYWRlJTEH/7wB/fzFRUV3HnnnXTq1ImoqChSU1PJy8tzP//aa68RHx/PBx98wIABAwgLC+Oll14iPDyc4uLiOjXfdtttnH/++e77X375Jeeccw4REREkJyfzhz/8gbKyMvfze/fu5dJLLyUiIoLu3bszd+7cJvwKNkwBVURERLyG0wllZWZuTg/mFu7fv5+PP/6Ym2++mYiIiDrPJSYmMnHiRObPn4+z9qSPPvooQ4YM4ZtvvuHee+/ltttuY+HChQD861//4u9//zvPP/88mzdvZsGCBQwaNMh9vltvvZXFixczb9481qxZw1VXXcW4cePYvHmz+5jy8nJmzJjBSy+9xLp165g4cSLx8fH861//ch9TU1PD/PnzmThxIgA//PAD48aN44orrmDNmjXMnz+fL7/8kltvvdX9muuvv54dO3bw+eef88477/Dss8+yd+/eU/9CNZJm8YuIiIjXKC+H6Ggz711aClFRp3bs5s2bcTqd9O/fv97n+/fvz4EDBygsLARgzJgx3HvvvQD06dOHr776ir///e9ceOGFbN++ncTERNLT02nVqhVdunRh1KhRAGzfvp1XX32V7du3k5SUBMCdd95JTk4Or776Kn/7298AqKqq4tlnn2XIkCHuGq655hreeustbrjhBgByc3MpLi7miiuuACA7O5uJEydy++23A9C7d2+eeuopzj33XJ577jm2b9/ORx99xLJlyxg5ciQAL7/8coOfuSmpBVVERESkkZyn2Ow6evTo4+5v2LABgKuuuopDhw7Ro0cPJk+ezHvvvUd1dTUAa9eupaamhj59+hAdHe2+LVq0iB9++MF9vtDQUAYPHlznPSZOnEheXh67d+8GYO7cuVxyySXEx8cD8O233/Laa6/VOW9GRgYOh4OtW7eyYcMGQkJCGD58uPuc/fr1c7++OakFVURERLxGZKTVkmnqvU9Vr169sNlsbNiwgcsvv/y45zds2EDr1q1p3779Sc+VnJzMpk2b+PTTT1m4cCE333wzjz76KIsWLaK0tJTg4GBWrlxJcHBwnddFH9XUHBERgc1Wd03kkSNH0rNnT+bNm8dNN93Ee++9x2uvveZ+vrS0lN/+9rd1xru6dOnShe+///6ktTcXBVQRERHxGjbbqXezm9S2bVsuvPBCnn32Wf74xz/WGYean5/P3LlzmTRpkjs0LlmypM7rlyxZUqerPCIigksvvZRLL72UW265hX79+rF27VqGDh1KTU0Ne/fu5ZxzzvG4zokTJzJ37lw6d+5MUFAQl1xyifu5YcOGsX79enr16lXva/v160d1dTUrV650d/Fv2rTpuIlXzUFd/CIiIiKN8Mwzz1BRUUFGRgb/+9//2LFjBzk5OVx44YV06tSJv/71r+5jv/rqKx555BG+//57Zs2axT//+U9uu+02wJqF//LLL/Pdd9/x448/8uabbxIREUHXrl3p06cPEydOZNKkSbz77rts3bqVZcuWkZ2dzX//+9+T1jhx4kRWrVrFX//6V6688krCwsLcz91zzz18/fXX3HrrraxevZrNmzfz/vvvuydJ9e3bl3HjxvHb3/6WpUuXsnLlSn7zm98cNymsOSigioiIiDRC7969WbFiBT169ODqq6+mZ8+e3HjjjZx33nksXryYNm3auI+94447WLFiBUOHDuXhhx/miSeeICMjA4D4+HhefPFFxowZw+DBg/n000/597//Tdu2bQF49dVXmTRpEnfccQd9+/Zl/PjxLF++nC5dupy0xl69ejFq1CjWrFnjnr3vMnjwYBYtWsT333/POeecw9ChQ5k6dap7MpbrvZOSkjj33HP55S9/yY033kiHDh2a4st3QjbnqY7u9WJ2u524uDhKSkqIjY01XY6Ix8rKjsxa9WQWqQhAXp7tuMfS0ur/1e7JsSIt4fDhw2zdupXu3bsTHh5uuhxpAg19Tz3Ja2pBFRERERGvooAqIiIiIl5FAVVEREREvIoCqoiIiIh4FQVUEREREfEqCqgiIiJinB8sKiS1muJ7qYAqIiIixrRq1QqA8vJyw5VIU3F9L13f28bQpU5FRETEmODgYOLj49m7dy8AkZGRx11TXnyD0+mkvLycvXv3Eh8fT3BwcKPPpYAqItIC6lsgH7RIvghAYmIigDukim+Lj493f08bSwFVREREjLLZbHTs2JEOHTpQVVVluhw5Da1atTqtllMXBVQRERHxCsHBwU0SbsT3aZKUiIiIiHgVBVQRERER8SoKqCIiIiLiVRRQRURERMSrKKCKiIiIiFdRQBURERERr9KogDpr1iy6detGeHg4qampLFu27JReN2/ePGw2G+PHj6/zuNPpZOrUqXTs2JGIiAjS09PZvHlzY0oTERERER/ncUCdP38+WVlZTJs2jVWrVjFkyBAyMjJOevWHbdu2ceedd3LOOecc99wjjzzCU089xezZs1m6dClRUVFkZGRw+PBhT8sTERERER/ncUB94oknmDx5MpmZmQwYMIDZs2cTGRnJK6+80uBrampqmDhxIg888AA9evSo85zT6WTmzJn85S9/4bLLLmPw4MG8/vrr7N69mwULFnj8gURERETEt3kU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||
"text/plain": [
|
"text/plain": [
|
||||||
"<Figure size 800x800 with 1 Axes>"
|
"<Figure size 800x800 with 1 Axes>"
|
||||||
]
|
]
|
||||||
@@ -1320,7 +1330,7 @@
|
|||||||
"The re-sampling-based null distribution is almost identical to the theoretical null distribution, which is displayed in red.\n",
|
"The re-sampling-based null distribution is almost identical to the theoretical null distribution, which is displayed in red.\n",
|
||||||
"\n",
|
"\n",
|
||||||
"Finally, we implement the plug-in re-sampling FDR approach outlined in\n",
|
"Finally, we implement the plug-in re-sampling FDR approach outlined in\n",
|
||||||
"Algorithm~\\ref{Ch12:alg-plugin-fdr}. Depending on the speed of your\n",
|
"Algorithm 13.4. Depending on the speed of your\n",
|
||||||
"computer, calculating the FDR for all 2,308 genes in the `Khan`\n",
|
"computer, calculating the FDR for all 2,308 genes in the `Khan`\n",
|
||||||
"dataset may take a while. Hence, we will illustrate the approach on a\n",
|
"dataset may take a while. Hence, we will illustrate the approach on a\n",
|
||||||
"random subset of 100 genes. For each gene, we first compute the\n",
|
"random subset of 100 genes. For each gene, we first compute the\n",
|
||||||
@@ -1335,10 +1345,10 @@
|
|||||||
"id": "d37287ae",
|
"id": "d37287ae",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:40:45.905463Z",
|
"iopub.execute_input": "2026-02-05T00:47:17.490919Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:40:45.905362Z",
|
"iopub.status.busy": "2026-02-05T00:47:17.490801Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:43:41.101404Z",
|
"iopub.status.idle": "2026-02-05T00:52:54.178038Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:43:41.100635Z"
|
"shell.execute_reply": "2026-02-05T00:52:54.176846Z"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
@@ -1371,7 +1381,7 @@
|
|||||||
"Next, we compute the number of rejected null hypotheses $R$, the\n",
|
"Next, we compute the number of rejected null hypotheses $R$, the\n",
|
||||||
"estimated number of false positives $\\widehat{V}$, and the estimated\n",
|
"estimated number of false positives $\\widehat{V}$, and the estimated\n",
|
||||||
"FDR, for a range of threshold values $c$ in\n",
|
"FDR, for a range of threshold values $c$ in\n",
|
||||||
"Algorithm~\\ref{Ch12:alg-plugin-fdr}. The threshold values are chosen\n",
|
"Algorithm 13.4. The threshold values are chosen\n",
|
||||||
"using the absolute values of the test statistics from the 100 genes."
|
"using the absolute values of the test statistics from the 100 genes."
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@@ -1381,10 +1391,10 @@
|
|||||||
"id": "ecaf03eb",
|
"id": "ecaf03eb",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:43:41.106109Z",
|
"iopub.execute_input": "2026-02-05T00:52:54.181722Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:43:41.105886Z",
|
"iopub.status.busy": "2026-02-05T00:52:54.181546Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:43:41.236604Z",
|
"iopub.status.idle": "2026-02-05T00:52:54.354719Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:43:41.236326Z"
|
"shell.execute_reply": "2026-02-05T00:52:54.354206Z"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
@@ -1422,10 +1432,10 @@
|
|||||||
"id": "ceacd8b8",
|
"id": "ceacd8b8",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:43:41.238163Z",
|
"iopub.execute_input": "2026-02-05T00:52:54.356542Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:43:41.238070Z",
|
"iopub.status.busy": "2026-02-05T00:52:54.356415Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:43:41.241062Z",
|
"iopub.status.idle": "2026-02-05T00:52:54.359797Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:43:41.240834Z"
|
"shell.execute_reply": "2026-02-05T00:52:54.359234Z"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"outputs": [
|
"outputs": [
|
||||||
@@ -1477,10 +1487,10 @@
|
|||||||
"id": "2434f370",
|
"id": "2434f370",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:43:41.242193Z",
|
"iopub.execute_input": "2026-02-05T00:52:54.361441Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:43:41.242118Z",
|
"iopub.status.busy": "2026-02-05T00:52:54.361331Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:43:41.244401Z",
|
"iopub.status.idle": "2026-02-05T00:52:54.364000Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:43:41.244188Z"
|
"shell.execute_reply": "2026-02-05T00:52:54.363553Z"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"outputs": [
|
"outputs": [
|
||||||
@@ -1534,8 +1544,8 @@
|
|||||||
"id": "117c0723",
|
"id": "117c0723",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"source": [
|
"source": [
|
||||||
"The next line generates Figure~\\ref{fig:labfdr}, which is similar\n",
|
"The next line generates Figure 13.11, which is similar\n",
|
||||||
"to Figure~\\ref{Ch12:fig-plugin-fdr},\n",
|
"to Figure 13.9,\n",
|
||||||
"except that it is based on only a subset of the genes."
|
"except that it is based on only a subset of the genes."
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@@ -1545,17 +1555,17 @@
|
|||||||
"id": "34d6a02b",
|
"id": "34d6a02b",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"execution": {
|
"execution": {
|
||||||
"iopub.execute_input": "2026-02-02T23:43:41.245792Z",
|
"iopub.execute_input": "2026-02-05T00:52:54.365271Z",
|
||||||
"iopub.status.busy": "2026-02-02T23:43:41.245713Z",
|
"iopub.status.busy": "2026-02-05T00:52:54.365183Z",
|
||||||
"iopub.status.idle": "2026-02-02T23:43:41.304373Z",
|
"iopub.status.idle": "2026-02-05T00:52:54.415214Z",
|
||||||
"shell.execute_reply": "2026-02-02T23:43:41.304028Z"
|
"shell.execute_reply": "2026-02-05T00:52:54.414710Z"
|
||||||
},
|
},
|
||||||
"lines_to_next_cell": 0
|
"lines_to_next_cell": 0
|
||||||
},
|
},
|
||||||
"outputs": [
|
"outputs": [
|
||||||
{
|
{
|
||||||
"data": {
|
"data": {
|
||||||
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAjcAAAGwCAYAAABVdURTAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8g+/7EAAAACXBIWXMAAA9hAAAPYQGoP6dpAABShklEQVR4nO3de3zO9f/H8ce1zTanDc02hzkrx5zmMBSxjESqb+0rReiMMJFVSMXoSFFK30r9EhI6EMkhOYWJkpwVyeaUjTns9Pn98cns2oFdc127Dnveb7frlut9fT7X9bo+fXM9v5/3yWIYhoGIiIiIh/BydgEiIiIi9qRwIyIiIh5F4UZEREQ8isKNiIiIeBSFGxEREfEoCjciIiLiURRuRERExKP4OLuAopaZmcnff/9N2bJlsVgszi5HRERECsAwDM6cOUPlypXx8rryvZliF27+/vtvwsLCnF2GiIiIFMLhw4epWrXqFY8pduGmbNmygHlxAgICnFyNiIiIFERycjJhYWFZv+NXUuzCzaWuqICAAIUbERERN1OQISUaUCwiIiIeReFGREREPIrCjYiIiHgUhRsRERHxKAo3IiIi4lEUbkRERMSjKNyIiIiIR1G4EREREY+icCMiIiIeReFGREREPIrCjYiIiHgUp4abNWvW0KNHDypXrozFYmHRokVXPWf16tU0b94cPz8/6tSpw0cffeTwOkVERIozw4CkJDhyxPyzq3NquElJSaFJkyZMnz69QMcfPHiQ7t27c8stt7Bt2zaGDRvGQw89xLJlyxxcqYiISPFx7BiMGAGdOsENN0DZslCuHFStCl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SuXE7wkZfHixWrcuLFuueUWZ7SnZcuW6tKly3lHewAAGcNWQs2f79v26KPuFBMQ8cHNiRMntGLFCrVo0eJsZzJnds6XWNGRJNhojT0nLpjZsmWLZs6cqbZt2yb7dY4fP+5kWHsfAAD/s5pPHTr4thUrJnXvzt1GlExL7dmzR6dPn1aRIkV82u18/fr1ST7HRmzseU2aNJHtPXjq1Cndc889euyxx5L9OsOGDdNg21gBABAQtl/N/fdLU6cmfqxfP3c6CYiqhOLUWLBggYYOHarXX39dK1eu1NSpUzVjxgw9++yzyT5n4MCBzprLine truncated
|
||||||
"text/plain": [
|
"text/plain": [
|
||||||
"<Figure size 640x480 with 1 Axes>"
|
"<Figure size 640x480 with 1 Axes>"
|
||||||
]
|
]
|
||||||
@@ -1573,7 +1583,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "markdown",
|
"cell_type": "markdown",
|
||||||
"id": "e672cce4",
|
"id": "9abbfbc2",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"source": [
|
"source": [
|
||||||
" \n"
|
" \n"
|
||||||
@@ -1596,7 +1606,7 @@
|
|||||||
"name": "python",
|
"name": "python",
|
||||||
"nbconvert_exporter": "python",
|
"nbconvert_exporter": "python",
|
||||||
"pygments_lexer": "ipython3",
|
"pygments_lexer": "ipython3",
|
||||||
"version": "3.11.4"
|
"version": "3.12.10"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nbformat": 4,
|
"nbformat": 4,
|
||||||
|
|||||||
+13
-4
@@ -23,7 +23,8 @@ def setup_env(outdir,
|
|||||||
uv_executable,
|
uv_executable,
|
||||||
timeout,
|
timeout,
|
||||||
kernel,
|
kernel,
|
||||||
allow_errors):
|
allow_errors,
|
||||||
|
overwrite):
|
||||||
"""
|
"""
|
||||||
Sets up a student environment for ISLP_labs.
|
Sets up a student environment for ISLP_labs.
|
||||||
|
|
||||||
@@ -45,6 +46,8 @@ def setup_env(outdir,
|
|||||||
Kernel to use for running notebooks.
|
Kernel to use for running notebooks.
|
||||||
allow_errors : bool
|
allow_errors : bool
|
||||||
Allow errors when running notebooks.
|
Allow errors when running notebooks.
|
||||||
|
overwrite: bool
|
||||||
|
Save notebook outputs in place?
|
||||||
"""
|
"""
|
||||||
repo_url = 'https://github.com/intro-stat-learning/ISLP_labs.git'
|
repo_url = 'https://github.com/intro-stat-learning/ISLP_labs.git'
|
||||||
|
|
||||||
@@ -110,7 +113,8 @@ def setup_env(outdir,
|
|||||||
if kernel:
|
if kernel:
|
||||||
nbconvert_command.extend(['--kernel', kernel])
|
nbconvert_command.extend(['--kernel', kernel])
|
||||||
nbconvert_command.append('--allow-errors')
|
nbconvert_command.append('--allow-errors')
|
||||||
|
if overwrite:
|
||||||
|
nbconvert_command.append('--inplace')
|
||||||
run_command(nbconvert_command, cwd=str(outdir))
|
run_command(nbconvert_command, cwd=str(outdir))
|
||||||
else:
|
else:
|
||||||
run_command([str(uv_bin / 'pip'), 'install', 'pytest', 'nbmake'], cwd=str(outdir))
|
run_command([str(uv_bin / 'pip'), 'install', 'pytest', 'nbmake'], cwd=str(outdir))
|
||||||
@@ -128,6 +132,9 @@ def setup_env(outdir,
|
|||||||
str(nbfile)]
|
str(nbfile)]
|
||||||
if kernel:
|
if kernel:
|
||||||
pytest_command.append(f'--nbmake-kernel={kernel}')
|
pytest_command.append(f'--nbmake-kernel={kernel}')
|
||||||
|
if overwrite:
|
||||||
|
pytest_command.append('--overwrite')
|
||||||
|
|
||||||
# nbmake does not have --allow-errors in the same way as nbconvert
|
# nbmake does not have --allow-errors in the same way as nbconvert
|
||||||
# If errors are not allowed, nbmake will fail on first error naturally
|
# If errors are not allowed, nbmake will fail on first error naturally
|
||||||
|
|
||||||
@@ -152,7 +159,8 @@ def main():
|
|||||||
parser.add_argument('--uv-executable', default='uv', help='The `uv` executable to use (default: "uv")')
|
parser.add_argument('--uv-executable', default='uv', help='The `uv` executable to use (default: "uv")')
|
||||||
parser.add_argument('--timeout', type=int, default=3600, help='Timeout for running notebooks (default: 3600)')
|
parser.add_argument('--timeout', type=int, default=3600, help='Timeout for running notebooks (default: 3600)')
|
||||||
parser.add_argument('--kernel', default=None, help='Kernel to use for running notebooks')
|
parser.add_argument('--kernel', default=None, help='Kernel to use for running notebooks')
|
||||||
parser.add_argument('--allow-errors', action='store_true', help='Allow errors when running notebooks. For older commits, Ch02-statlearn-lab.ipynb raises exceptions. Since v2.2.1 these are handled by appropriate tags in the .ipynb cells.')
|
parser.add_argument('--allow-errors', action='store_true', default=False, help='Allow errors when running notebooks. For older commits, Ch02-statlearn-lab.ipynb raises exceptions. Since v2.2.1 these are handled by appropriate tags in the .ipynb cells.')
|
||||||
|
parser.add_argument('--overwrite', action='store_true', default=False, help='If True, store output of cells in notebook(s).')
|
||||||
|
|
||||||
parser.add_argument('nbfiles', nargs='*', help='Optional list of notebooks to run.')
|
parser.add_argument('nbfiles', nargs='*', help='Optional list of notebooks to run.')
|
||||||
|
|
||||||
@@ -165,7 +173,8 @@ def main():
|
|||||||
args.uv_executable,
|
args.uv_executable,
|
||||||
args.timeout,
|
args.timeout,
|
||||||
args.kernel,
|
args.kernel,
|
||||||
args.allow_errors)
|
args.allow_errors,
|
||||||
|
args.overwrite)
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
main()
|
main()
|
||||||
Reference in new issue
Block a user