The following training dataset is “reading email dataset”. This dataset has four features as follows: author, thread,...

70.2K

Verified Solution

Question

Programming

  1. The following training dataset is “reading email dataset”.

This dataset has four features asfollows: author, thread, length, and where to read the mail.According to the features the algorithm has to predict the user’saction whether to read or skip the mail.

Use Naïve Bayes classifier to predictthe user’s action (skips or reads) when the author of the mail isknown, the thread of the mail is follow up, the length of the mailis short, and where to read the email is home.

Author

Thread

Length

Where to read

User’s Action

Known

new

long

home

Skips

unknown

new

short

work

Reads

unknown

Follow up

long

work

Skips

Known

Follow up

Long

Home

Skips

Known

New

Short

Home

Reads

Known

Follow up

Long

Work

Skips

Unknown

New

short

work

skips

Unknown

New

short

Work

reads

Known

Follow up

Long

Home

Skips

known

New

Long

Work

skips

unknown

Follow up

short

home

Skips

Known

new

Long

work

Skips

Known

Follow up

Short

Home

Reads

Known

New

Short

Work

Reads

known

New

short

Home

Reads

Known

Follow up

short

Work

Reads

Known

New

Short

home

Reads

unknown

new

short

work

Reads

  1. Write a Python code to implement a naïve Bayesian classifier topredict the user’s action (skips or reads) when the author of themail is known, the thread of the mail is follow up, the length ofthe mail is short, and where to read the email is home. (Do not useScikit-Learn)
  2. Use Scikit-Learn to predict the user’s action (skips or reads)when the author of the mail is known, the thread of the mail isfollow up, the length of the mail is short, and where to read theemail is home.

Hint in authors feature you can use 0,1 instead of unknown and known. In thread feature you can use 0, 1instead of follow up and new. In length feature you can use 0, 1instead of short and long. In where to read feature you can use 0,1 instead of home, work. In the target you can use 0 instead ofskips and 1 instead of reads.

Answer & Explanation Solved by verified expert
3.5 Ratings (442 Votes)
data set Author 0 unknown 1 known 100111001101111110 Thread 0 follow up 1 new 110010110101011011 Length 0 short 1 long 101101001101000000 Where to read 0 home 1 work 011001110101010101 Users Action 0 skip 1 read 010010010000111111 predict the users action skips or reads when the author of the mail is known the thread of the mail is follow up the length of the mail is short and where to read the email is home Question 1 Training the model with out    See Answer
Get Answers to Unlimited Questions

Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!

Membership Benefits:
  • Unlimited Question Access with detailed Answers
  • Zin AI - 3 Million Words
  • 10 Dall-E 3 Images
  • 20 Plot Generations
  • Conversation with Dialogue Memory
  • No Ads, Ever!
  • Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Become a Member

Other questions asked by students