Introduction
• Naïve Bayesis a probabilistic classifier based
on Bayes’ Theorem.
• Assumes independence between predictors.
• Simple, fast, and effective for classification
tasks.
3.
Bayes’ Theorem
• P(H|X)= [P(X|H) * P(H)] / P(X)
• - H: Hypothesis (class)
• - X: Data (features)
• - P(H): Prior probability of hypothesis
• - P(X|H): Likelihood
• - P(H|X): Posterior probability
4.
Naïve Assumption
• -Predictors are independent given the class.
• - P(X1, X2, ..., Xn | C) = Π P(Xi | C)
• This makes computation simple and scalable.
5.
Types of NaïveBayes Classifiers
• - Gaussian Naïve Bayes: assumes features
follow normal distribution
• - Multinomial Naïve Bayes: used for text
classification
• - Bernoulli Naïve Bayes: for binary features
6.
Example
• Email Classification:
•- Features: presence of words like 'offer', 'buy',
'free'
• - Classes: Spam / Not Spam
• - Naïve Bayes calculates probability of each
class and selects the maximum.
7.
Steps in NaïveBayes Classification
• 1. Convert dataset into frequency table.
• 2. Calculate prior probability for each class.
• 3. Calculate likelihood for each attribute.
• 4. Use Bayes’ theorem to calculate posterior
probability.
• 5. Assign class with maximum probability.
8.
Advantages
• - Easyto implement
• - Works well with small datasets
• - Handles high-dimensional data
• - Effective for text classification
9.
Limitations
• - Assumesindependence of features (not
realistic)
• - Poor performance with correlated features
• - Requires large dataset for reliable probability
estimates
Conclusion
• - NaïveBayes = Simple, efficient, widely used
classifier
• - Based on probability and independence
assumption
• - Popular in text mining, NLP, and classification
tasks
12.
References
• - Han,J., Kamber, M., & Pei, J. (2012). Data
Mining: Concepts and Techniques
• - Mitchell, T. M. (1997). Machine Learning