Created using Colaboratory

This commit is contained in:
udlbook
2022-10-25 11:46:59 +01:00
parent 015a34e3d4
commit b23449306e

View File

@@ -4,7 +4,8 @@
"metadata": {
"colab": {
"provenance": [],
"authorship_tag": "ABX9TyN47tCA/ntPUBcb99d7AzCz",
"collapsed_sections": [],
"authorship_tag": "ABX9TyNl/KjOshENtrwKt/IdwaUO",
"include_colab_link": true
},
"kernelspec": {
@@ -269,9 +270,9 @@
"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",
" # TODO -- compute the likelihood of the data -- the product of the categorical 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",
" # You will need np.prod() and the categorical_distribution function you used above\n",
" # Replace the line below\n",
" likelihood = 0\n",
" return likelihood"