Q1. Naive Bayes The Police Department has asked you to assist with the interrogation of several suspects accused of chea
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
Q1. Naive Bayes The Police Department has asked you to assist with the interrogation of several suspects accused of chea
statement during interrogation, and from this statement you areto determine whether they are Guilty (G) or Innocent (1). To assist you, the police department provides you with records of past cheating cases: statements made by suspects, labeled with whether the suspect ended up being found Guilty (G) or Innocent (1) Training Statements (G/1) I am definitely innocent, officer (1) Officer, I swear I am not lying (1) I am not lying, I swear (1) I am innocent, officer, I swear (G) Officer, I am definitely not lying (G) (a) [2 pts] You plan to apply a Naive Bayes classifier to this problem. Given the class label, this model treats each word in the sentence as an independent feature. The parameters of this model take the form of conditional probabilities PG), P (Word = "am" G). Using the training data, find the maximum likelihood estimate of the parameters (they will be the class-conditional relative frequencies of each word). Ignore punctuation and capitalization. Word P(Word G) P(Word 1) I am Prior Prob definitely G innocent I officer swear not lying (b) [2 pts] Using the probabilities found above, compute the following probabilities: P(G, “Officer, I am not lying") PC, "Officer, I am not lying") What is the most likely classification for the above sentence? (c) [2 pts] Another suspect has been caught; this time, he gives the statement “I am honest, officer”. Using the same Naive Bayes model, compute the probability PG, “I am honest, officer"). (d) [2 pts] Instead of maximum likelihood, use Laplace (add-one) smoothing to find new values for the model parameters (using the same training data as in (a)) and use these new parameters to compute the probability PG|“I am honest, officer"). Assume for the purposes of smoothing that every word you will see is contained in your training set and test sentence (but do not use the test sentence when computing parameter estimates). Make sure to smooth both the prior P(G),P) and conditional distributions.
Q1. Naive Bayes The Police Department has asked you to assist with the interrogation of several suspects accused of cheating at AI course. Each suspect makes a single