The last formula should have had p(y^\text{unseen} \mid y^\text{seen}) on the left hand side as the estimated and an approximately relation, so the full last line should be
\displaystyle p(y^\text{unseen} \mid y^\text{seen}) \approx \frac{1}{M} \sum_{m=1}^M p(y^\text{unseen} \mid a^m, b^m, \epsilon^m).