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

后端 未结 3 1972
旧巷少年郎
旧巷少年郎 2020-12-24 07:38

What is the difference between a Bayesian network and a Naive Bayes classifier? I noticed one is just implemented in Matlab as classify the other has an entire

3条回答
  •  渐次进展
    2020-12-24 07:59

    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.

    A Naive Bayes classifier is a simple model that describes particular class of Bayesian network - where all of the features are class-conditionally independent. Because of this, there are certain problems that Naive Bayes cannot solve (example below). However, its simplicity also makes it easier to apply, and it requires less data to get a good result in many cases.

    Example: XOR

    You have a learning problem with binary features x1 and x2 and a target variable y = x1 XOR x2.

    In a Naive Bayes classifier, x1 and x2 must be treated independently - so you would compute things like "The probability that y = 1 given that x1 = 1" - hopefully you can see that this isn't helpful, because x1 = 1 doesn't make y = 1 any more or less likely. Since a Bayesian network does not assume independence, it would be able to solve such a problem.

提交回复
热议问题