DOC PREVIEW
CMU CS 10701 - Linear Regression and Artificial Neural Networks

This preview shows page 1-2-3-4-5 out of 16 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 16 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 16 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 16 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 16 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 16 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 16 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Linear Regression and Artificial Neural Networks Nan$Li$2011.09.27$What$is$Linear$Regression$• Assume$that$Y$(target)$is$a$linear$function$of$X$(features):$• E.g.$• $$• $There$are$other$forms,$but$let’s$consider$this$case$for$now$• Matrix$form:$Rent%Living%area%€ ˆ y =θ0+θ1x1+θ2x2+ ...+θkxk€ ˆ y = xTθWhat$is$a$good$LR$model?$• The$model$that$best$predicts$the$target$Y$given$features$X$• i.e.$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$to$be$close$to$zero$• Our$goal$is$to$seek$$$$$$that$minimize$the$following$cost%function%• Least1Mean1Square%(LSM)$€ ˆ y i(xi) − yi= xiTθ− yi€ J(θ) =12(xiTθ− yi)2i=1n∑How$to$find$the$optimal$$$$$?$$• Gradient$descent$• Converge$to$global$optimum$• Batch:$Guraanteed$convergence$• Online:$Fast$€ θjt +1=θjt−α∂∂θjJ(θ)t=θjt−α∂∂θj12(xiTθt− yi)2i=1n∑=θjt+α(yi− xiTθt)xiji=1n∑How$to$find$the$optimal$$$$$?$$• Directly$minimize$• Take$derivative$and$set$to$zero$€ J(θ)Derivation…$• Elements$€ ∇θtrθTXTXθ= ∇θtrθθTXTX= XTXθ+ (XTX )Tθ= XTXθ+ XTXθ€ trABC = trCAB = trBCA€ ∇AtrABATC = CAB + CTABT € ∇θtr y TXθ= ∇θtrθ y TX= ( y TX)T= XT y € trABC = trCAB = trBCA€ ∇AtrAB = BTMore$Derivation…$ € ∇θJ =12∇θtrθTXTXθ−θTXT y − y TXθ+ y T y ( )=12∇θtrθTXTXθ− 2∇θtr y TXθ+ ∇θtr y T y ( )=12XTXθ+ XTXθ− 2XT y ( )= XTXθ− XT y = 0The%normal%equations%€ ⇒ € ∇θtr y TXθ= XT y € ∇θtrθTXTXθ= XTXθ+ XTXθEquiIvalence$of$LMS$and$MLE$• Assume$• where$ε"follows$a$Gaussian$N(0,σ)$• Then$€ yi=θTxi+εEquivalence$of$LMS$and$MLE,$cont.$• By$$independence$assumption:$• The$log]likelihood$is:$• Recall$that:$• Maximizing$$$$$$$$$$is$equivalent$to$minimizing$$€ L(θ) = p(yi| xi;θ)i=1n∏=12πσexp −(yi−θTxi)22σ2⎛ ⎝ ⎜ ⎞ ⎠ ⎟ i=1n∏=12πσ⎛ ⎝ ⎜ ⎞ ⎠ ⎟ nexp −(yi−θTxi)2i=1n∑2σ2⎛ ⎝ ⎜ ⎜ ⎞ ⎠ ⎟ ⎟ € l(θ) = log L(θ) = n log12πσ−1σ212(yi−θTxi)2i=1n∑€ l(θ)€ J(θ)Ridge$Regression$vs$Lasso$Ridge&Regression:& &&&&&&&Lasso:&&&&&Lasso%(l1%penalty)%results%in%sparse%solu2ons%–%vector%with%more%zero%coordinates%Good%for%high>dimensional%problems%–%don’t%have%to%store%all%coordinates!%βs&with&&constant&&l1&norm&βs&with&constant&J(β)&(level&sets&of&J(β))&βs&with&&constant&&l2&norm&β2&β1&X XBayesian$Interpretation$• Ridge$regression$• Gaussian&Prior:&• Prior&belief&that&β&is&Gaussian&with &zero@mean&biases&soluAon&to&“small”&β&• Lasso$regression$• Laplace$Prior:$• Prior&belief&that&β&is&Laplace&with&zero@mean&biases&soluAon&to&“small”&β $$Something$More…$• LR$with$non]linear$basis$functions$• LR$does$not$mean$we$can$only$deal$with$linear$relationships$• Linear$means$linear$to$θ$• Features$can$be$non]linear$• where$the$φj(x)$are$fixed$basis$functions$(and$we$define$φ0(x)$=$1).$• Weighting$points$• Locally$weighted$LR:$Higher$weights$for$training$examples$closer$to$the$query$point$• Robust$regression:$Higher$weights$for$the$training$examples$that$fit$well$Artificial$Neural$Networks$• A$set$of$connected$perceptrons$that$make$prediction$based$on$unit$inputs$• Let’s$start$with$a$single$perceptron$Perceptron$Learning$• Find$$$$$$$such$that$it$minimizes$sum$of$squared$training$errors$• How?$• Gradient$descent!$• What’s$the$decision$boundary?$• Non]linear?$• Why?$ €  wMulti]layer$Neural$Networks$• Highly$flexible:$Non]linear$decision$boundary$Inputs Weights Output Independent variables Dependent variable Prediction Age 34 2 Gender Stage 4 .6 .5 .8 .2 .1 .3 .7 .2 Weights Hidden Layer “Probability of beingAlive” 0.6 Σ Σ .4 .2 ΣHow$to$learn?$• Backpropagation$• An$iterative$method$• For$each$example$• Perform$forward$propagation$• Start$from$output$layer$• Compute$gradient$of$node$with$parents$• Update$weight$based$on$the$gradient$• Convergence$•


