What is the difference between a Bayesian network and a naive Bayes classifier?

Short answer, if you’re only interested in solving a prediction task: use Naive Bayes. A Bayesian network (has a good wikipedia page) models relationships between features in a very general way. If you know what these relationships are, or have enough data to derive them, then it may be appropriate to use a Bayesian network. … Read more

pythonic implementation of Bayesian networks for a specific application

I’ve been working on this kind of thing in my spare time for quite a while. I think I’m on my third or fourth version of this same problem right now. I’m actually getting ready to release another version of Fathom (https://github.com/davidrichards/fathom/wiki) with dynamic bayesian models included and a different persistence layer. As I’ve tried … Read more

How to provide most relevant results with Multiple Factor Weighted Sorting

As mentioned in the comments, I would suggest what’s called the ‘compromise solution’ to anyone with a similar problem who is more concerned with not having to set weights than with making one criterion more heavily weighted than the others. Basically, you consider each of your criterion as a coordinate (after normalization, of course). Based … Read more

Stan. Using target += syntax

The syntax target += u; adds u to the target log density. The target density is the density from which the sampler samples and it needs to be equal to the joint density of all the parameters given the data up to a constant (which is usually achieved via Bayes’s rule by coding as the … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)