merge with v2.1.2

This commit is contained in:
Jonathan Taylor
2023-08-22 00:33:54 -07:00
28 changed files with 172136 additions and 4041 deletions

11
.docker/Dockerfile Normal file
View File

@@ -0,0 +1,11 @@
FROM docker.io/jupyter/base-notebook:lab-4.0.5
COPY requirements.txt .
# Install Python deps, the user approach is documented here:
# https://pythonspeed.com/articles/multi-stage-docker-python/
RUN pip install --user --no-cache-dir -r requirements.txt
COPY --chown=jovyan:users . ${HOME}/work

5
.dockerignore Normal file
View File

@@ -0,0 +1,5 @@
.github
.git
.docker
.dockerignore
*.Rmd

42
.github/workflows/docker.yml vendored Normal file
View File

@@ -0,0 +1,42 @@
name: Publish Docker image
on:
workflow_dispatch:
push:
branches:
- stable
tags:
- v*
jobs:
push_to_registry:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v3
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: jetaylor74/islp_labs
tags: |
type=ref,event=branch
type=semver,pattern={{raw}}
- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: .
file: .docker/Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

View File

@@ -2,8 +2,7 @@
jupyter: jupyter:
jupytext: jupytext:
cell_metadata_filter: -all cell_metadata_filter: -all
formats: ipynb,Rmd formats: Rmd,ipynb
main_language: python
text_representation: text_representation:
extension: .Rmd extension: .Rmd
format_name: rmarkdown format_name: rmarkdown

View File

