Διαφάνεια 1arly/courses/ml/tmp/linear_classifiers.pdf · bishop prml ch. 4 ....

34

Upload: vunhu

Post on 18-Jul-2018

216 views

Category:

Documents


1 download

TRANSCRIPT

Training phase: • We model the probability density p(x|Ck) of each class Ck

using density estimation (e.g. Gaussians) methods applied to the data of class Ck

• We define the class priors P(Ck) (either uniform or Nk/N) To classify a point x:

• We compute P(x|C k) for each k. • We compute P(Ck|x) for each k. • We assign x to the class with maximum P(Ck|x) (Bayes

rule for classification)

(Cross-entropy)

No closed form solution (contrary to Least Squares) Train using gradient descent (or Iterative Reweighted Least Squares)

(Cross-entropy)

zi = wTi x

ii k

k

yy y

z

i k

( )i i

i

Ey t

x

w

Multiclass Classification

• Gradient of cross-entropy with softmax activation has the same form as the gradient of squared error with linear activation!

• However, when the activation is linear, the outputs yi do not form a probability vector (wrong approach)

• The above also hold for the two-class case (where we have one output)

( )i i

i

Ey t

x

w

Least Squares Logistic Regression