From 015a34e3d47a5d1e15ca42a4f58edf1f50a13efc Mon Sep 17 00:00:00 2001 From: udlbook <110402648+udlbook@users.noreply.github.com> Date: Tue, 25 Oct 2022 11:44:09 +0100 Subject: [PATCH] Created using Colaboratory --- CM20315_Loss_II.ipynb | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/CM20315_Loss_II.ipynb b/CM20315_Loss_II.ipynb index 3749a06..b3ff145 100644 --- a/CM20315_Loss_II.ipynb +++ b/CM20315_Loss_II.ipynb @@ -5,7 +5,7 @@ "colab": { "provenance": [], "collapsed_sections": [], - "authorship_tag": "ABX9TyPBGTxs29MOs80wv5LpyIcV", + "authorship_tag": "ABX9TyOE0qm8aIpEaNh/aI9gnlkY", "include_colab_link": true }, "kernelspec": { @@ -244,24 +244,6 @@ "id": "R5z_0dzQMF35" } }, - { - "cell_type": "code", - "source": [ - "# Return the likelihood of all of the data under the model\n", - "def compute_likelihood(y_train, lambda_param):\n", - " # TODO -- compute the likelihood of the data -- the product of the normal probabilities for each data point\n", - " # Top line of equation 5.3 in the notes\n", - " # You will need np.prod() and the normal_distribution function you used above\n", - " # Replace the line below\n", - " likelihood = 0\n", - " return likelihood" - ], - "metadata": { - "id": "zpS7o6liCx7f" - }, - "execution_count": null, - "outputs": [] - }, { "cell_type": "code", "source": [ @@ -339,6 +321,24 @@ "id": "OgcRojvPWh4V" } }, + { + "cell_type": "code", + "source": [ + "# Return the likelihood of all of the data under the model\n", + "def compute_likelihood(y_train, lambda_param):\n", + " # TODO -- compute the likelihood of the data -- the product of the Bernoulli probabilities for each data point\n", + " # Top line of equation 5.3 in the notes\n", + " # You will need np.prod() and the bernoulli_distribution function you used above\n", + " # Replace the line below\n", + " likelihood = 0\n", + " return likelihood" + ], + "metadata": { + "id": "zpS7o6liCx7f" + }, + "execution_count": null, + "outputs": [] + }, { "cell_type": "code", "source": [