Question: Problem 2 : Spam Email Classification begin { tabular } { | l | l | l | l | l | l |

Problem 2: Spam Email Classification
\begin{tabular}{|l|l|l|l|l|l|l|}
\hline & \begin{tabular}{l}
Sender \\
Domain \\
(Nominal)
\end{tabular} & \begin{tabular}{l}
Email Length \\
(Continuous)
\end{tabular} & \begin{tabular}{l}
Attachment \\
(Nominal)
\end{tabular} & \begin{tabular}{l}
Spam Link \\
Count \\
(Discrete)
\end{tabular} & \begin{tabular}{l}
Urgency \\
Level \\
(Ordinal)
\end{tabular} & \begin{tabular}{l}
Is \\
Sampam
\end{tabular}\\
\hline 1 & example.com & 1323 & No & 0 & Low & No \\
\hline 2 & spammer.net & 542 & Yes & 3 & High & Yes \\
\hline 3 & legitimate.org & 981 & No & 1 & Medium & No \\
\hline 4 & example.com & 698 & Yes & 5 & High & Yes \\
\hline 5 & legitimate.org & 1234 & No & 0 & Low & No \\
\hline 6 & spammer.net & 322 & No & 1 & Medium & Yes \\
\hline 7 & example.com & 657 & Yes & 4 & Medium & No \\
\hline 8 & spammer.net & 987 & No & 0 & High & Yes \\
\hline 9 & legitimate.org & 445 & Yes & 6 & High & Yes \\
\hline 10 & legitimate.org & 1298 & & & Now \\
\hline
\end{tabular}
You are tasked with classifying emails as spam or not spam using Naive Bayes classification. You need to estimate the conditional probabilities for different attributes and the class variable "Is Spam."
Exercises:
1. Calculate Prior Probabilities: Calculate the prior probabilities of an email being spam or not spam based on the provided dataset.
2. Conditional Probabilities for Nominal Attributes: Calculate the conditional probabilities of an email being spam or not spam for different sender domains (Nominal attribute).
3. Conditional Probabilities for Continuous Attributes: Calculate the conditional probabilities of an email being spam or not spam based on the email length (Continuous attribute). You can assume a Gaussian distribution.
4. Conditional Probabilities for Nominal Attributes with Multiple Categories: Calculate the conditional probabilities of an email being spam or not spam based on whether it has an attachment (Nominal attribute).
5. Conditional Probabilities for Discrete Attributes: Calculate the conditional probabilities of an email being spam or not spam based on the number of spam links (Discrete attribute).
6. Conditional Probabilities for Ordinal Attributes: Calculate the conditional probabilities of an email being spam or not spam based on the urgency level (Ordinal attribute).
7. Spam Classification: Given a new email with the following attributes, use Naive Bayes to classify it as spam or not spam:
Sender Domain: "spammy.biz"
Email Length: 765
Attachment: Yes
Spam Link Count: 2
Urgency Level: Medium
These exercises will help you practice estimating probabilities for a Naive Bayes classification problem with different types of attributes.
Problem 2 : Spam Email Classification \ begin {

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!