NAÏVE
BAYES
CLASSIFICATI
ON 1 of 9
Made by: Zenith Acharya
Kathmandu Model College
2023-12-16
Introduction
Contextualizing Machine Learning:
Machine Learning (ML) is the science of creating
algorithms that allow systems to learn patterns from
data without explicit programming.
Supervised Learning & Classification:
Supervised learning deals with labelled data to train
models that make predictions or classifications.
Classification is the process of categorizing data into
classes or groups based on its features.
2 of 9
Image source: medium.com
Understanding Naive Bayes
Algorithm
Fundamentals of Naive Bayes
Derived from Bayes' theorem, it's a probabilistic classifier that assumes
independence between features.
Calculates probabilities of class membership given input features.
Bayes' Theorem Formula
Where A and B are events, P(A|B) is the probability of A given B.
3 of 9
Naive Bayes Workflow
Data Preparation Phase
Collection of labelled training data.
Pre-processing involves data cleaning, handling missing
values, and feature extraction.
Training Stage
Estimating probabilities of each class occurrence.
Computing conditional probabilities of features given the
class.
Prediction Process
Applying Bayes' theorem to calculate the probability of
each class given new data.
Selecting the class with the highest probability as the
predicted outcome.
4 of 9
Image source: medium.com
Gaussian Naive Bayes
Assumes features follow a Gaussian (normal) distribution.
Suitable for continuous data.
Multinomial Naive Bayes
Primarily used for text classification.
Works well with multiple discrete features, often in the
form of word counts.
Types of Naive Bayes
5 of 9
Image source: researchgate.com
Bernoulli Naive Bayes
Appropriate for binary or Boolean features.
Particularly useful for document classification tasks
6 of 9
Advantages and Disadvantages
Advantages Disadvantages
Simplicity
Assumption of feature
independence
Sensitivity to irrelevant
features
Scalability
Efficiency
7 of 9
Applications
Spam Filtering
Identifying and
filtering out
unwanted spam
emails.
Sentiment Analysis
Determining the
sentiment or emotion
expressed in text data.
Document
Classification
Categorizing
documents into
predefined classes or
categories.
Recommendation
Systems
Generating
personalized
recommendations
based on user
preferences and
behavior.
8 of 9
9 of 9
https://www.slideshare.net/ZenithAcharya/naive-bayes-
classification
THANK YOU
Slides can be found here
Queries?

Naive Bayes Classification

  • 1.
    NAÏVE BAYES CLASSIFICATI ON 1 of9 Made by: Zenith Acharya Kathmandu Model College 2023-12-16
  • 2.
    Introduction Contextualizing Machine Learning: MachineLearning (ML) is the science of creating algorithms that allow systems to learn patterns from data without explicit programming. Supervised Learning & Classification: Supervised learning deals with labelled data to train models that make predictions or classifications. Classification is the process of categorizing data into classes or groups based on its features. 2 of 9 Image source: medium.com
  • 3.
    Understanding Naive Bayes Algorithm Fundamentalsof Naive Bayes Derived from Bayes' theorem, it's a probabilistic classifier that assumes independence between features. Calculates probabilities of class membership given input features. Bayes' Theorem Formula Where A and B are events, P(A|B) is the probability of A given B. 3 of 9
  • 4.
    Naive Bayes Workflow DataPreparation Phase Collection of labelled training data. Pre-processing involves data cleaning, handling missing values, and feature extraction. Training Stage Estimating probabilities of each class occurrence. Computing conditional probabilities of features given the class. Prediction Process Applying Bayes' theorem to calculate the probability of each class given new data. Selecting the class with the highest probability as the predicted outcome. 4 of 9 Image source: medium.com
  • 5.
    Gaussian Naive Bayes Assumesfeatures follow a Gaussian (normal) distribution. Suitable for continuous data. Multinomial Naive Bayes Primarily used for text classification. Works well with multiple discrete features, often in the form of word counts. Types of Naive Bayes 5 of 9 Image source: researchgate.com
  • 6.
    Bernoulli Naive Bayes Appropriatefor binary or Boolean features. Particularly useful for document classification tasks 6 of 9
  • 7.
    Advantages and Disadvantages AdvantagesDisadvantages Simplicity Assumption of feature independence Sensitivity to irrelevant features Scalability Efficiency 7 of 9
  • 8.
    Applications Spam Filtering Identifying and filteringout unwanted spam emails. Sentiment Analysis Determining the sentiment or emotion expressed in text data. Document Classification Categorizing documents into predefined classes or categories. Recommendation Systems Generating personalized recommendations based on user preferences and behavior. 8 of 9
  • 9.