CS 75 Mache Lear Lecture 7 Lear reresso cot. Lear methods for classfcato Mlos Hausrecht mlos@cs.ptt.edu 539 Seott Square CS 75 Mache Lear Coeffcet shrae he least squares estmates ofte have lo bas but hh varace he predcto accurac ca be ofte mproved b sett some coeffcets to zero Icreases the bas reduces the varace of estmates Solutos: Subset selecto Rde reresso Prcpal compoet reresso Net: rde reresso CS 75 Mache Lear
Rde reresso Error fucto for the stadard least squares estmates: J.. * We see: ar m Rde reresso: J + λ Where.. d.. ad λ What does the e error fucto do? CS 75 Mache Lear Rde reresso Stadard reresso: J Rde reresso: J d.. + λ.. pealzes o-zero ehts th the cost proportoal to λ a shrae coeffcet If a put attrbute j has a small effect o mprov the error fucto t s shut do b the pealt term Icluso of a shrae pealt s ofte referred to as reularzato CS 75 Mache Lear
Supervsed lear ata: { d d.. d} a set of eamples d < > s put vector ad s desred output ve b a teacher Objectve: lear the mapp f : X Y s.t. f for all.. o tpes of problems: Reresso: Y s cotuous Eample: ears product orders compa stoc prce Classfcato: Y s dscrete Eample: temperature heart rate dsease oda: bar classfcato problems: CS 75 Mache Lear Bar classfcato o classes Y {} Our oal s to lear to classf correctl to tpes of eamples Class labeled as Class labeled as We ould le to lear f : X { } Zero-oe error loss fucto f Error f Error e ould le to mmze: E Error Frst step: e eed to devse a model of the fucto CS 75 Mache Lear
scrmat fuctos Oe coveet a to represet classfers s throuh scrmat fuctos Wors for bar ad mult-a classfcato Idea: For ever class defe a fucto mapp X R Whe the decso o put should be made choose the class th the hhest value of So hat happes th the put space? Assume a bar case. CS 75 Mache Lear scrmat fuctos.5.5 -.5 - -.5 - - -.5 - -.5.5.5 CS 75 Mache Lear
scrmat fuctos.5.5 -.5 - -.5 - - -.5 - -.5.5.5 CS 75 Mache Lear scrmat fuctos.5.5 -.5 - -.5 - - -.5 - -.5.5.5 CS 75 Mache Lear
efe decso boudar. scrmat fuctos.5.5 -.5 - -.5 - - -.5 - -.5.5.5 CS 75 Mache Lear Quadratc decso boudar 3 ecso boudar.5.5.5 -.5 - -.5 - - -.5 - -.5.5.5 CS 75 Mache Lear
Lostc reresso model efes a lear decso boudar scrmat fuctos: here z / + e z f - s a lostc fucto Iput vector z f d Lostc fucto d CS 75 Mache Lear Lostc fucto fucto z z + e also referred to as a smod fucto Replaces the threshold fucto th smooth stch taes a real umber ad outputs the umber the terval [].9.8.7.6.5.4.3.. - -5 - -5 5 5 CS 75 Mache Lear
Lostc reresso model scrmat fuctos: z Where z / + e - s a lostc fucto Values of dscrmat fuctos var [] Probablstc terpretato f p Iput vector d d z p CS 75 Mache Lear Lostc reresso Istead of lear the mapp to dscrete values f : X {} e lear a probablstc fucto f : X [] here f descrbes the probablt of class ve f p Note that: p p rasformato to dscrete class values: If p / the choose Else choose CS 75 Mache Lear
Lear decso boudar Lostc reresso model defes a lear decso boudar Wh? Aser: Compare to dscrmat fuctos. ecso boudar: For the boudar t must hold: o lo o lo lo ep + ep lo lo ep + ep CS 75 Mache Lear Lostc reresso model. ecso boudar LR defes a lear decso boudar Eample: classes blue ad red pots ecso boudar.5.5 -.5 - -.5 - - -.5 - -.5.5.5 CS 75 Mache Lear
CS 75 Mache Lear Lelhood of outputs Let he Fd ehts that mamze the lelhood of outputs Appl the lo-lelhood trc he optmal ehts are the same for both the lelhood ad the lo-lelhood Lostc reresso: parameter lear. l lo lo µ µ µ µ P L µ µ z p µ lo lo µ µ + > < CS 75 Mache Lear Lostc reresso: parameter lear Lo lelhood ervatves of the lolelhood Gradet descet: lo lo l µ µ + f l ] [ l α Nolear ehts!! + f ] [ α j j z l
Lostc reresso. Ole radet descet O-le compoet of the lolelhood J lo µ + lo µ ole O-le lear update for eht J ole α [ J ] ole th update for the lostc reresso ad < > + α [ f ] CS 75 Mache Lear Ole lostc reresso alorthm Ole-lostc-reresso umber of teratos talze ehts Kd for :: umber of teratos do select a data pot < > from set α / update ehts parallel + α [ f ] ed for retur ehts CS 75 Mache Lear
Ole alorthm. Eample. CS 75 Mache Lear Ole alorthm. Eample. CS 75 Mache Lear
Ole alorthm. Eample. CS 75 Mache Lear