From 9286e4f04fd72be38eefd154a19d2b1797aaa886 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Geron?= Date: Tue, 2 Mar 2021 18:14:12 +1300 Subject: [PATCH] Fix comment and simplify 'neighbors' code --- 08_dimensionality_reduction.ipynb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/08_dimensionality_reduction.ipynb b/08_dimensionality_reduction.ipynb index 272c8ea..f7c9cac 100644 --- a/08_dimensionality_reduction.ipynb +++ b/08_dimensionality_reduction.ipynb @@ -1854,7 +1854,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Let's focus on digits 3 and 5, which seem to overlap a lot." + "Let's focus on digits 2, 3 and 5, which seem to overlap a lot." ] }, { @@ -1951,7 +1951,7 @@ " plt.axis(\"off\")\n", " ax = plt.gcf().gca() # get current axes in current figure\n", " for index, image_coord in enumerate(X_normalized):\n", - " closest_distance = np.linalg.norm(np.array(neighbors) - image_coord, axis=1).min()\n", + " closest_distance = np.linalg.norm(neighbors - image_coord, axis=1).min()\n", " if closest_distance > min_distance:\n", " neighbors = np.r_[neighbors, [image_coord]]\n", " if images is None:\n",