draw() in Bernoulli distribution
gdxie1 opened this issue · 5 comments
gdxie1 commented
the line in the draw should change from self.mu.n_ones / (self.mu.n_ones + self.mu.n_zeros) to
(self.mu.n_ones - 1) / (self.mu.n_ones + self.mu.n_zeros -2)
ctgk commented
Should it be?
gdxie1 commented
when you added the prior distribution, you should -1 and -2. Maybe I am wrong. Thank you anyway, it's a good project.
ctgk commented
Could you specify from which equation in PRML you though it should have -1 and -2?
gdxie1 commented
Hi, I checked the book and found that you are right. I mistake the MAP of mu as the p(x=1|D) under Bayes. Sorry for this.
ctgk commented
Oh, I see! Yeah, it is confusing that we need them for estimation of mu and not for p(x=1||D).