Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

Q1. Define Baye’s rule. What is Naïve Bayes.

Describe in detail how


it works when filtering spam mail from the inbox.

Bayes' Rule
Bayes' theorem, named after 18th-century British mathematician Thomas Bayes, is a
mathematical formula for determining conditional probability. The theorem provides a way to
revise existing predictions or theories (update probabilities) given new or additional evidence. In
finance, Bayes' theorem can be used to rate the risk of lending money to potential borrowers.

Bayes' theorem is also called Bayes' Rule or Bayes' Law and is the foundation of the field of
Bayesian statistics.

KEY TAKEAWAYS

 Bayes' Theorem allows you to update predicted probabilities of an event by incorporating


new information.
 Bayes' Theorem was named after 18th century mathematician Thomas Bayes.
 It is often employed in finance in updating risk evaluation.

The Formula for Bayes' Theorem Is

P(A∣B)=P(B)P(A⋂B)=P(B)P(A)⋅P(B∣A)

where:P(A)= The probability of A occurring
P(B)= The probability of B occurring
P(A∣B)=The probability of A given B
P(B∣A)= The probability of B given A
P(A⋂B))= The probability of both A and B occurring

Naïve Bayes
A naive Bayes classifier uses probability theory to classify data. Naive Bayes classifier
algorithms make use of Bayes' theorem. The key insight of Bayes' theorem is that the
probability of an event can be adjusted as new data is introduced.
What makes a naive Bayes classifier naive is its assumption that all attributes of a data
point under consideration are independent of each other. A classifier sorting fruits into
apples and oranges would know that apples are red, round and are a certain size, but
would not assume all these things at once. Oranges are round too, after all.
A naive Bayes classifier is not a single algorithm, but a family of machine learning
algorithms that make uses of statistical independence. These algorithms are relatively
easy to write and run more efficiently than more complex Bayes algorithms.
It works when filtering spam mail from the inbox.
E-mail spam continues to become a problem on the Internet. Spammed e-mail
may contain many copies of the same message, commercial advertisement or other
irrelevant posts like pornographic content. In previous research, different filtering
techniques are used to detect these e-mails such as using Random Forest, Naïve
Bayesian, Support Vector Machine (SVM) and Neutral Network. In this research, we test
Naïve Bayes algorithm for e-mail spam filtering on two datasets and test its performance,
i.e., Spam Data and SPAMBASE datasets [8]. The performance of the datasets is
evaluated based on their accuracy, recall, precision and F-measure. Our research use
WEKA tool for the evaluation of Naïve Bayes algorithm for e-mail spam filtering on both
datasets. The result shows that the type of email and the number of instances of the
dataset has an influence towards the performance of Naïve Bayes.

You might also like