Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 8

Baye’s rule Spam filtering

PATI CHAITANYA
22H51A0548
CSE-B
Introduction
Bayes’ Theorem
Bayes’ Theorem describes the conditional probability an event is
going to happen based on the prior knowledge of conditions
related to this event.
Bayes rule in spam filtering:

• The Bayes rule is a mathematical formula used in spam filtering


applications to identify patterns in email content.

• This rule helps distinguish between legitimate emails and spam


by analyzing the frequency of certain words or phrases.

• By applying the Bayes rule, spam filtering applications can more


accurately detect and filter out unwanted messages.
How Bayes rule works :

• The Bayes rule assigns a numerical value to each word or phrase


in an email based on its frequency and relevance.

• These values are then used to calculate a spam score for the
email, determining whether it is likely to be spam or not.

• By comparing the spam score to a predefined threshold, the spam


filtering application can decide whether to filter out the email.
Example:
For instance, the probability of the word “FREE”
appears in an email is 20%, the probability of an email
being a normal email is 25%, and the probability of a
spam email has the word “FREE” is 45%. Then, when
an email contains the word “FREE” was received by a
user than the system will calculate the probability of
this email is a spam according to the Bayes’
theorem is 56%.
The formula used by the software to determine that, is derived from
Bayes' theorem

Pr(S|W) is the probability that a message is a spam, knowing that the word “
OFFER” is in it;
Pr(W |S) is the probability that the word “OFFER” appears in spam
messages;
Pr(S) is the overall probability that any given message is spam;
Pr(H) is the overall probability that any given message is not spam (is
“ham”);
Pr(W |H) is the probability that the word “OFFER” appears in ham messages;
Conclusion:

• The Bayes rule is a powerful tool in spam filtering applications,


offering a reliable and customizable approach to email security.

• By understanding how the Bayes rule works and implementing


best practices, organizations can effectively combat spam and
protect their email systems.

• As spam continues to be a prevalent threat, the Bayes rule


remains a critical component of modern email security solutions.
Thankyou

You might also like