Created using Colaboratory

This commit is contained in:
udlbook
2023-12-20 14:15:24 -05:00
parent 7afe033e50
commit f75b1cb983

View File

@@ -4,7 +4,7 @@
"metadata": { "metadata": {
"colab": { "colab": {
"provenance": [], "provenance": [],
"authorship_tag": "ABX9TyMBYNsjj1iTgHUYhAXqUYJd", "authorship_tag": "ABX9TyOSEQVqxE5KrXmsZVh9M3gq",
"include_colab_link": true "include_colab_link": true
}, },
"kernelspec": { "kernelspec": {
@@ -253,7 +253,7 @@
"pr_x1_x2_given_z_val = get_likelihood(x1_mesh,x2_mesh, z_val)\n", "pr_x1_x2_given_z_val = get_likelihood(x1_mesh,x2_mesh, z_val)\n",
"\n", "\n",
"# Plot the result\n", "# Plot the result\n",
"plot_heatmap(x1_mesh, x2_mesh, pr_x1_x2_given_z_val, title=\"Conditional distribution $Pr(x1,x2|z)$\")\n", "plot_heatmap(x1_mesh, x2_mesh, pr_x1_x2_given_z_val, title=\"Conditional distribution $Pr(x_1,x_2|z)$\")\n",
"\n", "\n",
"# TODO -- Experiment with different values of z and make sure that you understand the what is happening." "# TODO -- Experiment with different values of z and make sure that you understand the what is happening."
], ],
@@ -292,7 +292,7 @@
"\n", "\n",
"\n", "\n",
"# Plot the result\n", "# Plot the result\n",
"plot_heatmap(x1_mesh, x2_mesh, pr_x1_x2, title=\"Data density $Pr(x1,x2)$\")\n" "plot_heatmap(x1_mesh, x2_mesh, pr_x1_x2, title=\"Data density $Pr(x_1,x_2)$\")\n"
], ],
"metadata": { "metadata": {
"id": "H0Ijce9VzeCO" "id": "H0Ijce9VzeCO"
@@ -341,7 +341,7 @@
"source": [ "source": [
"x1_samples, x2_samples = draw_samples(500)\n", "x1_samples, x2_samples = draw_samples(500)\n",
"# Plot the result\n", "# Plot the result\n",
"plot_heatmap(x1_mesh, x2_mesh, pr_x1_x2, x1_samples, x2_samples, title=\"Data density $Pr(x1,x2)$\")\n" "plot_heatmap(x1_mesh, x2_mesh, pr_x1_x2, x1_samples, x2_samples, title=\"Data density $Pr(x_1,x_2)$\")\n"
], ],
"metadata": { "metadata": {
"id": "XRmWv99B-BWO" "id": "XRmWv99B-BWO"