View Full Document

CMU CS 10701 - Linear Regression and Artificial Neural Networks

Documents in this Course
lecture

lecture

12 pages

lecture

lecture

17 pages

HMMs

HMMs

40 pages

lecture

lecture

15 pages

lecture

lecture

20 pages

Notes

Notes

10 pages

Notes

Notes

15 pages

Lecture

Lecture

22 pages

Lecture

Lecture

13 pages

Lecture

Lecture

24 pages

Lecture9

Lecture9

38 pages

lecture

lecture

26 pages

lecture

lecture

13 pages

Lecture

Lecture

5 pages

lecture

lecture

18 pages

lecture

lecture

22 pages

Boosting

Boosting

11 pages

lecture

lecture

16 pages

lecture

lecture

20 pages

Lecture

Lecture

20 pages

Lecture

Lecture

39 pages

Lecture

Lecture

14 pages

Lecture

Lecture

18 pages

Lecture

Lecture

13 pages

Exam

Exam

10 pages

Lecture

Lecture

27 pages

Lecture

Lecture

15 pages

Lecture

Lecture

24 pages

Lecture

Lecture

16 pages

Lecture

Lecture

23 pages

Lecture6

Lecture6

28 pages

Notes

Notes

34 pages

lecture

lecture

15 pages

Midterm

Midterm

11 pages

lecture

lecture

11 pages

lecture

lecture

23 pages

Boosting

Boosting

35 pages

Lecture

Lecture

49 pages

Lecture

Lecture

22 pages

Lecture

Lecture

16 pages

Lecture

Lecture

18 pages

Lecture

Lecture

35 pages

lecture

lecture

22 pages

lecture

lecture

24 pages

Midterm

Midterm

17 pages

exam

exam

15 pages

Lecture12

Lecture12

32 pages

lecture

lecture

19 pages

Lecture

Lecture

32 pages

boosting

boosting

11 pages

pca-mdps

pca-mdps

56 pages

bns

bns

45 pages

mdps

mdps

42 pages

svms

svms

10 pages

Notes

Notes

12 pages

lecture

lecture

42 pages

lecture

lecture

29 pages

lecture

lecture

15 pages

Lecture

Lecture

12 pages

Lecture

Lecture

24 pages

Lecture

Lecture

22 pages

Midterm

Midterm

5 pages

mdps-rl

mdps-rl

26 pages

Load more
Download Linear Regression and Artificial Neural Networks
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 Linear Regression and Artificial Neural Networks 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 Linear Regression and Artificial Neural Networks 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?