Question: Peter works as a cyber security analyst at a private equity firm. His colleagues at the firm have been inundated by a large number of

Peter works as a cyber security analyst at a private equity firm. His colleagues at the firm have been inundated by a large number of spam-emails. Peter has been asked to implement a spam detection system on the companys email server. He reviewed a sample of 500 spam and legitimate emails with relevant variables: spam (1 if it is spam message, 0 otherwise), the number of recipients of the message, the number of hyperlinks, and the number of characters in the message. The dataset is stored in the file Spam_Data.xlsx.

Peter works as a cyber security analyst at a private equity firm.

His colleagues at the firm have been inundated by a large number

of spam-emails. Peter has been asked to implement a spam detection system

on the companys email server. He reviewed a sample of 500 spam

and legitimate emails with relevant variables: spam (1 if it is spam

message, 0 otherwise), the number of recipients of the message, the number

of hyperlinks, and the number of characters in the message. The dataset

is stored in the file Spam_Data.xlsx. 1. Perform a KNN analysis to

estimate a classification model for spam detection using the steps we had

seen in class. Based on the fitted (trained) data output, what is

the optimal value of k? 2. Report the accuracy, specificity, sensitivity, and

precision for the validation data set. THIS HAS TO BE DONE IN

R & RSTUDIO PROGRAMMING LANGUAGE!

image text in transcribed

1. Perform a KNN analysis to estimate a classification model for spam detection using the steps we had seen in class. Based on the fitted (trained) data output, what is the optimal value of k?

2. Report the accuracy, specificity, sensitivity, and precision for the validation data set.

THIS HAS TO BE DONE IN R & RSTUDIO PROGRAMMING LANGUAGE!

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 Databases Questions!