Question: 3 . Email spam filtering models often use a bag - of - words representation for emails. In a bag - of - words representation,

3. Email spam filtering models often use a bag-of-words representation for emails. In a bag-of-words representation, the descriptive features that describe a document (in this case, an email) each represent how many times a particular word occurs in the document. One descriptive feature is included for each word in a predefined dictionary. The dictionary is typically defined as the complete set of words that occur in the training dataset.
Table 2 lists the bag-of-words representation for the following five emails and a target feature, SPAM, whether they are spam emails or genuine emails.
- "money, money, money"
- "free money for free gambling fun"
- "gambling for fun"
- "machine learning for fun, fun, fun"
- "free machine learning"
Table 2
3.1 What target level would a nearest neighbour model using Manhattan distance return for the following email: "machine learning for free"? Show calculation for the first instance only and thereafter, show only the calculated Euclidean distances without showing the calculations.
3.2 What target level would a k-NN model with \(\mathrm{k}=3\) and using Manhattan distance return for the same query?
3.3 What target level would a weighted \(\mathrm{K}-\mathrm{NN}\) model with \(\mathrm{k}=3\) and using a weighting scheme of the reciprocal of the squared Manhattan distance between the neighbour and the query, return for the query? Show only the calculated weights without showing the calculations.
3 . Email spam filtering models often use a bag -

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!