From e57e3155824c81a54f915edf9505f64d5ccdad84 Mon Sep 17 00:00:00 2001 From: Shaojun Date: Fri, 29 Oct 2021 14:54:02 -0700 Subject: [PATCH] Update 05_pet_breeds.ipynb (#478) * Update 05_pet_breeds.ipynb * Update 05_pet_breeds.ipynb --- 05_pet_breeds.ipynb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/05_pet_breeds.ipynb b/05_pet_breeds.ipynb index 4cc6915..2c53e2d 100644 --- a/05_pet_breeds.ipynb +++ b/05_pet_breeds.ipynb @@ -1105,42 +1105,42 @@ " 0.397531\n", " 0\n", " 0\n", - " 0.602469\n", + " -0.602469\n", " \n", " \n", " 0.502065\n", " 0.497935\n", " 1\n", " 1\n", - " 0.497935\n", + " -0.497935\n", " \n", " \n", " 0.133188\n", " 0.866811\n", " 0\n", " 2\n", - " 0.133188\n", + " -0.133188\n", " \n", " \n", " 0.99664\n", " 0.00336017\n", " 1\n", " 3\n", - " 0.00336017\n", + " -0.00336017\n", " \n", " \n", " 0.595949\n", " 0.404051\n", " 1\n", " 4\n", - " 0.404051\n", + " -0.404051\n", " \n", " \n", " 0.366118\n", " 0.633882\n", " 0\n", " 5\n", - " 0.366118\n", + " -0.366118\n", " \n", " " ], @@ -1158,7 +1158,7 @@ "df = pd.DataFrame(sm_acts, columns=[\"3\",\"7\"])\n", "df['targ'] = targ\n", "df['idx'] = idx\n", - "df['loss'] = sm_acts[range(6), targ]\n", + "df['loss'] = -sm_acts[range(6), targ]\n", "t = df.style.hide_index()\n", "#To have html code compatible with our script\n", "html = t._repr_html_().split('')[1]\n",