From 267421e5b875ab1661aa9725c798f3c629cfdad8 Mon Sep 17 00:00:00 2001 From: "Carlos A. Iglesias" Date: Thu, 28 Feb 2019 19:19:16 +0100 Subject: [PATCH] Added explanation in visualization of iris --- ml1/2_3_0_Visualisation.ipynb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ml1/2_3_0_Visualisation.ipynb b/ml1/2_3_0_Visualisation.ipynb index b208255..cc74e37 100644 --- a/ml1/2_3_0_Visualisation.ipynb +++ b/ml1/2_3_0_Visualisation.ipynb @@ -170,6 +170,8 @@ "# x and y are all the samples from column 0 (sepal_length) and 1 (sepal_width) respectively\n", "x,y = iris.data[:,0], iris.data[:,1]\n", "\n", + "#if you want to understand better this code, see what happens when you replace name by 0, 1, 2 in the line\n", + "# cond = iris.target == name. \n", "for name in names:\n", " cond = iris.target == name\n", " plt.plot(x[cond], y[cond], linestyle='none', marker='o', label=iris.target_names[name])\n", @@ -262,7 +264,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.5.5" + "version": "3.7.1" }, "latex_envs": { "LaTeX_envs_menu_present": true,