Created using Colaboratory
This commit is contained in:
@@ -5,7 +5,7 @@
|
|||||||
"colab": {
|
"colab": {
|
||||||
"provenance": [],
|
"provenance": [],
|
||||||
"collapsed_sections": [],
|
"collapsed_sections": [],
|
||||||
"authorship_tag": "ABX9TyMrfCCH1ll/mV1nl3jPkkXz",
|
"authorship_tag": "ABX9TyNWvWC97VuIGwu4VTE1XbO6",
|
||||||
"include_colab_link": true
|
"include_colab_link": true
|
||||||
},
|
},
|
||||||
"kernelspec": {
|
"kernelspec": {
|
||||||
@@ -307,7 +307,7 @@
|
|||||||
"# Return the negative log likelihood of the data under the model\n",
|
"# Return the negative log likelihood of the data under the model\n",
|
||||||
"def compute_negative_log_likelihood(y_train, mu, sigma):\n",
|
"def compute_negative_log_likelihood(y_train, mu, sigma):\n",
|
||||||
" # TODO -- compute the likelihood of the data -- don't use the likelihood function above -- compute the negative sum of the log probabilities\n",
|
" # TODO -- compute the likelihood of the data -- don't use the likelihood function above -- compute the negative sum of the log probabilities\n",
|
||||||
" # Bottom line of equation 5.3 in the notes\n",
|
" # Bottom line of equation 5.4 in the notes\n",
|
||||||
" # You will need np.sum(), np.log()\n",
|
" # You will need np.sum(), np.log()\n",
|
||||||
" # Replace the line below\n",
|
" # Replace the line below\n",
|
||||||
" nll = 0\n",
|
" nll = 0\n",
|
||||||
|
|||||||
Reference in New Issue
Block a user