what is modeling
play

What is modeling? NEU 466M Instructor: Professor Ila R. - PowerPoint PPT Presentation

What is modeling? NEU 466M Instructor: Professor Ila R. Fiete Spring 2016 Reference: NEURAL NETWORKS FOR PATTERN RECOGNITION, CHRISOPHER BISHOP


  1. What ¡is ¡modeling? ¡ ¡ NEU ¡466M ¡ Instructor: ¡Professor ¡Ila ¡R. ¡Fiete ¡ Spring ¡2016 ¡

  2. Reference: ¡ NEURAL ¡NETWORKS ¡FOR ¡PATTERN ¡ RECOGNITION, ¡CHRISOPHER ¡BISHOP ¡ hEp://cs.du.edu/~mitchell/mario_books/Neural_Networks_for_PaEern_RecogniLon_-­‑_Christopher_Bishop.pdf ¡

  3. What ¡does ¡modeling ¡mean? ¡ example of ‘a’ example of ‘b’ Pixels x i with values 1 or 0 (black or white).

  4. What ¡does ¡modeling ¡mean? ¡ example of ‘a’ example of ‘b’ What is ‘a’-ness, versus ‘b’-ness?

  5. Equivalent ¡problem ¡encountered ¡by ¡electrophysiologists ¡ figure ¡from ¡Quian ¡Quiroga ¡ → ‘ a ’ ‘ b ’ Categorize ¡recorded ¡spike ¡as ¡coming ¡from ¡neuron ¡a ¡or ¡b ¡

  6. What ¡does ¡modeling ¡mean? ¡ example of ‘a’ example of ‘b’ What is ‘a’-ness, versus ‘b’-ness?

  7. Model: ¡relaLonship ¡between ¡data ¡and ¡ its ¡category ¡ { x 1 , x 2 , · · · , x N } → ‘ a ’ { x 0 1 , x 0 2 , · · · , x 0 N } → ‘ b ’ 256 × 256 pixels : N = 65536 Store every image with its letter label?

  8. Model: ¡store ¡every ¡possible ¡image ¡ with ¡corresponding ¡leEer ¡label? ¡ → ‘ a ’ ‘ b ’ Number of 256 × 256 bw images: 2 65536 ∼ 10 20000 256 × 256 pixels : N = 65536 Atoms in universe: ∼ 10 80 Houston, ¡we ¡have ¡a ¡problem. ¡ ¡

  9. Storing ¡each ¡data, ¡category ¡pair ¡ • Need ¡too ¡many ¡examples/data ¡to ¡fill ¡grid ¡between ¡ inputs ¡to ¡categories! ¡“Curse ¡of ¡dimensionality” ¡ • Too ¡much ¡data ¡to ¡store! ¡ ¡ à ¡Compactness ¡ ¡ • Not ¡predicLve: ¡What ¡to ¡do ¡with ¡new ¡example? ¡ ¡ ¡ à ¡Generalizability ¡ ¡

  10. What ¡we ¡want ¡from ¡a ¡model: ¡compactness ¡and ¡ generalizability. ¡

  11. One ¡soluLon: ¡feature ¡selecLon ¡ • Look ¡at ¡some ¡much ¡smaller ¡set ¡of ¡ characterisLc ¡features ¡that ¡define ¡the ¡classes. ¡ • How ¡to ¡choose ¡these? ¡ ¡ ¡-­‑ ¡by ¡“hand” ¡ ¡-­‑ ¡some ¡“automaLc” ¡technique ¡ (sounds ¡magical ¡but ¡this ¡is ¡goal ¡of ¡much ¡staLsLcs ¡and ¡machine ¡learning; ¡ ¡ we ¡will ¡consider ¡how ¡automaLcally ¡find ¡features ¡in ¡this ¡class) ¡

  12. Features ¡ x 1 : height-to-width ratio of object ˜ x 2 : some other feature ˜

  13. Features ¡ � : ‘ a ’ × : ‘ b ’ x 1 : height-to-width ratio of object ˜ x 2 : some other feature ˜

  14. Features ¡ � : ‘ a ’ × : ‘ b ’ More features can be helpful: x 1 only would lead to poor categorization ˜

  15. Features ¡ • If ¡adding ¡features ¡improves ¡performance, ¡ keep ¡adding ¡independent ¡features? ¡ • Will ¡this ¡conLnue ¡to ¡improve ¡performance? ¡ At ¡some ¡point, ¡NO! ¡Performance ¡will ¡get ¡worse. ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡WHY? ¡

  16. A ¡more ¡familiar ¡example: ¡regression ¡ • Instead ¡of ¡discrete ¡categories ¡( ‘a’, ¡’b’ ), ¡each ¡ datapoint ¡(or ¡data ¡vector) ¡maps ¡to ¡some ¡value ¡ of ¡a ¡conLnuous ¡variable ¡( y ). ¡ ¡ ¡ { ( x 1 , y 1 ) , ( x 2 , y 2 ) , · · · , ( x N , y N ) }

  17. { ( x 1 , y 1 ) , ( x 2 , y 2 ) , · · · , ( x N , y N ) } x 1 independent variable y 1 response or dependent variable

  18. Modeling ¡as ¡regression ¡ { ( x 1 , y 1 ) , ( x 2 , y 2 ) , · · · , ( x N , y N ) } What ¡does ¡it ¡mean ¡to ¡model ¡this ¡data? ¡ ¡ -­‑ ¡ ¡Want ¡to ¡write ¡ y ¡as ¡some ¡funcLon ¡of ¡ x ¡ -­‑ Want ¡to ¡fit ¡a ¡funcLon ¡through ¡x, ¡y ¡ ¡ -­‑ Given ¡ x ¡want ¡to ¡predict ¡ y ¡

  19. Regression: ¡curve-­‑fieng ¡ { ( x 1 , y 1 ) , ( x 2 , y 2 ) , · · · , ( x N , y N ) } M y ( x ) = w 0 + w 1 x + · · · + w M x M = X w j x j ˜ j =0 free parameters: ( w 0 , w 1 , · · · , w M )

  20. Polynomial ¡regression ¡ • The ¡larger ¡M, ¡the ¡higher-­‑degree ¡the ¡polynomial ¡ à ¡more ¡complex ¡model/more ¡features. ¡ ¡ • Expect ¡fit ¡to ¡get ¡beEer ¡with ¡increasing ¡M. ¡ ¡ When ¡M ¡= ¡N, ¡then ¡exact ¡fit ¡to ¡all ¡datapoints ¡(b/c ¡ M th ¡order ¡polynomial ¡has ¡M+1 ¡parameters, ¡M ¡ roots). ¡ ¡ • So ¡are ¡the ¡more-­‑complex ¡models ¡beEer? ¡ ¡

  21. Parameters ¡chosen ¡to ¡minimize ¡fit ¡error ¡ Common ¡error ¡funcLon: ¡sum-­‑of-­‑squares: ¡ ¡ N E = 1 X [˜ y ( x n ; w ) − y n ] 2 n =1 (Is ¡this ¡the ¡only ¡choice? ¡No. ¡Best ¡choice? ¡InteresLng ¡q: ¡we’ll ¡get ¡to ¡it.) ¡ N 1 w ∗ = arg min X [˜ y ( x n ; w ) − y n ] 2 w n =1 (How ¡to ¡implement? ¡Matlab: ¡polyfit. ¡Theory: ¡we’ll ¡get ¡to ¡it.) ¡

  22. Linear ¡fit ¡(M=1) ¡ Degree 1, squared error = 0.45126 1 N ¡= ¡11 ¡datapoints ¡ 0.9 dashed ¡= ¡true ¡fxn ¡ 0.8 0.7 0.6 y 0.5 0.4 0.3 0.2 0.1 0 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 x

  23. QuadraLc ¡(M=2) ¡ Degree 2, squared error = 0.45126 1 0.9 N ¡= ¡11 ¡datapoints ¡ dashed ¡= ¡true ¡fxn ¡ 0.8 0.7 0.6 y 0.5 0.4 0.3 0.2 0.1 0 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 x

  24. Cubic ¡ Degree 3, squared error = 0.02289 1 0.9 N ¡= ¡11 ¡datapoints ¡ dashed ¡= ¡true ¡fxn ¡ 0.8 0.7 0.6 y 0.5 0.4 0.3 0.2 0.1 0 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 x

  25. M=9 ¡ Degree 9, squared error = 0.0023272 1 N ¡= ¡11 ¡datapoints ¡ 0.9 dashed ¡= ¡true ¡fxn ¡ 0.8 0.7 0.6 y 0.5 0.4 0.3 0.2 0.1 0 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 x

  26. M ¡= ¡11 ¡ Degree 11, squared error = 1.184e − 20 1 N ¡= ¡11 ¡datapoints ¡ 0.8 dashed ¡= ¡true ¡fxn ¡ 0.6 0.4 y 0.2 0 − 0.2 − 0.4 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 x

  27. Sum-­‑of-­‑squares ¡error ¡ fit ¡error ¡on ¡training/new ¡data ¡ 0.5 0.45 squared error 0.4 0.35 0.3 0.25 0.2 0.15 0.1 0.05 0 1 2 3 4 5 6 7 8 9 10 11 M

  28. Predictability ¡ • Error ¡on ¡fieng ¡the ¡specific ¡training ¡data ¡keeps ¡decreasing ¡with ¡ model ¡complexity ¡(M). ¡ • Error ¡of ¡fit ¡to ¡previously ¡un-­‑fit/unseen ¡data ¡improves ¡but ¡then ¡ worsens ¡with ¡increasing ¡M. ¡ • Model ¡is ¡ overfi.ng ¡to ¡foibles ¡of ¡training ¡data ¡(noise) ¡ajer ¡M ¡= ¡3. ¡ ¡ • Model ¡becomes ¡both ¡ more ¡complex ¡and ¡ less ¡predic8ve ¡beyond ¡M ¡= ¡ 3 ¡features. ¡ ¡ • Key ¡technique: ¡cross-­‑validaLon. ¡Test ¡model ¡on ¡previously ¡unseen ¡ data. ¡Hold-­‑out ¡dataset ¡or ¡jack-­‑knife/leave-­‑one-­‑out ¡approaches. ¡ ¡ (There ¡are ¡other ¡ways ¡to ¡improve ¡predictability ¡by ¡reducing ¡complexity, ¡ ¡ e.g. ¡by ¡directly ¡constraining ¡the ¡complexity ¡of ¡the ¡model: ¡“regularizaLon”) ¡ ¡

  29. Back ¡to ¡categorizaLon ¡example ¡ simplest ¡ intermediate ¡ most ¡flexible/complex ¡ exhibits ¡overfieng ¡

  30. BeEer ¡features: ¡admit ¡simpler ¡model ¡ → ‘ a ’ ‘ b ’ beEer ¡choice ¡of ¡features ¡ poor ¡choice ¡of ¡features ¡ (In ¡regression ¡example, ¡data ¡were ¡generated ¡from ¡a ¡sine ¡wave. ¡ ¡ Using ¡sines ¡instead ¡of ¡polynomials ¡would ¡have ¡produced ¡an ¡excellent ¡2-­‑parameter ¡fit.) ¡

  31. Summary ¡ • A ¡good ¡model ¡can ¡describe ¡the ¡data ¡in ¡a ¡ relaLvely ¡simple/low-­‑complexity/compact ¡way ¡ (but ¡not ¡too ¡low! ¡Einstein: ¡as ¡simple ¡as ¡possible, ¡ but ¡no ¡simpler) ¡and ¡has ¡good ¡predicLon ¡ performance. ¡ ¡ ¡ • ExtracLng ¡“features” ¡of ¡data ¡as ¡a ¡way ¡to ¡model ¡it. ¡ ¡ • To ¡determine ¡predictability, ¡important ¡to ¡cross-­‑ validate ¡models/fits. ¡ ¡

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend