From 9b13823ca8e3d0818b160408332f58373c8746e8 Mon Sep 17 00:00:00 2001 From: Pietro Monticone <38562595+pitmonticone@users.noreply.github.com> Date: Thu, 30 Nov 2023 16:44:42 +0100 Subject: [PATCH] Update CM20315_Training_II.ipynb --- CM20315/CM20315_Training_II.ipynb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CM20315/CM20315_Training_II.ipynb b/CM20315/CM20315_Training_II.ipynb index ede8f18..ac09b14 100644 --- a/CM20315/CM20315_Training_II.ipynb +++ b/CM20315/CM20315_Training_II.ipynb @@ -114,7 +114,7 @@ { "cell_type": "code", "source": [ - "# Initialize the parmaeters and draw the model\n", + "# Initialize the parameters and draw the model\n", "phi = np.zeros((2,1))\n", "phi[0] = 0.6 # Intercept\n", "phi[1] = -0.2 # Slope\n", @@ -314,7 +314,7 @@ " return compute_loss(data[0,:], data[1,:], model, phi_start+ gradient * dist_prop)\n", "\n", "def line_search(data, model, phi, gradient, thresh=.00001, max_dist = 0.1, max_iter = 15, verbose=False):\n", - " # Initialize four points along the rnage we are going to search\n", + " # Initialize four points along the range we are going to search\n", " a = 0\n", " b = 0.33 * max_dist\n", " c = 0.66 * max_dist\n", @@ -345,7 +345,7 @@ " # Rule #2 If point b is less than point c then\n", " # then point d becomes point c, and\n", " # point b becomes 1/3 between a and new d\n", - " # point c beocome 2/3 between a and new d \n", + " # point c becomes 2/3 between a and new d \n", " if lossb < lossc:\n", " d = c\n", " b = a+ (d-a)/3\n", @@ -355,7 +355,7 @@ " # Rule #2 If point c is less than point b then\n", " # then point a becomes point b, and\n", " # point b becomes 1/3 between new a and d\n", - " # point c beocome 2/3 between new a and d \n", + " # point c becomes 2/3 between new a and d \n", " a = b\n", " b = a+ (d-a)/3\n", " c = a+ 2*(d-a)/3\n",