@@ -1107,16 +1107,16 @@
{ {
"data": { "data": {
"text/plain": [ "text/plain": [
"array([-0.97992307, 0.29561095, 0.60481929, -0.20482365, -1.01517527,\n", "array([ 0.37697843, -0.1714562 , -0.07387699, 0.88289542, 0.42403407,\n",
" 2.76594674, -0.65748447, 1.27396181, -1.01573869, 1.37373688,\n", " -1.25834631, -0.56281024, 0.96180301, -0.81464709, -0.18611985,\n",
" 0.93524901, -2.41971622, -0.58080017, 0.13777341, 1.35936356,\n", " 1.55473926, 0.90549152, -1.36748952, -0.04172983, 1.33669081,\n",
" 0.61747629, 0.82550921, 0.7943598 , 1.0905082 , 1.80820045,\n", " 0.4353957 , 1.14591958, 0.0858525 , 0.72945623, -0.57270057,\n",
" -1.31320321, 2.0651966 , -0.78632522, -2.01068042, -1.36562571,\n", " 1.30960282, 0.10564808, 0.32318427, 0.73300473, -1.16608308,\n",
" 1.43466837, -0.16848093, -1.57211786, 0.49888498, -1.86050966,\n", " -1.76114586, 0.69877186, -0.30159982, -1.16892964, 0.49920879,\n",
" 1.08743609, 0.53059599, 0.02172848, -0.41808062, 1.88343414,\n", " -0.04008576, 0.99724065, 0.41002051, 0.83231347, -0.42308487,\n",
" 0.09112977, 1.23489568, 0.53207714, -1.62670383, 1.29859234,\n", " -2.17126985, 1.84862662, 0.40182298, -0.03440717, 0.05143581,\n",
" 0.30311344, 1.01143392, -1.64596169, 1.58876421, -1.85189683,\n", " 2.01972242, -0.41715298, -1.02696106, 0.80886424, 0.93826288,\n",
" -0.53929878, -2.19895144, -0.36691225, 1.03621761, 0.25278481])" " -1.08741113, -1.0994228 , 0.39633369, 0.29890158, -0.51821285])"
] ]
}, },
"execution_count": 28, "execution_count": 28,
@@ -1170,8 +1170,8 @@
{ {
"data": { "data": {
"text/plain": [ "text/plain": [
"array([[1. , 0.66045794],\n", "array([[1. , 0.65421904],\n",
" [0.66045794, 1. ]])" " [0.65421904, 1. ]])"
] ]
}, },
"execution_count": 30, "execution_count": 30,
@@ -1207,8 +1207,8 @@
"name": "stdout", "name": "stdout",
"output_type": "stream", "output_type": "stream",
"text": [ "text": [
"[-9.63514647 -0.12742473]\n", "[-5.49291495 2.33352471]\n",
"[0.85490033 0.05488893]\n" "[8.45050027 0.00908238]\n"
] ]
} }
], ],
@@ -1677,7 +1677,7 @@
{ {
"data": { "data": {
"text/plain": [ "text/plain": [
"<matplotlib.collections.PathCollection at 0x11ca12dd0>" "<matplotlib.collections.PathCollection at 0x110a86c20>"
] ]
}, },
"execution_count": 43, "execution_count": 43,
@@ -7708,9 +7708,14 @@
"metadata": { "metadata": {
"jupytext": { "jupytext": {
"cell_metadata_filter": "-all", "cell_metadata_filter": "-all",
"formats": "ipynb,Rmd", "formats": "Rmd,ipynb",
"main_language": "python" "main_language": "python"
}, },
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": { "language_info": {
"codemirror_mode": { "codemirror_mode": {
"name": "ipython", "name": "ipython",
@@ -7721,7 +7726,7 @@
"name": "python", "name": "python",
"nbconvert_exporter": "python", "nbconvert_exporter": "python",
"pygments_lexer": "ipython3", "pygments_lexer": "ipython3",
"version": "3.11.4" "version": "3.10.12"
} }
}, },
"nbformat": 4, "nbformat": 4,

View File

@@ -2,7 +2,7 @@
jupyter: jupyter:
jupytext: jupytext:
cell_metadata_filter: -all cell_metadata_filter: -all
formats: ipynb,Rmd formats: Rmd,ipynb
main_language: python main_language: python
text_representation: text_representation:
extension: .Rmd extension: .Rmd

View File

@@ -252,7 +252,6 @@
" '__ge__',\n", " '__ge__',\n",
" '__getattribute__',\n", " '__getattribute__',\n",
" '__getitem__',\n", " '__getitem__',\n",
" '__getstate__',\n",
" '__gt__',\n", " '__gt__',\n",
" '__hash__',\n", " '__hash__',\n",
" '__iadd__',\n", " '__iadd__',\n",
@@ -930,10 +929,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>Sun, 20 Aug 2023</td> <th> Prob (F-statistic):</th> <td>5.08e-88</td>\n", " <th>Date:</th> <td>Mon, 21 Aug 2023</td> <th> Prob (F-statistic):</th> <td>5.08e-88</td>\n",
"</tr>\n", "</tr>\n",
"<tr>\n", "<tr>\n",
" <th>Time:</th> <td>19:28:54</td> <th> Log-Likelihood: </th> <td> -1641.5</td>\n", " <th>Time:</th> <td>23:59:30</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",
@@ -981,8 +980,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:} & Sun, 20 Aug 2023 & \\textbf{ Prob (F-statistic):} & 5.08e-88 \\\\\n", "\\textbf{Date:} & Mon, 21 Aug 2023 & \\textbf{ Prob (F-statistic):} & 5.08e-88 \\\\\n",
"\\textbf{Time:} & 19:28:54 & \\textbf{ Log-Likelihood: } & -1641.5 \\\\\n", "\\textbf{Time:} & 23:59:30 & \\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",
@@ -1017,8 +1016,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: Sun, 20 Aug 2023 Prob (F-statistic): 5.08e-88\n", "Date: Mon, 21 Aug 2023 Prob (F-statistic): 5.08e-88\n",
"Time: 19:28:54 Log-Likelihood: -1641.5\n", "Time: 23:59:30 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",
@@ -2496,7 +2495,7 @@
{ {
"data": { "data": {
"text/plain": [ "text/plain": [
"<matplotlib.lines.Line2D at 0x17e383610>" "<matplotlib.lines.Line2D at 0x2906aa3e0>"
] ]
}, },
"execution_count": 34, "execution_count": 34,
@@ -2787,7 +2786,7 @@
"metadata": { "metadata": {
"jupytext": { "jupytext": {
"cell_metadata_filter": "-all", "cell_metadata_filter": "-all",
"formats": "ipynb,Rmd", "formats": "Rmd,ipynb",
"main_language": "python" "main_language": "python"
}, },
"language_info": { "language_info": {
@@ -2800,7 +2799,7 @@
"name": "python", "name": "python",
"nbconvert_exporter": "python", "nbconvert_exporter": "python",
"pygments_lexer": "ipython3", "pygments_lexer": "ipython3",
"version": "3.11.4" "version": "3.10.12"
} }
}, },
"nbformat": 4, "nbformat": 4,

View File

@@ -2,7 +2,7 @@
jupyter: jupyter:
jupytext: jupytext:
cell_metadata_filter: -all cell_metadata_filter: -all
formats: ipynb,Rmd formats: Rmd,ipynb
main_language: python main_language: python
text_representation: text_representation:
extension: .Rmd extension: .Rmd

View File

@@ -4543,7 +4543,7 @@
"name": "stderr", "name": "stderr",
"output_type": "stream", "output_type": "stream",
"text": [ "text": [
"/var/folders/16/8y65_zv174qgdp4ktlmpv12h0000gq/T/ipykernel_80940/3779905754.py:8: UserWarning: FixedFormatter should only be used together with FixedLocator\n", "/var/folders/16/8y65_zv174qgdp4ktlmpv12h0000gq/T/ipykernel_84444/3779905754.py:8: UserWarning: FixedFormatter should only be used together with FixedLocator\n",
" ax_hr.set_xticklabels(range(24)[::2], fontsize=20)\n" " ax_hr.set_xticklabels(range(24)[::2], fontsize=20)\n"
] ]
}, },
@@ -4636,7 +4636,7 @@
"metadata": { "metadata": {
"jupytext": { "jupytext": {
"cell_metadata_filter": "-all", "cell_metadata_filter": "-all",
"formats": "ipynb,Rmd", "formats": "Rmd,ipynb",
"main_language": "python" "main_language": "python"
}, },
"language_info": { "language_info": {
@@ -4649,7 +4649,7 @@
"name": "python", "name": "python",
"nbconvert_exporter": "python", "nbconvert_exporter": "python",
"pygments_lexer": "ipython3", "pygments_lexer": "ipython3",
"version": "3.11.4" "version": "3.10.12"
} }
}, },
"nbformat": 4, "nbformat": 4,

View File

@@ -2,7 +2,7 @@
jupyter: jupyter:
jupytext: jupytext:
cell_metadata_filter: -all cell_metadata_filter: -all
formats: ipynb,Rmd formats: Rmd,ipynb
main_language: python main_language: python
text_representation: text_representation:
extension: .Rmd extension: .Rmd

View File

@@ -1149,7 +1149,7 @@
"metadata": { "metadata": {
"jupytext": { "jupytext": {
"cell_metadata_filter": "-all", "cell_metadata_filter": "-all",
"formats": "ipynb,Rmd", "formats": "Rmd,ipynb",
"main_language": "python" "main_language": "python"
}, },
"language_info": { "language_info": {
@@ -1162,7 +1162,7 @@
"name": "python", "name": "python",
"nbconvert_exporter": "python", "nbconvert_exporter": "python",
"pygments_lexer": "ipython3", "pygments_lexer": "ipython3",
"version": "3.11.4" "version": "3.10.12"
} }
}, },
"nbformat": 4, "nbformat": 4,

View File

@@ -2,7 +2,7 @@
jupyter: jupyter:
jupytext: jupytext:
cell_metadata_filter: -all cell_metadata_filter: -all
formats: ipynb,Rmd formats: Rmd,ipynb
main_language: python main_language: python
text_representation: text_representation:
extension: .Rmd extension: .Rmd

File diff suppressed because it is too large Load Diff

View File

@@ -2,7 +2,7 @@
jupyter: jupyter:
jupytext: jupytext:
cell_metadata_filter: -all cell_metadata_filter: -all
formats: ipynb,Rmd formats: Rmd,ipynb
main_language: python main_language: python
text_representation: text_representation:
extension: .Rmd extension: .Rmd

View File

@@ -2541,7 +2541,7 @@
"name": "stderr", "name": "stderr",
"output_type": "stream", "output_type": "stream",
"text": [ "text": [
"/var/folders/16/8y65_zv174qgdp4ktlmpv12h0000gq/T/ipykernel_81087/2135516388.py:1: UserWarning: KNOWN BUG: p-values computed in this summary are likely much smaller than they should be. \n", "/var/folders/16/8y65_zv174qgdp4ktlmpv12h0000gq/T/ipykernel_84754/2135516388.py:1: UserWarning: KNOWN BUG: p-values computed in this summary are likely much smaller than they should be. \n",
" \n", " \n",
"Please do not make inferences based on these values! \n", "Please do not make inferences based on these values! \n",
"\n", "\n",
@@ -2977,7 +2977,7 @@
"metadata": { "metadata": {
"jupytext": { "jupytext": {
"cell_metadata_filter": "-all", "cell_metadata_filter": "-all",
"formats": "ipynb,Rmd", "formats": "Rmd,ipynb",
"main_language": "python" "main_language": "python"
}, },
"language_info": { "language_info": {
@@ -2990,7 +2990,7 @@
"name": "python", "name": "python",
"nbconvert_exporter": "python", "nbconvert_exporter": "python",
"pygments_lexer": "ipython3", "pygments_lexer": "ipython3",
"version": "3.11.4" "version": "3.10.12"
} }
}, },
"nbformat": 4, "nbformat": 4,

View File

@@ -2,7 +2,7 @@
jupyter: jupyter:
jupytext: jupytext:
cell_metadata_filter: -all cell_metadata_filter: -all
formats: ipynb,Rmd formats: Rmd,ipynb
main_language: python main_language: python
text_representation: text_representation:
extension: .Rmd extension: .Rmd

View File

@@ -1584,7 +1584,7 @@
"metadata": { "metadata": {
"jupytext": { "jupytext": {
"cell_metadata_filter": "-all", "cell_metadata_filter": "-all",
"formats": "ipynb,Rmd", "formats": "Rmd,ipynb",
"main_language": "python" "main_language": "python"
}, },
"language_info": { "language_info": {
@@ -1597,7 +1597,7 @@
"name": "python", "name": "python",
"nbconvert_exporter": "python", "nbconvert_exporter": "python",
"pygments_lexer": "ipython3", "pygments_lexer": "ipython3",
"version": "3.11.4" "version": "3.10.12"
} }
}, },
"nbformat": 4, "nbformat": 4,

View File

@@ -2,7 +2,7 @@
jupyter: jupyter:
jupytext: jupytext:
cell_metadata_filter: -all cell_metadata_filter: -all
formats: ipynb,Rmd formats: Rmd,ipynb
main_language: python main_language: python
text_representation: text_representation:
extension: .Rmd extension: .Rmd

View File

@@ -889,7 +889,7 @@
{ {
"data": { "data": {
"text/plain": [ "text/plain": [
"<matplotlib.collections.PathCollection at 0x28b7c65d0>" "<matplotlib.collections.PathCollection at 0x282f53730>"
] ]
}, },
"execution_count": 20, "execution_count": 20,
@@ -1730,7 +1730,7 @@
"metadata": { "metadata": {
"jupytext": { "jupytext": {
"cell_metadata_filter": "-all", "cell_metadata_filter": "-all",
"formats": "ipynb,Rmd", "formats": "Rmd,ipynb",
"main_language": "python" "main_language": "python"
}, },
"language_info": { "language_info": {
@@ -1743,7 +1743,7 @@
"name": "python", "name": "python",
"nbconvert_exporter": "python", "nbconvert_exporter": "python",
"pygments_lexer": "ipython3", "pygments_lexer": "ipython3",
"version": "3.11.4" "version": "3.10.12"
} }
}, },
"nbformat": 4, "nbformat": 4,

View File

@@ -1,3 +1,14 @@
---
jupyter:
jupytext:
cell_metadata_filter: -all
formats: Rmd,ipynb
text_representation:
extension: .Rmd
format_name: rmarkdown
format_version: '1.2'
jupytext_version: 1.14.7
---
# Chapter 10 # Chapter 10

File diff suppressed because one or more lines are too long

View File

@@ -2,7 +2,7 @@
jupyter: jupyter:
jupytext: jupytext:
cell_metadata_filter: -all cell_metadata_filter: -all
formats: ipynb,Rmd formats: Rmd,ipynb
main_language: python main_language: python
text_representation: text_representation:
extension: .Rmd extension: .Rmd

View File

@@ -2528,7 +2528,7 @@
"metadata": { "metadata": {
"jupytext": { "jupytext": {
"cell_metadata_filter": "-all", "cell_metadata_filter": "-all",
"formats": "ipynb,Rmd", "formats": "Rmd,ipynb",
"main_language": "python" "main_language": "python"
}, },
"language_info": { "language_info": {
@@ -2541,7 +2541,7 @@
"name": "python", "name": "python",
"nbconvert_exporter": "python", "nbconvert_exporter": "python",
"pygments_lexer": "ipython3", "pygments_lexer": "ipython3",
"version": "3.11.4" "version": "3.10.12"
} }
}, },
"nbformat": 4, "nbformat": 4,

View File

@@ -2,7 +2,7 @@
jupyter: jupyter:
jupytext: jupytext:
cell_metadata_filter: -all cell_metadata_filter: -all
formats: ipynb,Rmd formats: Rmd,ipynb
main_language: python main_language: python
text_representation: text_representation:
extension: .Rmd extension: .Rmd

View File

@@ -3102,7 +3102,7 @@
"metadata": { "metadata": {
"jupytext": { "jupytext": {
"cell_metadata_filter": "-all", "cell_metadata_filter": "-all",
"formats": "ipynb,Rmd", "formats": "Rmd,ipynb",
"main_language": "python" "main_language": "python"
}, },
"language_info": { "language_info": {
@@ -3115,7 +3115,7 @@
"name": "python", "name": "python",
"nbconvert_exporter": "python", "nbconvert_exporter": "python",
"pygments_lexer": "ipython3", "pygments_lexer": "ipython3",
"version": "3.11.4" "version": "3.10.12"
} }
}, },
"nbformat": 4, "nbformat": 4,

View File

@@ -2,7 +2,7 @@
jupyter: jupyter:
jupytext: jupytext:
cell_metadata_filter: -all cell_metadata_filter: -all
formats: ipynb,Rmd formats: Rmd,ipynb
main_language: python main_language: python
text_representation: text_representation:
extension: .Rmd extension: .Rmd

View File

@@ -1423,7 +1423,7 @@
"metadata": { "metadata": {
"jupytext": { "jupytext": {
"cell_metadata_filter": "-all", "cell_metadata_filter": "-all",
"formats": "ipynb,Rmd", "formats": "Rmd,ipynb",
"main_language": "python" "main_language": "python"
}, },
"language_info": { "language_info": {
@@ -1436,7 +1436,7 @@
"name": "python", "name": "python",
"nbconvert_exporter": "python", "nbconvert_exporter": "python",
"pygments_lexer": "ipython3", "pygments_lexer": "ipython3",
"version": "3.11.4" "version": "3.10.12"
} }
}, },
"nbformat": 4, "nbformat": 4,

View File

@@ -1,6 +1,6 @@
# ISLP_labs # ISLP_labs
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/intro-stat-learning/ISLP_labs/v2.1) [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/intro-stat-learning/ISLP_labs/v2.1.2)
Up-to-date version of labs for ISLP. Up-to-date version of labs for ISLP.
@@ -12,7 +12,7 @@ intent is that building a conda environment with
To install the current version of the requirements run To install the current version of the requirements run
``` ```
pip install -r https://raw.githubusercontent.com/intro-stat-learning/ISLP_labs/v2.1/requirements.txt; pip install -r https://raw.githubusercontent.com/intro-stat-learning/ISLP_labs/v2.1.2/requirements.txt;
``` ```
The labs can now be run from this directory: The labs can now be run from this directory: