Posts

Showing posts from October, 2024

Naive Bayes classifier

  Naive Bayes Classifier Definition: Naive Bayes is a family of simple "probabilistic classifiers" based on applying Bayes' theorem with strong (naive) independence assumptions between the features. Despite its simplicity, Naive Bayes can perform surprisingly well and is often used for text classification tasks. Key Concepts: Bayes' Theorem: P ( A ∣ B ) = P ( B ∣ A ) ⋅ P ( A ) P ( B ) P(A|B) = \frac{P(B|A) \cdot P(A)}{P(B)} P ( A ∣ B ) P(A|B) : Posterior probability of class A A given predictor B B . P ( B ∣ A ) P(B|A) : Likelihood of predictor B B given class A A . P ( A ) P(A) : Prior probability of class A A . P ( B ) P(B) : Prior probability of predictor B B . Independence Assumption: The "naive" assumption is that all features are independent given the class label. This simplifies the calculation of the conditional probabilities. Types of Naive Bayes Classifiers: Gaussian Naive Bayes: Assumes that features follow a normal distribution. Multinomial ...