7-Naive Bayes Flashcards
What is the naive assumption in naive bayes?
All features (attributes) are conditionally independent on the class y
What is the naive bayes algorithm?
y^ = argmax (y) P(y) * Product from i to n P(x_n | y)
What are the naive bayes assumptions?
Features are conditionally independent
Instances are independent
Distribution of test data is the same as training data
How do we manage unseen discrete features in naive bayes?
If any term hasn’t been seen before, we can:
- Epsilon smoothing: Set a small epsilon value
- Laplace smoothing: Add a pseudo count , (a + count())/ (Ma + count()), where Ma is the total count
How do we manage continuous features with zero variance in naive bayes?
Ignore feature
Add small smoothing value to standard deviation