introduction to machine learning
play

INTRODUCTION TO MACHINE LEARNING Joseph C. Osborn CS 51A Spring - PowerPoint PPT Presentation

INTRODUCTION TO MACHINE LEARNING Joseph C. Osborn CS 51A Spring 2020 Machine Learning is Machine learning is about predicting the future based on the past. -- Hal Daume III Machine Learning is Machine learning is about predicting


  1. INTRODUCTION TO MACHINE LEARNING Joseph C. Osborn CS 51A – Spring 2020

  2. Machine Learning is… Machine learning is about predicting the future based on the past. -- Hal Daume III

  3. Machine Learning is… Machine learning is about predicting the future based on the past. -- Hal Daume III past future predict learn Training T esting model/ model/ predictor Data Data predictor

  4. Data examples Data

  5. Data examples Data

  6. Data examples Data

  7. Data examples Data

  8. Supervised learning examples label label 1 label 3 labeled examples label 4 label 5 Supervised learning: given labeled examples

  9. Supervised learning label label 1 model/ predictor label 3 label 4 label 5 Supervised learning: given labeled examples

  10. Supervised learning model/ predicted label predictor Supervised learning: learn to predict new example

  11. Supervised learning: classifjcation label apple Classifjcation: a fjnite set of apple labels banana banana Supervised learning: given labeled examples

  12. Classifjcation Example

  13. Classifjcation Applications Optical character recognition (image-to-text) Spam detection Cheating detection Medical diagnosis Biometrics: Recognition/authentication using physical and/or behavioral characteristics: Face, iris, signature, etc

  14. Supervised learning: regression label -4.5 Regression: label is real- 10.1 valued 3.2 4.3 Supervised learning: given labeled examples

  15. Regression Example Price of a used car x : car attributes (e.g. mileage) y : price 15

  16. Regression Applications Economics/Finance: predict the value of a stock Epidemiology Car/plane navigation: angle of the steering wheel, acceleration, … T emporal trends: weather over time

  17. Supervised learning: ranking label 1 Ranking: label is a ranking 4 2 3 Supervised learning: given labeled examples

  18. Ranking example Given a query and a set of web pages, rank them according to relevance

  19. Ranking Applications User preference, e.g. Netfmix “My List” -- movie queue ranking iT unes fmight search (search in general) Social simulation AI Adaptive gameplay

  20. Unsupervised learning Unupervised learning: given data, i.e. examples, but no labels

  21. Unsupervised learning applications learn clusters/groups without any label customer segmentation (i.e. grouping) image compression bioinformatics: learn motifs Break up images into visual textures

  22. Reinforcement learning left, right, straight, left, left, left, straight GOOD left, straight, straight, left, right, straight, straight BAD left, right, straight, left, left, left, straight 18.5 -3 left, straight, straight, left, right, straight, straight Given a sequence of examples/states and a reward after completing that sequence, learn to predict the action to take in for an individual example/state

  23. Reinforcement learning example Backgammon WIN! … LOSE! … Given sequences of moves and whether or not the player won at the end, learn to make good moves

  24. Other learning variations What data is available:  Supervised, unsupervised, reinforcement learning  semi-supervised, active learning, … How are we getting the data:  online vs. offmine learning T ype of model:  generative vs. discriminative  parametric vs. non-parametric

  25. Representing examples examples What is an example? How is it represented?

  26. Features examples features How our algorithms f 1 , f 2 , f 3 , …, f n actually “view” the data f 1 , f 2 , f 3 , …, f n Features are the questions we can f 1 , f 2 , f 3 , …, f n ask about the examples f 1 , f 2 , f 3 , …, f n

  27. Features examples features How our algorithms red, round, leaf, 3oz, … actually “view” the data green, round, no leaf, 4oz, … Features are the questions we can yellow, curved, no leaf, 8oz, … ask about the examples green, curved, no leaf, 7oz, …

  28. Classifjcation revisited label examples red, round, leaf, 3oz, … apple learn green, round, no leaf, 4oz, … apple model/ classifjer yellow, curved, no leaf, 8oz, … banana banana green, curved, no leaf, 7oz, … During learning/training/induction, learn a model of what distinguishes apples and bananas based on the features

  29. Classifjcation revisited predict Apple or model/ red, round, no leaf, 4oz, … banana? classifjer The model can then classify a new example based on the features

  30. Classifjcation revisited predict model/ Apple red, round, no leaf, 4oz, … classifjer Why? The model can then classify a new example based on the features

  31. Classifjcation revisited Training data T est set label examples red, round, leaf, 3oz, … apple ? green, round, no leaf, 4oz, … apple red, round, no leaf, 4oz, … yellow, curved, no leaf, 4oz, … banana banana green, curved, no leaf, 5oz, …

  32. Classifjcation revisited Training data T est set label examples red, round, leaf, 3oz, … apple ? green, round, no leaf, 4oz, … apple red, round, no leaf, 4oz, … yellow, curved, no leaf, 4oz, … banana Learning is about generalizing from the training data banana green, curved, no leaf, 5oz, …

  33. models model/ classifjer We have many, many difgerent options for the model They have difgerent characteristics and perform difgerently (accuracy, speed, etc.)

  34. Probabilistic modeling n i a r t training data probabilistic Model the data with a model: probabilistic model which p( example ) tells us how likely a given data example is

  35. Probabilistic models Example to label probabilistic apple model: or yellow, curved, no leaf, 6oz banana p(example) features

  36. Probabilistic models For each label, ask for the probability probabilistic yellow, curved, no leaf, 6oz, banana model: p(example) yellow, curved, no leaf, 6oz, apple label features

  37. Probabilistic models Pick the label with the highest probability probabilistic 0.004 yellow, curved, no leaf, 6oz, banana model: 0.00002 p(example) yellow, curved, no leaf, 6oz, apple label features

  38. Probability basics A probability distribution gives the probabilities of all possible values of an event For example, say we fmip a coin three times. We can defjne the probability of the number of time the coin came up heads. P(num heads) P(3) = ? P(2) = ? P(1) = ? P(0) = ?

  39. Probability distributions What are the possible outcomes of three fmips (hint, there are eight of them)? T T T T T H T H T T H H H T T H T H H H T H H H

  40. Probability distributions Assuming the coin is fair, what are our probabilities? number of times it happens probability = total number of cases T T T T T H P(num heads) T H T T H H P(3) = ? H T T P(2) = ? H T H P(1) = ? H H T P(0) = ? H H H

  41. Probability distributions Assuming the coin is fair, what are our probabilities? number of times it happens probability = total number of cases T T T T T H P(num heads) T H T T H H P(3) = ? H T T P(2) = ? H T H P(1) = ? H H T P(0) = ? H H H

  42. Probability distributions Assuming the coin is fair, what are our probabilities? number of times it happens probability = total number of cases T T T T T H P(num heads) T H T T H H P(3) = 1/8 H T T P(2) = ? H T H P(1) = ? H H T P(0) = ? H H H

  43. Probability distributions Assuming the coin is fair, what are our probabilities? number of times it happens probability = total number of cases T T T T T H P(num heads) T H T T H H P(3) = 1/8 H T T P(2) = ? H T H P(1) = ? H H T P(0) = ? H H H

  44. Probability distributions Assuming the coin is fair, what are our probabilities? number of times it happens probability = total number of cases T T T T T H P(num heads) T H T T H H P(3) = 1/8 H T T P(2) = 3/8 H T H P(1) = ? H H T P(0) = ? H H H

  45. Probability distributions Assuming the coin is fair, what are our probabilities? number of times it happens probability = total number of cases T T T T T H P(num heads) T H T T H H P(3) = 1/8 H T T P(2) = 3/8 H T H P(1) = 3/8 H H T P(0) = 1/8 H H H

  46. Probability distribution A probability distribution assigns probability values to all possible values Probabilities are between 0 and 1, inclusive The sum of all probabilities in a distribution must be 1 P(num heads) P(3) = 1/8 P(2) = 3/8 P(1) = 3/8 P(0) = 1/8

  47. Probability distribution A probability distribution assigns probability values to all possible values Probabilities are between 0 and 1, inclusive The sum of all probabilities in a distribution must be 1 P P P(3) = -1 P(3) = 1/2 P(2) = 2 P(2) = 1/2 P(1) = 0 P(1) = 1/2 P(0) = 0 P(0) = 1/2

  48. Some example probability distributions probability of heads (distribution options: heads, tails) probability of passing class (distribution options: pass, fail) probability of rain today (distribution options: rain or no rain) probability of getting an ‘A’ (distribution options: A, B, C, D, F)

  49. Conditional probability distributions Sometimes we may know extra information about the world that may change our probability distribution P(X|Y) captures this (read “probability of X given Y”)  Given some information (Y) what does our probability distribution look like  Note that this is still just a normal probability distribution

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