Seminar 7 Definition 1 (Naive Bayes Classifier) Naive Bayes (NB) Classifier assumes that the effect of the value of a predictor ๐‘ฅ on a given class ๐‘ is class conditional independent. Bayes theorem provides a way of calculating the posterior probability ๐‘ƒ(๐‘|๐‘ฅ) from class prior probability ๐‘ƒ(๐‘), predictor prior probability ๐‘ƒ(๐‘ฅ) and probability of the predictor given the class ๐‘ƒ(๐‘ฅ|๐‘) ๐‘ƒ(๐‘|๐‘ฅ) = ๐‘ƒ(๐‘ฅ|๐‘)๐‘ƒ(๐‘) ๐‘ƒ(๐‘ฅ) and for a vector of predictors ๐‘‹ = (๐‘ฅ1, . . . , ๐‘ฅ ๐‘›) ๐‘ƒ(๐‘|๐‘‹) = ๐‘ƒ(๐‘ฅ1|๐‘) . . . ๐‘ƒ(๐‘ฅ ๐‘›|๐‘)๐‘ƒ(๐‘). The class with the highest posterior probability is the outcome of prediction. Exercise 1 Considering the table of observations, use the Naive Bayes classifier to recommend whether to Play Golf given a day with Outlook = Rainy, Temperature = Mild, Humidity = Normal and Windy = True. Do not deal with the zero-frequency problem. Outlook Temperature Humidity Windy Play Golf Rainy Hot High False No Rainy Hot High True No Overcast Hot High False Yes Sunny Mild High False Yes Sunny Cool Normal False Yes Sunny Cool Normal True No Overcast Cool Normal True Yes Rainy Mild High False No Rainy Cool Normal False Yes Sunny Mild Normal False Yes Rainy Mild Normal True Yes Overcast Mild High True Yes Overcast Hot Normal False Yes Sunny Mild High True No Table 1: Exercise. 1 Definition 2 (Support Vector Machines Classifier (two-class, linearly separable)) Support Vector Machines (SVM) finds the hyperplane that bisects and is perpendicular to the connecting line of the closest points from the two classes. The separating (decision) hyperplane is defined in terms of a normal (weight) vector w and a scalar intercept term ๐‘ as ๐‘“(๐‘ฅ) = w ยท x + ๐‘ where ยท is the dot product of vectors. Finally, the SVM classifier becomes ๐‘๐‘™๐‘Ž๐‘ ๐‘ (๐‘ฅ) = ๐‘ ๐‘”๐‘›(๐‘“(๐‘ฅ)). Exercise 2 Build the SVM classifier for the training set {([1, 1], โˆ’1), ([2, 0], โˆ’1), ([2, 3], +1)}. 2