Questions tagged [naive-bayes-classifier]

Naive Bayes classifiers makes the naive assumption that the features are independent. They make use of Bayes theorem.

Naive Bayes classifiers make use of Bayes theorem:

$$\overbrace{P(c | X)}^{\text{A posteriori}} = \frac{\overbrace{P(X | c)}^{\text{Likelihood}} \cdot \overbrace{P(c)}^{\text{A priori} } }{\underbrace{P(X)}_{\text{evidence}}}$$

See also

205 questions
10
votes
1 answer

Difference between Bernoulli and Multinomial Naive Bayes

Here is my understanding of the difference between a Bernoulli and a Multinomial Naive Bayes: Bernoulli explicitly models the presence/absence of a feature, whereas Multinomial doesn't. Is there something that I am missing? Can someone explain why…
Valentin Calomme
  • 6,026
  • 3
  • 21
  • 52
6
votes
4 answers

Naive Bayes Multinomial, independence assumption misunderstood

This is embarrassing but I think I miss understand something. In multinomial distribution, "while the trials are independent, their outcomes X are dependent because they must be summed to n." wiki Naive Bayes assumption is that the features are…
3
votes
1 answer

F1 on test set using Naive Bayes classifier decreases as training set size increases. Why?

I've done a simple naive bayes classification task with a very small data set. As the training set size increases from 100 data points to 300 data points, the F1 score on the test set decreases. But why? Is it likely overfitting? What are the first…
vaer-k
  • 131
  • 4
2
votes
1 answer

Doubt in interpretation of Bernoulli Naive Baeyes Algorithm

We say Bernoulli naive bayes assumes gaussian distribution of all continuous features. What happens if I have categorical features also in the dataset? What type of prior transformation in data is suitable before applying Bernoulli naive baeyes to a…
Sahil Chaturvedi
  • 435
  • 1
  • 4
  • 7
1
vote
1 answer

In Naive Bayes classifier how is P(sneezing,builder|flu) = P(sneezing|flu)P(builder|flu)?

Please refer to this literature: According to Naive Bayes classification algorithm: $P(sneezing,builder|flu) = P(sneezing|flu)P(builder|flu) $ where sneezing and builder are independent events. How do they arrive at the above conclusion…
Soumee
  • 113
  • 4
1
vote
0 answers

One class naive bayes

I have to build one class naive Bayes method for outlier detection based on the likelihood probabilities. I tried to create it using sklearn GaussianNB but it is for multiclass classification. Is there any way to do it in python or Matlab?
shaifali Gupta
  • 420
  • 4
  • 17
1
vote
1 answer

How to properly compute spam message score as a combination of fixed features and probability from a naive bayes classifier?

I am building a learning spam/ham email classifier as an assignment. It's not supposed to be a good general classifier, but one that can learn on a small set of labeled emails of a user (approx. 650 - 700 messages) and classify the rest, assuming…
1
vote
1 answer

Handling underflow in a Gaussian Naive Bayes classifier

I am implementing a Gaussian Naive Bayes classifier (so each feature is continuous and assumed to be coming from a Gaussian distribution). When evaluating the probability of a feature value in the test set, if the value is sufficiently far away…
chirpchirp
  • 13
  • 4
0
votes
0 answers

Maximal risk for the Bayes classifier

In these lecture notes I found this statement This maximal risk for the Bayes classifier occurs precisely when $Y$ “contains no information” about the feature variable $X$. How do I prove it? If I understand this right, then it occurs when $Y$ and…
Nerwena
  • 1
  • 1