NAÏVE BAYES ALGORITHM
INTRODUCTION
 Naïve Bayes Algorithm is a probabilistic machine learning algorithm based on
Bayes Theorem. It is used for the solution of classification problems. It is a
quick and efficient algorithm.
 P(A|B) = P(B|A) P(A)/ P(B)
APPLICATION DOMAINS
 This algorithm is used for real time predictions.
 Multi class predictions can be easily carried out with this algorithm.
 Gmail uses Naïve Bayes Algorithm to filter out spam mails. It decides whether the mail is spam
or not.
 This algorithm is used in classifying data categorically, ranking pages and indexing relevancy
scores.
 Naïve Bayes Algorithm is also used in text classification. It classify tweets, posts, blogs and
pages automatically without going through them manually. It has high success rate as
compare to other algorithms.
 It is also used in building process of recommendation systems. These systems uses machine
learning and data mining to predict recommendations for users.
 One of the important application area of Naïve Bayes Algorithm is sentiment analysis.
DESCRIPTION
 It is a classification technique which is based on Bayes Theorem. Naïve Bayes is
used particularly for large data sets. It is easy to build. Naïve Bayes is also called
Independence Bayes or Simple Bayes. Naïve Bayes uses probability theory to
classify data. When new data is introduced, the probability of an event can be
adjusted. Naïve Bayes is a family of ML algorithms which uses statistical
independence. As compare to complex Bayes Algorithms, this algorithm is easy
to write and can be executed more reliably.
DIAGRAM
PSEUDOCODE
ADVANTAGES AND DISADVANTAGES
 ADVANTAGES
 • Naïve Bayes Algorithm is very fast.
 • Class of test dataset can be easily predicted by this algorithm.
 • Naïve Bayes Algorithm is useful with multi class predictions.
 • With less training data, Naïve Bayes performs better than other models.
 • This algorithm can save a lot of time because it works very quickly.
 • It is easy to evaluate the conditional probability so it can easily be implemented.
 • Naïve Bayes can handle both continuous and discrete data.
 • This algorithm is highly scalable.
 • Naïve Bayes Algorithm is not sensitive working with irrelevant features.
ADVANTAGES AND DISADVANTAGES
 DISADVANTAGES
 • If test data contains categorical variable and that was not present in training dataset, zero probability will
be assigned to it and no predictions will be made. This is also called a ‘Zero Frequency’.
 • This algorithm assumes that all predictors are independent which is impossible and this limits the
algorithm from real world use cases.
 • In some cases, this algorithm’s estimations can be wrong so we should not take the outputs too
seriously.
REFERENCES
 Sunil, (2017), 6 Easy Steps to Learn Naive Bayes Algorithm with codes in Python,
https://www.analyticsvidhya.com/blog/2017/09/naive-bayes-explained
 Singh Chauhan, Nagesh, (2022), Naïve Bayes Algorithm: Everything You Need to Know,
https://www.kdnuggets.com/2020/06/naive-bayes-algorithm-everything.html
 Vadapalli, Pavan, (2020), Naive Bayes Classifier: Pros & Cons, Applications & Types Explained,
https://www.upgrad.com/blog/naive-bayes-classifier
 Shah, Rajvi, (2021), Naïve Bayes Algorithm's Advantages and Disadvantages
https://www.kaggle.com/getting-started/225022
 Kumar, Naresh, (2019), Advantages and Disadvantages of Naive Bayes in Machine Learning,
http://theprofessionalspoint.blogspot.com/2019/03/advantages-and-disadvantages-of-
naive.html

CS3501.pptx

  • 1.
  • 2.
    INTRODUCTION  Naïve BayesAlgorithm is a probabilistic machine learning algorithm based on Bayes Theorem. It is used for the solution of classification problems. It is a quick and efficient algorithm.  P(A|B) = P(B|A) P(A)/ P(B)
  • 3.
    APPLICATION DOMAINS  Thisalgorithm is used for real time predictions.  Multi class predictions can be easily carried out with this algorithm.  Gmail uses Naïve Bayes Algorithm to filter out spam mails. It decides whether the mail is spam or not.  This algorithm is used in classifying data categorically, ranking pages and indexing relevancy scores.  Naïve Bayes Algorithm is also used in text classification. It classify tweets, posts, blogs and pages automatically without going through them manually. It has high success rate as compare to other algorithms.  It is also used in building process of recommendation systems. These systems uses machine learning and data mining to predict recommendations for users.  One of the important application area of Naïve Bayes Algorithm is sentiment analysis.
  • 4.
    DESCRIPTION  It isa classification technique which is based on Bayes Theorem. Naïve Bayes is used particularly for large data sets. It is easy to build. Naïve Bayes is also called Independence Bayes or Simple Bayes. Naïve Bayes uses probability theory to classify data. When new data is introduced, the probability of an event can be adjusted. Naïve Bayes is a family of ML algorithms which uses statistical independence. As compare to complex Bayes Algorithms, this algorithm is easy to write and can be executed more reliably.
  • 5.
  • 6.
  • 7.
    ADVANTAGES AND DISADVANTAGES ADVANTAGES  • Naïve Bayes Algorithm is very fast.  • Class of test dataset can be easily predicted by this algorithm.  • Naïve Bayes Algorithm is useful with multi class predictions.  • With less training data, Naïve Bayes performs better than other models.  • This algorithm can save a lot of time because it works very quickly.  • It is easy to evaluate the conditional probability so it can easily be implemented.  • Naïve Bayes can handle both continuous and discrete data.  • This algorithm is highly scalable.  • Naïve Bayes Algorithm is not sensitive working with irrelevant features.
  • 8.
    ADVANTAGES AND DISADVANTAGES DISADVANTAGES  • If test data contains categorical variable and that was not present in training dataset, zero probability will be assigned to it and no predictions will be made. This is also called a ‘Zero Frequency’.  • This algorithm assumes that all predictors are independent which is impossible and this limits the algorithm from real world use cases.  • In some cases, this algorithm’s estimations can be wrong so we should not take the outputs too seriously.
  • 9.
    REFERENCES  Sunil, (2017),6 Easy Steps to Learn Naive Bayes Algorithm with codes in Python, https://www.analyticsvidhya.com/blog/2017/09/naive-bayes-explained  Singh Chauhan, Nagesh, (2022), Naïve Bayes Algorithm: Everything You Need to Know, https://www.kdnuggets.com/2020/06/naive-bayes-algorithm-everything.html  Vadapalli, Pavan, (2020), Naive Bayes Classifier: Pros & Cons, Applications & Types Explained, https://www.upgrad.com/blog/naive-bayes-classifier  Shah, Rajvi, (2021), Naïve Bayes Algorithm's Advantages and Disadvantages https://www.kaggle.com/getting-started/225022  Kumar, Naresh, (2019), Advantages and Disadvantages of Naive Bayes in Machine Learning, http://theprofessionalspoint.blogspot.com/2019/03/advantages-and-disadvantages-of- naive.html