edilello / bnt

Automatically exported from code.google.com/p/bnt
0 stars 0 forks source link

Using Dirichlet Priors #19

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Hey there,

I am trying to unserstand how to use Dirichlet priors on the parameters of a 
CPT. In the documentation I can see how to define a dirichlet prior, but it 
seems to me that it is not possible to specify the Dirichlet pseudo counts 
separately for each entry. 
In my case, I have a prior CPT that represents my prior knowledge, but if I 
define a dirichlet prior over my parameters, I can only specify the ESS. 
The function bayes_update_params will then recompute the pseudo counts by 
summing the counts present in the data for a particular parent-child 
combination with the dirichlet prior counts, but neglecting the prior CPT. 
If I have that P(X=x | Pa1 = p) with probability 0.9 and a BDeu Dirichlet prior 
with ESS = 10 
I would expect my dirichlet prior to already have a pseudo count of 9 for that 
particulare state, while instead I get the same number of pseudo counts spread 
over all the possible states.
The results of this is that my posterior is being relatively flat and drive by 
the data, despite my prior CPT being sharply peaked around some entries. 
What am I doing wrong? 

Original issue reported on code.google.com by enr.dile...@gmail.com on 25 Oct 2011 at 1:02