Hi,
I have noticed that when I use Smilearn to learn the parameters of my model I get some probabilities that are not 0, but should be!
I've tried to find out how the DSL_ALG_BN_LAURITZEN algorithm works but couldn't find any information about it. Could you please explain?
I suspect that this algorithm incorporates a small-sample correction in all probability estimates such that no probability is ever set to be exactly zero. Is this true?
In any case, do you have any algorithm that uses the straight counts from the data with no correction such that if an event is not observed in the data then its probability is 0?
Thanks a lot!
Noelia
Lauritzen algorithm?
Yes, the data is complete.
It is a naive bayes classifier. The "G" node is the parent and the "D", "T", and "B" nodes are the children.
I have attached the data as requested.
Thank you for your help.
It is a naive bayes classifier. The "G" node is the parent and the "D", "T", and "B" nodes are the children.
I have attached the data as requested.
Thank you for your help.
- Attachments
-
- PuppyData.txt
- (92.88 KiB) Downloaded 383 times
-
- Site Admin
- Posts: 1417
- Joined: Mon Nov 26, 2007 5:51 pm
I just want to clarify that DSL_ALG_BN_LAURITZEN is the identifier you can pass to DSL_network::SetDefaultBNAlgorithm, which in turn controls which inference algorithm is exacuted when you call DSL_network::UpdateBeliefs. However, UpdateBeliefs is not called by SMILearn's naive Bayes code.ermutarra wrote:Yes, the data is complete.
It is a naive bayes classifier. The "G" node is the parent and the "D", "T", and "B" nodes are the children.
Please note that for SMILearn 'learn the parameters' means 'run the EM' algorithm, at least at this point Naive Bayes belongs to the 'structure learning' family of algorithms, even if the learned structure is trivial and there's code running to obtain the probabilities. However, this code is not EM.
Post your model and indicate which probabities you'd expect to be zero so we can investigate this further.
I'm not quite sure why you mean when you ask me to post the model, I'm attaching the xdsl file generated when I learn the naive bayes network with the data I posted before.
In this model with this data I would expect P(T=55|G=0) and P(T=55|G=1) to be zero as there where no observations of T=55 when G=0 or G=1. These two are just an example, but there are many more cases.
I don't quite understand why you say that the algorithm learns the structure if I have already told it that it is a naive bayes classifer and I've also told it which the parent node is. What is there to learn about the structure if I have already provided this information?
Cheers!
In this model with this data I would expect P(T=55|G=0) and P(T=55|G=1) to be zero as there where no observations of T=55 when G=0 or G=1. These two are just an example, but there are many more cases.
I don't quite understand why you say that the algorithm learns the structure if I have already told it that it is a naive bayes classifer and I've also told it which the parent node is. What is there to learn about the structure if I have already provided this information?
Cheers!
- Attachments
-
- naivebayes.xdsl
- (24.21 KiB) Downloaded 420 times
-
- Site Admin
- Posts: 1417
- Joined: Mon Nov 26, 2007 5:51 pm