Replace handson-ml2 with handson-ml3, and fix figure chapter numbers

This commit is contained in:
Aurélien Geron
2021-11-23 15:42:16 +13:00
parent e38983d595
commit 5bb0366125
23 changed files with 137 additions and 137 deletions

View File

@@ -4,14 +4,14 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"**Chapter 7 Dimensionality Reduction**"
"**Chapter 8 Dimensionality Reduction**"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"_This notebook contains all the sample code and solutions to the exercises in chapter 7._"
"_This notebook contains all the sample code and solutions to the exercises in chapter 8._"
]
},
{
@@ -20,10 +20,10 @@
"source": [
"<table align=\"left\">\n",
" <td>\n",
" <a href=\"https://colab.research.google.com/github/ageron/handson-ml2/blob/master/08_dimensionality_reduction.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>\n",
" <a href=\"https://colab.research.google.com/github/ageron/handson-ml3/blob/main/08_dimensionality_reduction.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>\n",
" </td>\n",
" <td>\n",
" <a target=\"_blank\" href=\"https://kaggle.com/kernels/welcome?src=https://github.com/ageron/handson-ml2/blob/master/08_dimensionality_reduction.ipynb\"><img src=\"https://kaggle.com/static/images/open-in-kaggle.svg\" /></a>\n",
" <a target=\"_blank\" href=\"https://kaggle.com/kernels/welcome?src=https://github.com/ageron/handson-ml3/blob/main/08_dimensionality_reduction.ipynb\"><img src=\"https://kaggle.com/static/images/open-in-kaggle.svg\" /></a>\n",
" </td>\n",
"</table>"
]
@@ -175,7 +175,7 @@
},
"outputs": [],
"source": [
"# not in the book this code generates and saves Figure 72\n",
"# not in the book this code generates and saves Figure 82\n",
"\n",
"import matplotlib.pyplot as plt\n",
"from mpl_toolkits.mplot3d import Axes3D\n",
@@ -243,7 +243,7 @@
"metadata": {},
"outputs": [],
"source": [
"# not in the book this code generates and saves Figure 73\n",
"# not in the book this code generates and saves Figure 83\n",
"\n",
"fig = plt.figure()\n",
"ax = fig.add_subplot(1, 1, 1, aspect='equal')\n",
@@ -279,7 +279,7 @@
"metadata": {},
"outputs": [],
"source": [
"# not in the book this code generates and saves Figure 74\n",
"# not in the book this code generates and saves Figure 84\n",
"\n",
"from matplotlib.colors import ListedColormap\n",
"\n",
@@ -303,7 +303,7 @@
"metadata": {},
"outputs": [],
"source": [
"# not in the book this code generates and saves plots for Figure 75\n",
"# not in the book this code generates and saves plots for Figure 85\n",
"\n",
"plt.figure(figsize=(10, 4))\n",
"\n",
@@ -330,7 +330,7 @@
"metadata": {},
"outputs": [],
"source": [
"# not in the book this code generates and saves plots for Figure 76\n",
"# not in the book this code generates and saves plots for Figure 86\n",
" \n",
"axes = [-11.5, 14, -2, 23, -12, 15]\n",
"x2s = np.linspace(axes[2], axes[3], 10)\n",
@@ -402,7 +402,7 @@
"metadata": {},
"outputs": [],
"source": [
"# not in the book this code generates and saves Figure 77\n",
"# not in the book this code generates and saves Figure 87\n",
"\n",
"angle = np.pi / 5\n",
"stretch = 5\n",
@@ -795,7 +795,7 @@
"metadata": {},
"outputs": [],
"source": [
"# not in the book this cell generates and saves Figure 79\n",
"# not in the book this cell generates and saves Figure 89\n",
"\n",
"plt.figure(figsize=(7, 4))\n",
"for idx, X in enumerate((X_train[::2100], X_recovered[::2100])):\n",
@@ -1027,7 +1027,7 @@
"metadata": {},
"outputs": [],
"source": [
"# not in the book this cell generates and saves Figure 710\n",
"# not in the book this cell generates and saves Figure 810\n",
"\n",
"plt.title(\"Unrolled swiss roll using LLE\")\n",
"plt.scatter(X_unrolled[:, 0], X_unrolled[:, 1],\n",
@@ -1099,7 +1099,7 @@
"metadata": {},
"outputs": [],
"source": [
"# not in the book this cell generates and saves Figure 711\n",
"# not in the book this cell generates and saves Figure 811\n",
"\n",
"titles = [\"MDS\", \"Isomap\", \"t-SNE\"]\n",
"\n",