Machine Learning - MT 2016
- 8. Classification: Logistic Regression
Machine Learning - MT 2016 8. Classification: Logistic Regression - - PowerPoint PPT Presentation
Machine Learning - MT 2016 8. Classification: Logistic Regression Varun Kanade University of Oxford November 2, 2016 Logistic Regression Logistic Regression is actually a classification method In its simplest form it is a binary (two classes)
◮ Today’s Lecture: We’ll denote these by 0 and 1 ◮ Next Week: Sometimes it’s more convenient to call them −1 and +1 ◮ Ultimately, the choice is just for mathematical convenience
1
◮ LR builds up on a linear model, composed with a sigmoid function
◮ Z ∼ Bernoulli(θ)
◮ Recall that the sigmoid function is defined by:
−4 −2 2 4 0.2 0.4 0.6 0.8 1 t Sigmoid
◮ As we did in the case of linear models, we assume x0 = 1 for all
2
2
3
4
i=1, where xi ∈ RD and yi ∈ {0, 1}
N
N
5
N
◮ As µi → 1, NLL(yi | xi, w) → 0 ◮ As µi → 0, NLL(yi | xi, w) → ∞
6
N
N
7
t gt
t (y − µt))
t (y − µt). Then wt+1 is a solution of the following:
N
8
c x)
c′=1 exp(wT c′x)
9
c x)
c′=1 exp(wT c′x)
C
1x, . . . , wT Cx
10
11
◮ Logistic Regression is a (binary) classification method ◮ It is a discriminative model ◮ Extension to multiclass by replacing sigmoid by softmax ◮ Can derive Maximum Likelihood Estimates using Convex Optimization ◮ See Chap 8.3 in Murphy (for multiclass), but we’ll revisit as a form of a
12
◮ Suppor Vector Machines ◮ Kernel Methods ◮ Revise Linear Programming and Convex Optimisation
13