Created using Colaboratory
This commit is contained in:
@@ -4,7 +4,8 @@
|
|||||||
"metadata": {
|
"metadata": {
|
||||||
"colab": {
|
"colab": {
|
||||||
"provenance": [],
|
"provenance": [],
|
||||||
"authorship_tag": "ABX9TyN47tCA/ntPUBcb99d7AzCz",
|
"collapsed_sections": [],
|
||||||
|
"authorship_tag": "ABX9TyNl/KjOshENtrwKt/IdwaUO",
|
||||||
"include_colab_link": true
|
"include_colab_link": true
|
||||||
},
|
},
|
||||||
"kernelspec": {
|
"kernelspec": {
|
||||||
@@ -269,9 +270,9 @@
|
|||||||
"source": [
|
"source": [
|
||||||
"# Return the likelihood of all of the data under the model\n",
|
"# Return the likelihood of all of the data under the model\n",
|
||||||
"def compute_likelihood(y_train, lambda_param):\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",
|
" # 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",
|
" # Replace the line below\n",
|
||||||
" likelihood = 0\n",
|
" likelihood = 0\n",
|
||||||
" return likelihood"
|
" return likelihood"
|
||||||
|
|||||||
Reference in New Issue
Block a user