overview
play

Overview CS 446 What is machine learning? Machine learning : study - PowerPoint PPT Presentation

Overview CS 446 What is machine learning? Machine learning : study of computational mechanisms that learn from data to make predictions and decisions. 1 / 21 Application 1: image classification Birdwatcher takes photos of birds,


  1. Overview CS 446

  2. What is machine learning? ◮ Machine learning : study of computational mechanisms that “learn” from data to make predictions and decisions. 1 / 21

  3. Application 1: image classification ◮ Birdwatcher takes photos of birds, organizes by species. 2 / 21

  4. Application 1: image classification ◮ Birdwatcher takes photos of birds, organizes by species. ◮ Goal : automatically recognize bird species in new photos. 2 / 21

  5. Application 1: image classification ◮ Birdwatcher takes photos of birds, organizes by species. ◮ Goal : automatically recognize bird species in new photos. Indigo bunting 2 / 21

  6. Application 1: image classification ◮ Birdwatcher takes photos of birds, organizes by species. ◮ Goal : automatically recognize bird species in new photos. Indigo bunting ◮ Why ML : variation in lighting, occlusions, morphology. 2 / 21

  7. � R � R � R � � � � � � � Application 2: recommender system ◮ Netflix users watch movies and provide ratings. 3 / 21

  8. � R � R � R � � � � � � � Application 2: recommender system ◮ Netflix users watch movies and provide ratings. ◮ Goal : predict user’s rating of unwatched movie. 3 / 21

  9. � R � R � R � � � � � � � Application 2: recommender system ◮ Netflix users watch movies and provide ratings. ◮ Goal : predict user’s rating of unwatched movie. ◮ ( Real goal : keep users paying customers.) 3 / 21

  10. � R � R � R � � � � � � � Application 2: recommender system ◮ Netflix users watch movies and provide ratings. ◮ Goal : predict user’s rating of unwatched movie. ◮ ( Real goal : keep users paying customers.) ◮ ( Real effect : reinforce stereotypes found in the data?) 3 / 21

  11. � � � � � � � Application 2: recommender system ◮ Netflix users watch movies and provide ratings. ◮ Goal : predict user’s rating of unwatched movie. ◮ ( Real goal : keep users paying customers.) ◮ ( Real effect : reinforce stereotypes found in the data?) Serious � R Braveheart � R Amadeus The Color Purple Lethal Weapon Sense and Ocean’s 11 Geared Sensibility Geared toward toward males females Dave The Lion King Dumb and Dumber The Princess Independence Diaries Day Gus Escapist (Image credit: Koren, Bell, and Volinsky, 2009.) � R 3 / 21

  12. � � � � � � � Application 2: recommender system ◮ Netflix users watch movies and provide ratings. ◮ Goal : predict user’s rating of unwatched movie. ◮ ( Real goal : keep users paying customers.) ◮ ( Real effect : reinforce stereotypes found in the data?) Serious � R Braveheart � R Amadeus The Color Purple Lethal Weapon Sense and Ocean’s 11 Geared Sensibility Geared toward toward males females Dave The Lion King Dumb and Dumber The Princess Independence Diaries Day Gus Escapist (Image credit: Koren, Bell, and Volinsky, 2009.) � R ◮ Why ML : can go far by representing users as normalized view count vectors, and correlating them. 3 / 21

  13. Application 3: machine translation ◮ Linguists provide translations of all English language books into French, sentence-by-sentence. 4 / 21

  14. Application 3: machine translation ◮ Linguists provide translations of all English language books into French, sentence-by-sentence. ◮ Goal : translate any English sentence into French. 4 / 21

  15. Application 3: machine translation ◮ Linguists provide translations of all English language books into French, sentence-by-sentence. ◮ Goal : translate any English sentence into French. Note : the text-to-speech is via ML (recurrent network). 4 / 21

  16. Application 3: machine translation ◮ Linguists provide translations of all English language books into French, sentence-by-sentence. ◮ Goal : translate any English sentence into French. Note : the text-to-speech is via ML (recurrent network). ◮ Why ML ? Can avoid not just the tedium of endless grammar rules, but also hope to capture idiom and other nuance. 4 / 21

  17. Application 4: chess ◮ Chess enthusiasts construct a large corpus of chess games. 5 / 21

  18. Application 4: chess ◮ Chess enthusiasts construct a large corpus of chess games. ◮ Goal : for any board position, determine probability that each possible move leads to a win. 5 / 21

  19. Application 4: chess ◮ Chess enthusiasts construct a large corpus of chess games. ◮ Goal : for any board position, determine probability that each possible move leads to a win. 5 / 21

  20. Application 4: chess ◮ Chess enthusiasts construct a large corpus of chess games. ◮ Goal : for any board position, determine probability that each possible move leads to a win. ◮ Why ML ? Magical “interpolation” between various positions. 5 / 21

  21. Application 4: chess ◮ Chess enthusiasts construct a large corpus of chess games. ◮ Goal : for any board position, determine probability that each possible move leads to a win. ◮ Why ML ? Magical “interpolation” between various positions. ◮ Note : it can even learn via self-play! 5 / 21

  22. Interlude: technical background Math. Software. 6 / 21

  23. Interlude: technical background Math. ◮ Linear algebra (e.g., null spaces; eigendecomposition; SVD. . . ). Software. 6 / 21

  24. Interlude: technical background Math. ◮ Linear algebra (e.g., null spaces; eigendecomposition; SVD. . . ). ◮ Basic probability and statistics (e.g., variance of a random variable). Software. 6 / 21

  25. Interlude: technical background Math. ◮ Linear algebra (e.g., null spaces; eigendecomposition; SVD. . . ). ◮ Basic probability and statistics (e.g., variance of a random variable). ◮ Multivariable calculus (e.g., gradient of � Aw − b � 2 wrt w ). Software. 6 / 21

  26. Interlude: technical background Math. ◮ Linear algebra (e.g., null spaces; eigendecomposition; SVD. . . ). ◮ Basic probability and statistics (e.g., variance of a random variable). ◮ Multivariable calculus (e.g., gradient of � Aw − b � 2 wrt w ). ◮ Basic proof writing (e.g., prove A ⊤ A is positive semi-definite). Software. 6 / 21

  27. Interlude: technical background Math. ◮ Linear algebra (e.g., null spaces; eigendecomposition; SVD. . . ). ◮ Basic probability and statistics (e.g., variance of a random variable). ◮ Multivariable calculus (e.g., gradient of � Aw − b � 2 wrt w ). ◮ Basic proof writing (e.g., prove A ⊤ A is positive semi-definite). Software. ◮ python3 . It’s slow, but often computation will be inside fast libraries. 6 / 21

  28. Interlude: technical background Math. ◮ Linear algebra (e.g., null spaces; eigendecomposition; SVD. . . ). ◮ Basic probability and statistics (e.g., variance of a random variable). ◮ Multivariable calculus (e.g., gradient of � Aw − b � 2 wrt w ). ◮ Basic proof writing (e.g., prove A ⊤ A is positive semi-definite). Software. ◮ python3 . It’s slow, but often computation will be inside fast libraries. ◮ numpy , an easy-to-use numeric library. 6 / 21

  29. Interlude: technical background Math. ◮ Linear algebra (e.g., null spaces; eigendecomposition; SVD. . . ). ◮ Basic probability and statistics (e.g., variance of a random variable). ◮ Multivariable calculus (e.g., gradient of � Aw − b � 2 wrt w ). ◮ Basic proof writing (e.g., prove A ⊤ A is positive semi-definite). Software. ◮ python3 . It’s slow, but often computation will be inside fast libraries. ◮ numpy , an easy-to-use numeric library. ◮ pytorch , a numeric library with gpu support, auto-differentiation, and deep learning helpers. 6 / 21

  30. Interlude: technical background Math. ◮ Linear algebra (e.g., null spaces; eigendecomposition; SVD. . . ). ◮ Basic probability and statistics (e.g., variance of a random variable). ◮ Multivariable calculus (e.g., gradient of � Aw − b � 2 wrt w ). ◮ Basic proof writing (e.g., prove A ⊤ A is positive semi-definite). Software. ◮ python3 . It’s slow, but often computation will be inside fast libraries. ◮ numpy , an easy-to-use numeric library. ◮ pytorch , a numeric library with gpu support, auto-differentiation, and deep learning helpers. My opinion. pytorch is one of the nicest libraries I’ve ever used, for anything . I use it for much more than deep learning. 6 / 21

  31. python3 , pytorch , numpy >>> import numpy >>> import torch >>> 3 / 2 1.5 >>> 3 // 2 1 >>> A = torch.randn(5,5) >>> b = torch.randn(5,1) >>> x = torch.gels(b, A)[0] >>> (A @ x − b).norm() tensor(3.7985e − 06) >>> x = numpy.linalg.lstsq(A, b)[0] >>> (A @ torch.tensor(x) − b).norm() tensor(1.1999e − 06) 7 / 21

  32. pytorch on gpu is easy >>> import torch >>> A = torch.randn(5, 5) >>> b = torch.randn(5) >>> (A @ b).norm() tensor(4.7746) >>> device = torch.device("cuda:0") >>> (A.to(device) @ b.to(device)).norm() tensor(4.7746, device=’cuda:0’) >>> (A.to(device) @ b).norm() Traceback (most recent call last): File " < stdin > ", line 1, in < module > RuntimeError: Expected object of type torch.cuda.FloatTensor but found type torch.FloatTensor for argument #2 ’ v e c ’ Note . Homeworks will be graded in a gpu-free container! 8 / 21

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