However, one numerical problem here is that we are multiply together many numbers less than one.
To solve the problem, we can use logβ‘\loglog to convert multiplication into addition.
logβ‘p(D)=βilogβ‘p(xi)+logβ‘pΞΈ(yiβ£xi)=βilogβ‘pΞΈ(yiβ£xi)+ const \log p(\mathcal{D})=\sum_{i} \log p\left(x_{i}\right)+\log p_{\theta}\left(y_{i} \mid x_{i}\right) =\sum_{i} \log p_{\theta}\left(y_{i} \mid x_{i}\right)+\text { const }logp(D)=βiβlogp(xiβ)+logpΞΈβ(yiββ£xiβ)=βiβlogpΞΈβ(yiββ£xiβ)+ const
ΞΈββargβ‘maxβ‘ΞΈβilogβ‘pΞΈ(yiβ£xi)\theta^{\star} \leftarrow \arg \max _{\theta} \sum_{i} \log p_{\theta}\left(y_{i} \mid x_{i}\right)ΞΈββargmaxΞΈββiβlogpΞΈβ(yiββ£xiβ)