Skip to content

Commit 5bb0366

Browse files
committed
Replace handson-ml2 with handson-ml3, and fix figure chapter numbers
1 parent e38983d commit 5bb0366

23 files changed

+137
-137
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ assignees: ''
1010
Thanks for helping us improve this project!
1111

1212
**Before you create this issue**
13-
Please make sure you are using the latest updated code and libraries: see https://github.com/ageron/handson-ml2/blob/master/INSTALL.md#update-this-project-and-its-libraries
13+
Please make sure you are using the latest updated code and libraries: see https://github.com/ageron/handson-ml3/blob/main/INSTALL.md#update-this-project-and-its-libraries
1414

15-
Also please make sure to read the FAQ (https://github.com/ageron/handson-ml2#faq) and search for existing issues (both open and closed), as your question may already have been answered: https://github.com/ageron/handson-ml2/issues
15+
Also please make sure to read the FAQ (https://github.com/ageron/handson-ml3#faq) and search for existing issues (both open and closed), as your question may already have been answered: https://github.com/ageron/handson-ml3/issues
1616

1717
**Describe the bug**
1818
Please provide a clear and concise description of what the bug is, and specify the notebook name and the cell number at which the problem occurs (or the chapter and page in the book).

.github/ISSUE_TEMPLATE/clarification-request.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ assignees: ''
1010
Thanks for helping us improve this project!
1111

1212
**Before you create this issue**
13-
Please make sure you are using the latest updated code and libraries: see https://github.com/ageron/handson-ml2/blob/master/INSTALL.md#update-this-project-and-its-libraries
13+
Please make sure you are using the latest updated code and libraries: see https://github.com/ageron/handson-ml3/blob/main/INSTALL.md#update-this-project-and-its-libraries
1414

15-
Also please make sure to read the FAQ (https://github.com/ageron/handson-ml2#faq) and search for existing issues (both open and closed), as your question may already have been answered: https://github.com/ageron/handson-ml2/issues
15+
Also please make sure to read the FAQ (https://github.com/ageron/handson-ml3#faq) and search for existing issues (both open and closed), as your question may already have been answered: https://github.com/ageron/handson-ml3/issues
1616

1717
**Describe what is unclear to you**
1818
Please provide a clear and concise description of what the problem is, and specify the notebook name and the cell number at which the problem occurs (or the chapter and page in the book).

.github/ISSUE_TEMPLATE/feature-or-improvement-request.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ assignees: ''
1010
Thanks for helping us improve this project!
1111

1212
**Before you create this issue**
13-
Please make sure you are using the latest updated code and libraries: see https://github.com/ageron/handson-ml2/blob/master/INSTALL.md#update-this-project-and-its-libraries
13+
Please make sure you are using the latest updated code and libraries: see https://github.com/ageron/handson-ml3/blob/main/INSTALL.md#update-this-project-and-its-libraries
1414

15-
Also please make sure to read the FAQ (https://github.com/ageron/handson-ml2#faq) and search for existing issues (both open and closed), as your question may already have been answered: https://github.com/ageron/handson-ml2/issues
15+
Also please make sure to read the FAQ (https://github.com/ageron/handson-ml3#faq) and search for existing issues (both open and closed), as your question may already have been answered: https://github.com/ageron/handson-ml3/issues
1616

1717
**Is your feature request related to a problem? Please describe.**
1818
Please indicate the notebook name and cell number where the problem occurs (or the chapter and page number in the book), and provide a clear and concise description of what the problem is. Ex. In chapter 1, cells 200-220, I think the code could be clearer [...]

01_the_machine_learning_landscape.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@
1717
"source": [
1818
"<table align=\"left\">\n",
1919
" <td>\n",
20-
" <a href=\"https://colab.research.google.com/github/ageron/handson-ml2/blob/master/01_the_machine_learning_landscape.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>\n",
20+
" <a href=\"https://colab.research.google.com/github/ageron/handson-ml3/blob/main/01_the_machine_learning_landscape.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>\n",
2121
" </td>\n",
2222
" <td>\n",
23-
" <a target=\"_blank\" href=\"https://kaggle.com/kernels/welcome?src=https://github.com/ageron/handson-ml2/blob/master/01_the_machine_learning_landscape.ipynb\"><img src=\"https://kaggle.com/static/images/open-in-kaggle.svg\" /></a>\n",
23+
" <a target=\"_blank\" href=\"https://kaggle.com/kernels/welcome?src=https://github.com/ageron/handson-ml3/blob/main/01_the_machine_learning_landscape.ipynb\"><img src=\"https://kaggle.com/static/images/open-in-kaggle.svg\" /></a>\n",
2424
" </td>\n",
2525
"</table>"
2626
]
@@ -127,7 +127,7 @@
127127
"datapath = Path() / \"datasets\" / \"lifesat\"\n",
128128
"datapath.mkdir(parents=True, exist_ok=True)\n",
129129
"\n",
130-
"root = \"https://raw.githubusercontent.com/ageron/handson-ml2/master/\"\n",
130+
"root = \"https://raw.githubusercontent.com/ageron/handson-ml3/main/\"\n",
131131
"filename = \"lifesat.csv\"\n",
132132
"if not (datapath / filename).is_file():\n",
133133
" print(\"Downloading\", filename)\n",

02_end_to_end_machine_learning_project.ipynb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@
2020
"source": [
2121
"<table align=\"left\">\n",
2222
" <td>\n",
23-
" <a href=\"https://colab.research.google.com/github/ageron/handson-ml2/blob/master/02_end_to_end_machine_learning_project.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>\n",
23+
" <a href=\"https://colab.research.google.com/github/ageron/handson-ml3/blob/main/02_end_to_end_machine_learning_project.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>\n",
2424
" </td>\n",
2525
" <td>\n",
26-
" <a target=\"_blank\" href=\"https://kaggle.com/kernels/welcome?src=https://github.com/ageron/handson-ml2/blob/master/02_end_to_end_machine_learning_project.ipynb\"><img src=\"https://kaggle.com/static/images/open-in-kaggle.svg\" /></a>\n",
26+
" <a target=\"_blank\" href=\"https://kaggle.com/kernels/welcome?src=https://github.com/ageron/handson-ml3/blob/main/02_end_to_end_machine_learning_project.ipynb\"><img src=\"https://kaggle.com/static/images/open-in-kaggle.svg\" /></a>\n",
2727
" </td>\n",
2828
"</table>"
2929
]
@@ -110,7 +110,7 @@
110110
" housing_path = Path() / \"datasets\" / \"housing\"\n",
111111
" if not (housing_path / \"housing.csv\").is_file():\n",
112112
" housing_path.mkdir(parents=True, exist_ok=True)\n",
113-
" root = \"https://raw.githubusercontent.com/ageron/handson-ml2/master/\"\n",
113+
" root = \"https://raw.githubusercontent.com/ageron/handson-ml3/main/\"\n",
114114
" url = root + \"datasets/housing/housing.tgz\"\n",
115115
" tgz_path = housing_path / \"housing.tgz\"\n",
116116
" urllib.request.urlretrieve(url, tgz_path)\n",
@@ -592,7 +592,7 @@
592592
"# Download the California image\n",
593593
"filename = \"california.png\"\n",
594594
"if not (IMAGES_PATH / filename).is_file():\n",
595-
" root = \"https://raw.githubusercontent.com/ageron/handson-ml2/master/\"\n",
595+
" root = \"https://raw.githubusercontent.com/ageron/handson-ml3/main/\"\n",
596596
" url = root + \"images/end_to_end_project/\" + filename\n",
597597
" print(\"Downloading\", filename)\n",
598598
" urllib.request.urlretrieve(url, IMAGES_PATH / filename)\n",

03_classification.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@
2020
"source": [
2121
"<table align=\"left\">\n",
2222
" <td>\n",
23-
" <a href=\"https://colab.research.google.com/github/ageron/handson-ml2/blob/master/03_classification.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>\n",
23+
" <a href=\"https://colab.research.google.com/github/ageron/handson-ml3/blob/main/03_classification.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>\n",
2424
" </td>\n",
2525
" <td>\n",
26-
" <a target=\"_blank\" href=\"https://kaggle.com/kernels/welcome?src=https://github.com/ageron/handson-ml2/blob/master/03_classification.ipynb\"><img src=\"https://kaggle.com/static/images/open-in-kaggle.svg\" /></a>\n",
26+
" <a target=\"_blank\" href=\"https://kaggle.com/kernels/welcome?src=https://github.com/ageron/handson-ml3/blob/main/03_classification.ipynb\"><img src=\"https://kaggle.com/static/images/open-in-kaggle.svg\" /></a>\n",
2727
" </td>\n",
2828
"</table>"
2929
]
@@ -1635,7 +1635,7 @@
16351635
" filepath = titanic_path / filename\n",
16361636
" if filepath.is_file():\n",
16371637
" continue\n",
1638-
" root = \"https://raw.githubusercontent.com/ageron/handson-ml2/master/\"\n",
1638+
" root = \"https://raw.githubusercontent.com/ageron/handson-ml3/main/\"\n",
16391639
" url = root + \"/datasets/titanic/\" + filename\n",
16401640
" print(\"Downloading\", filename)\n",
16411641
" urllib.request.urlretrieve(url, filepath)\n",

04_training_linear_models.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@
2020
"source": [
2121
"<table align=\"left\">\n",
2222
" <td>\n",
23-
" <a href=\"https://colab.research.google.com/github/ageron/handson-ml2/blob/master/04_training_linear_models.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>\n",
23+
" <a href=\"https://colab.research.google.com/github/ageron/handson-ml3/blob/main/04_training_linear_models.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>\n",
2424
" </td>\n",
2525
" <td>\n",
26-
" <a target=\"_blank\" href=\"https://kaggle.com/kernels/welcome?src=https://github.com/ageron/handson-ml2/blob/master/04_training_linear_models.ipynb\"><img src=\"https://kaggle.com/static/images/open-in-kaggle.svg\" /></a>\n",
26+
" <a target=\"_blank\" href=\"https://kaggle.com/kernels/welcome?src=https://github.com/ageron/handson-ml3/blob/main/04_training_linear_models.ipynb\"><img src=\"https://kaggle.com/static/images/open-in-kaggle.svg\" /></a>\n",
2727
" </td>\n",
2828
"</table>"
2929
]

06_decision_trees.ipynb

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
"cell_type": "markdown",
55
"metadata": {},
66
"source": [
7-
"**Chapter 5 – Decision Trees**"
7+
"**Chapter 6 – Decision Trees**"
88
]
99
},
1010
{
1111
"cell_type": "markdown",
1212
"metadata": {},
1313
"source": [
14-
"_This notebook contains all the sample code and solutions to the exercises in chapter 5._"
14+
"_This notebook contains all the sample code and solutions to the exercises in chapter 6._"
1515
]
1616
},
1717
{
@@ -20,10 +20,10 @@
2020
"source": [
2121
"<table align=\"left\">\n",
2222
" <td>\n",
23-
" <a href=\"https://colab.research.google.com/github/ageron/handson-ml2/blob/master/06_decision_trees.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>\n",
23+
" <a href=\"https://colab.research.google.com/github/ageron/handson-ml3/blob/main/06_decision_trees.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>\n",
2424
" </td>\n",
2525
" <td>\n",
26-
" <a target=\"_blank\" href=\"https://kaggle.com/kernels/welcome?src=https://github.com/ageron/handson-ml2/blob/master/06_decision_trees.ipynb\"><img src=\"https://kaggle.com/static/images/open-in-kaggle.svg\" /></a>\n",
26+
" <a target=\"_blank\" href=\"https://kaggle.com/kernels/welcome?src=https://github.com/ageron/handson-ml3/blob/main/06_decision_trees.ipynb\"><img src=\"https://kaggle.com/static/images/open-in-kaggle.svg\" /></a>\n",
2727
" </td>\n",
2828
"</table>"
2929
]
@@ -146,7 +146,7 @@
146146
"cell_type": "markdown",
147147
"metadata": {},
148148
"source": [
149-
"**This code example generates Figure 5–1. Iris Decision Tree:**"
149+
"**This code example generates Figure 6–1. Iris Decision Tree:**"
150150
]
151151
},
152152
{
@@ -224,7 +224,7 @@
224224
" plt.plot(X_iris[:, 0][y_iris == idx], X_iris[:, 1][y_iris == idx],\n",
225225
" style, label=f\"Iris {name}\")\n",
226226
"\n",
227-
"# not in the book – this section beautifies and saves Figure 5–2\n",
227+
"# not in the book – this section beautifies and saves Figure 6–2\n",
228228
"tree_clf_deeper = DecisionTreeClassifier(max_depth=3, random_state=42)\n",
229229
"tree_clf_deeper.fit(X_iris, y_iris)\n",
230230
"th0, th1, th2a, th2b = tree_clf_deeper.tree_.threshold[[0, 2, 3, 6]]\n",
@@ -339,7 +339,7 @@
339339
"metadata": {},
340340
"outputs": [],
341341
"source": [
342-
"# not in the book – this cell generates and saves Figure 5–3\n",
342+
"# not in the book – this cell generates and saves Figure 6–3\n",
343343
"\n",
344344
"def plot_decision_boundary(clf, X, y, axes, cmap):\n",
345345
" x1, x2 = np.meshgrid(np.linspace(axes[0], axes[1], 100),\n",
@@ -480,7 +480,7 @@
480480
"metadata": {},
481481
"outputs": [],
482482
"source": [
483-
"# not in the book – this cell generates and saves Figure 5–5\n",
483+
"# not in the book – this cell generates and saves Figure 6–5\n",
484484
"\n",
485485
"def plot_regression_predictions(tree_reg, X, y, axes=[-0.5, 0.5, -0.05, 0.25]):\n",
486486
" x1 = np.linspace(axes[0], axes[1], 500).reshape(-1, 1)\n",
@@ -524,7 +524,7 @@
524524
"metadata": {},
525525
"outputs": [],
526526
"source": [
527-
"# not in the book – this cell generates and saves Figure 5–6\n",
527+
"# not in the book – this cell generates and saves Figure 6–6\n",
528528
"\n",
529529
"tree_reg1 = DecisionTreeRegressor(random_state=42)\n",
530530
"tree_reg2 = DecisionTreeRegressor(random_state=42, min_samples_leaf=10)\n",
@@ -577,7 +577,7 @@
577577
"metadata": {},
578578
"outputs": [],
579579
"source": [
580-
"# not in the book – this cell generates and saves Figure 5–7\n",
580+
"# not in the book – this cell generates and saves Figure 6–7\n",
581581
"\n",
582582
"np.random.seed(6)\n",
583583
"X_square = np.random.rand(100, 2) - 0.5\n",
@@ -628,7 +628,7 @@
628628
"metadata": {},
629629
"outputs": [],
630630
"source": [
631-
"# not in the book – this cell generates and saves Figure 5–8\n",
631+
"# not in the book – this cell generates and saves Figure 6–8\n",
632632
"\n",
633633
"plt.figure(figsize=(8, 4))\n",
634634
"\n",
@@ -691,7 +691,7 @@
691691
"metadata": {},
692692
"outputs": [],
693693
"source": [
694-
"# not in the book – this cell generates and saves Figure 5–9\n",
694+
"# not in the book – this cell generates and saves Figure 6–9\n",
695695
"\n",
696696
"plt.figure(figsize=(8, 4))\n",
697697
"y_pred = tree_clf_tweaked.predict(X_iris_all).reshape(lengths.shape)\n",

07_ensemble_learning_and_random_forests.ipynb

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
"cell_type": "markdown",
55
"metadata": {},
66
"source": [
7-
"**Chapter 6 – Ensemble Learning and Random Forests**"
7+
"**Chapter 7 – Ensemble Learning and Random Forests**"
88
]
99
},
1010
{
1111
"cell_type": "markdown",
1212
"metadata": {},
1313
"source": [
14-
"_This notebook contains all the sample code and solutions to the exercises in chapter 6._"
14+
"_This notebook contains all the sample code and solutions to the exercises in chapter 7._"
1515
]
1616
},
1717
{
@@ -20,10 +20,10 @@
2020
"source": [
2121
"<table align=\"left\">\n",
2222
" <td>\n",
23-
" <a href=\"https://colab.research.google.com/github/ageron/handson-ml2/blob/master/07_ensemble_learning_and_random_forests.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>\n",
23+
" <a href=\"https://colab.research.google.com/github/ageron/handson-ml3/blob/main/07_ensemble_learning_and_random_forests.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>\n",
2424
" </td>\n",
2525
" <td>\n",
26-
" <a target=\"_blank\" href=\"https://kaggle.com/kernels/welcome?src=https://github.com/ageron/handson-ml2/blob/master/07_ensemble_learning_and_random_forests.ipynb\"><img src=\"https://kaggle.com/static/images/open-in-kaggle.svg\" /></a>\n",
26+
" <a target=\"_blank\" href=\"https://kaggle.com/kernels/welcome?src=https://github.com/ageron/handson-ml3/blob/main/07_ensemble_learning_and_random_forests.ipynb\"><img src=\"https://kaggle.com/static/images/open-in-kaggle.svg\" /></a>\n",
2727
" </td>\n",
2828
"</table>"
2929
]
@@ -131,7 +131,7 @@
131131
"metadata": {},
132132
"outputs": [],
133133
"source": [
134-
"# not in the book – this cell generates and saves Figure 6–3\n",
134+
"# not in the book – this cell generates and saves Figure 7–3\n",
135135
"\n",
136136
"import matplotlib.pyplot as plt\n",
137137
"import numpy as np\n",
@@ -271,7 +271,7 @@
271271
"metadata": {},
272272
"outputs": [],
273273
"source": [
274-
"# not in the book – this cell generates and saves Figure 6–5\n",
274+
"# not in the book – this cell generates and saves Figure 7–5\n",
275275
"\n",
276276
"def plot_decision_boundary(clf, X, y, alpha=1.0):\n",
277277
" axes=[-1.5, 2.4, -1, 1.5]\n",
@@ -445,7 +445,7 @@
445445
"metadata": {},
446446
"outputs": [],
447447
"source": [
448-
"# not in the book – this cell generates and saves Figure 6–6\n",
448+
"# not in the book – this cell generates and saves Figure 7–6\n",
449449
"\n",
450450
"from sklearn.datasets import fetch_openml\n",
451451
"\n",
@@ -478,7 +478,7 @@
478478
"metadata": {},
479479
"outputs": [],
480480
"source": [
481-
"# not in the book – this cell generates and saves Figure 6–8\n",
481+
"# not in the book – this cell generates and saves Figure 7–8\n",
482482
"\n",
483483
"m = len(X_train)\n",
484484
"\n",
@@ -613,7 +613,7 @@
613613
"metadata": {},
614614
"outputs": [],
615615
"source": [
616-
"# not in the book – this cell generates and saves Figure 6–9\n",
616+
"# not in the book – this cell generates and saves Figure 7–9\n",
617617
"\n",
618618
"def plot_predictions(regressors, X, y, axes, style,\n",
619619
" label=None, data_style=\"b.\", data_label=None):\n",
@@ -713,7 +713,7 @@
713713
"metadata": {},
714714
"outputs": [],
715715
"source": [
716-
"# not in the book – this cell generates and saves Figure 6–10\n",
716+
"# not in the book – this cell generates and saves Figure 7–10\n",
717717
"\n",
718718
"fix, axes = plt.subplots(ncols=2, figsize=(10,4), sharey=True)\n",
719719
"\n",
@@ -753,7 +753,7 @@
753753
" housing_path = Path() / \"datasets\" / \"housing\"\n",
754754
" if not (housing_path / \"housing.csv\").is_file():\n",
755755
" housing_path.mkdir(parents=True, exist_ok=True)\n",
756-
" root = \"https://raw.githubusercontent.com/ageron/handson-ml2/master/\"\n",
756+
" root = \"https://raw.githubusercontent.com/ageron/handson-ml3/main/\"\n",
757757
" url = root + \"datasets/housing/housing.tgz\"\n",
758758
" tgz_path = housing_path / \"housing.tgz\"\n",
759759
" urllib.request.urlretrieve(url, tgz_path)\n",

0 commit comments

Comments
 (0)