DOC PREVIEW
CMU CS 10601 - Review

This preview shows page 1-2-15-16-31-32 out of 32 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 32 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 32 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 32 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 32 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 32 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 32 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 32 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Review•Multivariate Gaussian‣N(X | μ, Σ) = (1/√|2pi Σ|) exp{–0.5 (x–μ)T Σ–1 (x–μ)}1Multivariate Gaussians!! !"#" !$!#%&##%&""%&!!%&$$%&'μ3 = [-.5; 0]μ1 = [0; 3]μ2 = [2; 1]Σi = UDiUTU = √2 / 2√2 / 2√2 / 2–√2 / 2D2 = diag([.02 .26])D1 = diag([.2 .08])D3 = diag([.1 .1])note UTU = I2Review•Naïve Bayes, Gaussian NB, Fisher model:‣all lead to linear discriminants‣w0 + ∑j wj Xj ≥ 0 or w0 + wTX ≥ 0‣formulas for w0, w depend on which model3Fisher linear discriminant!2 2 6!2024figure from book4Fisher w/ bad Σfigure from book!2 2 6!20245Features•Can generalize to use features of X:‣w0 + ∑j wj ϕj(X) ≥ 0‣ϕj(X) are features•Why might we want to do so?6Use of ϕj(X)x1x2!1 0 1!1017Use of ϕj(X)φ1φ20 0.5 100.518Lots of discriminants•One of most important types of classifier•Consequently, many ways to train LDs‣based on different assumptions about data•We saw 3 so far‣ •Another one: coming up soon9Class probability•We showed:‣log P(Y=1 | X) – log P(Y=0 | X) = •This implies‣log P(Y = 1) = 10Sigmoid: σ(z) = 1/(1+exp(–z))!! !" # " !##$"#$!#$%#$&'()11NB = MLE (or MAP)•P(Y=1 | X) = σ(z)‣z = w0 + ∑ wj Xj•NB is one algorithm for finding w•NB = maximum likelihood in this model‣arg max12Conditional likelihood•Another: maximum conditional likelihood‣given data (X1, Y1), …, (XN, YN)‣arg max•Same model, different training criterion•Cond. MLE for logistic linear discriminant: logistic regression13Discussion•maxw P(X, Y | w) vs. maxw P(Y | X, w)•We’ve seen cond. MLE before:•Why choose one?‣MLE:‣cond. MLE:14Generative vs discriminative•Same trick works for any graphical model‣if we know we’re always going to be asking same query (Y given X1…XM), optimize for it‣max•Can improve performance, but also more risk of overfitting15Logistic regression•given data (X1, Y1), …, (XN, YN)•arg maxw ∏i P(Yi | Xi, w)16Neg. log likelihood!! !" !# $ # " !$%#&"'!()*+!,-./0)1/2/*+17Example!! !"#" !$##%!#%&#%'#%("18Weight spacew0w1–5 10!! !" # " !##$%&!! !" # " !##$%&!! !" # " !##$%&!! !" # " !##$%&!! !" # " !##$%&!! !" # " !##$%&!! !" # " !##$%&!! !" # " !##$%&!! !" # " !##$%&!! !" # " !##$%&!! !" # " !##$%&!! !" # " !##$%&!! !"#" !##$%&!! !"#" !##$%&!! !"#" !##$%&!! !"#" !##$%&–6419(X, Y) = (1.2, –1)!!"!#"!$!%!&"&%"!#"#!'"'#!()*+,-20(X, Y) = (1.2, –1)!"!#!$ !% " % $ & '!&!$!%"%21(X, Y) = (–1, 1)!"!#!$ !% " % $ & '!&!$!%"%22(X, Y) = (2, 1)!"!#!$ !% " % $ & '!&!$!%"%23–log(P(Y1..3 | X1..3, W))!"!#!$ !% " % $ & '!&!$!%"%24Generalization: multiple classes•One weight vector per class: Y ∈ {1,2,…,C}‣P(Y=k) = ‣Zk = •In 2-class case:25Multiclass example!6 !4 !2 0 2 4 6!6!4!20246figure from book26Conditional MAP logistic regression•P(Y | X, W) = ‣Z = •As in linear regression, can put prior on W‣common priors: L2 (ridge), L1 (sparsity)•maxw P(W=w | X, Y)27Software•Logistic regression software is easily available: most stats packages provide it‣e.g., glm function in R‣or, http://www.cs.cmu.edu/~ggordon/IRLS-example/•Most common algorithm: Newton’s method on log-likelihood (or L2-penalized version)‣called “iteratively reweighted least squares”‣for L1, slightly harder (less software available)28Bayesian regression•In linear and logistic regression, we’ve looked at ‣conditional MLE: maxw P(Y | X, w)‣conditional MAP: maxw P(W=w | X, Y)•But of course, a true Bayesian would turn up nose at both‣why?29Sample from posterior!"!#!$ " $ #"!%!&!'"'&30Predictive distribution!!"!#" "#"!"""$!"$%"$&"$'#31Overfitting•True Bayesian inference never leads to overfitting‣may still lead to bad results for other reasons!‣e.g., not enough data, bad model class, …•Overfitting is an indicator that the MLE or MAP approximation is a bad


View Full Document

CMU CS 10601 - Review

Documents in this Course
lecture

lecture

40 pages

Problem

Problem

12 pages

lecture

lecture

36 pages

Lecture

Lecture

31 pages

Lecture

Lecture

11 pages

Lecture

Lecture

18 pages

Notes

Notes

10 pages

Boosting

Boosting

21 pages

review

review

21 pages

review

review

28 pages

Lecture

Lecture

31 pages

lecture

lecture

52 pages

Review

Review

26 pages

review

review

29 pages

Lecture

Lecture

37 pages

Lecture

Lecture

35 pages

Boosting

Boosting

17 pages

Review

Review

35 pages

lecture

lecture

32 pages

Lecture

Lecture

28 pages

Lecture

Lecture

30 pages

lecture

lecture

29 pages

leecture

leecture

41 pages

lecture

lecture

34 pages

review

review

38 pages

review

review

31 pages

Lecture

Lecture

41 pages

Lecture

Lecture

15 pages

Lecture

Lecture

21 pages

Lecture

Lecture

38 pages

Notes

Notes

37 pages

lecture

lecture

29 pages

Load more
Download Review
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Review and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Review 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?