![]() |
![]() |
|
![]() |
![]() |
Encyclopedia :
N :
NA :
NAI :
Naive Bayes classifier |
|
|
Naive Bayes classifierA naive Bayes classifier (also known as Idiot's Bayes) is a simple probabilistic classifier. Naive Bayes classifiers are based on probability models that incorporate strong independence assumptions which often have no bearing in reality, hence are (deliberately) naive. A more descriptive term for the underlying probability model would be independent feature model. Furthermore the probability model can be derived using Bayes' Theorem (credited to Thomas Bayes).Depending on the precise nature of the probability model, naive Bayes classifiers can be trained very efficiently in a supervised learning setting. In many practical applications, parameter estimation for naive Bayes models uses the method of maximum likelihood; in other words, one can work with the naive Bayes model without believing in Bayesian probability or using any Bayesian methods. In spite of their naive design and apparently over-simplified assumptions, naive Bayes classifiers often work much better in many complex real-world situations than might be expected from their very simple design. Recently, careful analysis of the Bayesian classification problem has shown that there are sound theoretical reasons for the apparently unreasonable efficacy of naive Bayes classifiers (see references at the end of this article for more details). The naive Bayes probabilistic modelAbstractly, the probability model for a classifier is a conditional model
Using Bayes' theorem, we write
The numerator is equivalent to the joint probability model
Models of this form are much more manageable, since they factor into a so-called class prior and independent probability distributions . If there are classes and if a model for can be expressed in terms of parameters, then the corresponding naive Bayes model has (k - 1) + n r k parameters. In practice, often (binary classification) and (Bernoulli variables as features) are common, and so the total number of parameters of the naive Bayes model is , where is the number of binary features used for prediction. Parameter estimation In a supervised learning setting, one wants to estimate the parameters of the probability model. Because of the independent feature assumption, it suffices to estimate the class prior and the conditional feature models independently, using the method of maximum likelihood, Bayesian inference or other parameter estimation procedures. Constructing a classifier from the probability modelThe discussion so far has derived the independent feature model, that is, the naive Bayes probability model. The naive Bayes classifier combines this model with a decision rule. One common rule is to pick the hypothesis that is most probable; this is known as the maximum a posteriori or MAP decision rule. The corresponding classifier is the function defined as follows:
Example: document classification Here is a worked example of naive Bayesian classification to the document classification problem.
Then the probability of a given document D, given a class C, is
Now, by their definition, (see Probability axiom)
The actual probability p(S | D) can be easily computed from log (p(S | D) / p(¬S | D)) based on the observation that p(S | D) + p(¬S | D) = 1. Taking the logarithm of all these ratios, we have:
In the case of two mutually exclusive alternatives (such as this example), the conversion of a log-likelihood ratio to a probability takes the form of a sigmoid curve: see logit for details. See also
|
|
|
This article is from Wikipedia. All text is available under the terms of the GNU Free Documentation License. |
|
| © 2008 Chamas Enterprises Inc. |