Linear Models: Naïve Bayes, Perceptron
CMSC 470 Marine Carpuat
Slides credit: Jacob Eisenstein
Nave Bayes, Perceptron CMSC 470 Marine Carpuat Slides credit: - - PowerPoint PPT Presentation
Linear Models: Nave Bayes, Perceptron CMSC 470 Marine Carpuat Slides credit: Jacob Eisenstein Linear Models for Multiclass Classification Feature function representation Weights Nave Bayes recap Prediction with Nave Bayes
Slides credit: Jacob Eisenstein
Feature function representation Weights
Score(x,y) Definition of conditional probability Generative story assumptions This is a linear model!
example
entire training set
Theorem: If the data is linearly separable, then the perceptron algorithm will find a separator (Novikoff, 1962)
some threshold
examples incorrectly
𝑢𝑠𝑏𝑗𝑜(𝜄)
𝑢𝑠𝑣𝑓 𝜄
𝑓𝑠𝑠𝑝𝑠
𝑢𝑠𝑏𝑗𝑜 𝜄 < 𝑓𝑠𝑠𝑝𝑠 𝑢𝑠𝑣𝑓 𝜄
𝑓𝑠𝑠𝑝𝑠
𝑢𝑓𝑡𝑢 𝜄
hypothesis 𝜄′, such that
didn’t
data; the resulting classifier doesn’t generalize
Naïve Bayes
independent given class
maximize likelihood of training data
Perceptron
Guaranteed to converge if data is linearly separable