Binary Classification with Linear Models
CMSC 422 MARINE CARPUAT
marine@cs.umd.edu
Figures credit: Piyush Rai
with Linear Models CMSC 422 M ARINE C ARPUAT marine@cs.umd.edu - - PowerPoint PPT Presentation
Binary Classification with Linear Models CMSC 422 M ARINE C ARPUAT marine@cs.umd.edu Figures credit: Piyush Rai T opics Linear Models Loss functions Regularization Gradient Descent Calculus refresher Convexity
CMSC 422 MARINE CARPUAT
marine@cs.umd.edu
Figures credit: Piyush Rai
– Loss functions – Regularization
– Convexity – Gradients
side of the hyperplane examples fall
𝑧 = 𝑡𝑗𝑜(𝑥𝑈𝑦 + 𝑐)
– Because the prediction is a linear combination of feature values x
Indicator function: 1 if (.) is true, 0 otherwise The loss function above is called the 0-1 loss
Loss function measures how well classifier fits training data Regularizer prefers solutions that generalize well Objective function
regularizers lead to specific algorithms (e.g., perceptron, support vector machines, logistic regression, etc.)
– Hinge loss – Log loss – Exponential loss
bounds on the 0-1 loss
– Hinge loss – Log loss – Exponential loss
loss functions is not smooth?
– Hinge loss – Log loss – Exponential loss
loss functions is most sensitive to
Indicator function: 1 if (.) is true, 0 otherwise The loss function above is called the 0-1 loss
Loss function measures how well classifier fits training data Regularizer prefers solutions that generalize well Objective function
prediction depends only on a small number of features.
– E.g., we encourage wd’s to be small
Contour plots for p = 2 p = 1 p < 1
– i.e. most entries of w are close or equal to 0
smooth at axis points
Indicator function: 1 if (.) is true, 0 otherwise The loss function above is called the 0-1 loss
Loss function measures how well classifier fits training data Regularizer prefers solutions that generalize well Objective function
– loss function: measures how well classifier fits training data – Regularizer: measures how simple classifier is
Idea: take iterative steps to update parameters in the direction
– loss function: measures how well classifier fits training data – Regularizer: measures how simple classifier is