Merge pull request #26 from thierryherrmann/chap09_likelihood_fix

chap09 likelihood fix
main
Aurélien Geron 2019-09-02 15:46:46 +08:00 committed by GitHub
commit feb1dcf4a6
1 changed files with 1 additions and 1 deletions

View File

@ -3070,7 +3070,7 @@
"ss = np.linspace(1, 2, 101)\n", "ss = np.linspace(1, 2, 101)\n",
"XX, SS = np.meshgrid(xx, ss)\n", "XX, SS = np.meshgrid(xx, ss)\n",
"ZZ = 2 * norm.pdf(XX - 1.0, 0, SS) + norm.pdf(XX + 4.0, 0, SS)\n", "ZZ = 2 * norm.pdf(XX - 1.0, 0, SS) + norm.pdf(XX + 4.0, 0, SS)\n",
"ZZ = ZZ / ZZ.sum(axis=1) / (xx[1] - xx[0])" "ZZ = ZZ / ZZ.sum(axis=1)[:,np.newaxis] / (xx[1] - xx[0])"
] ]
}, },
{ {