From aa04c283e82a37e99833cecd42a51ed80f9d8205 Mon Sep 17 00:00:00 2001 From: udlbook <110402648+udlbook@users.noreply.github.com> Date: Sun, 17 Dec 2023 17:49:34 -0500 Subject: [PATCH] Update 5_1_Least_Squares_Loss.ipynb --- Notebooks/Chap05/5_1_Least_Squares_Loss.ipynb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Notebooks/Chap05/5_1_Least_Squares_Loss.ipynb b/Notebooks/Chap05/5_1_Least_Squares_Loss.ipynb index d4281ee6..890ce404 100644 --- a/Notebooks/Chap05/5_1_Least_Squares_Loss.ipynb +++ b/Notebooks/Chap05/5_1_Least_Squares_Loss.ipynb @@ -539,8 +539,8 @@ "# Hopefully, you can see that the maximum of the likelihood fn is at the same position as the minimum negative log likelihood\n", "# The least squares solution does not depend on sigma, so it's just flat -- no use here.\n", "# Let's check that:\n", - "print(\"Maximum likelihood = %3.3f, at beta_1=%3.3f\"%( (likelihoods[np.argmax(likelihoods)],sigma_vals[np.argmax(likelihoods)])))\n", - "print(\"Minimum negative log likelihood = %3.3f, at beta_1=%3.3f\"%( (nlls[np.argmin(nlls)],sigma_vals[np.argmin(nlls)])))\n", + "print(\"Maximum likelihood = %3.3f, at sigma=%3.3f\"%( (likelihoods[np.argmax(likelihoods)],sigma_vals[np.argmax(likelihoods)])))\n", + "print(\"Minimum negative log likelihood = %3.3f, at sigma=%3.3f\"%( (nlls[np.argmin(nlls)],sigma_vals[np.argmin(nlls)])))\n", "# Plot the best model\n", "sigma= sigma_vals[np.argmin(nlls)]\n", "y_model = shallow_nn(x_model, beta_0, omega_0, beta_1, omega_1)\n", @@ -564,4 +564,4 @@ } } ] -} \ No newline at end of file +}