Se ha denunciado esta presentación.
Se está descargando tu SlideShare. ×

Introduction to Machine Learning

Anuncio
Anuncio
Anuncio
Anuncio
Anuncio
Anuncio
Anuncio
Anuncio
Anuncio
Anuncio
Anuncio
Anuncio
Cargando en…3
×

Eche un vistazo a continuación

1 de 74 Anuncio

Introduction to Machine Learning

Descargar para leer sin conexión

Intuitive introduction with easy-to-understand explanation of fundamental concepts in machine learning and neural networks. No prior machine learning or computing experience required.

Intuitive introduction with easy-to-understand explanation of fundamental concepts in machine learning and neural networks. No prior machine learning or computing experience required.

Anuncio
Anuncio

Más Contenido Relacionado

Presentaciones para usted (20)

Similares a Introduction to Machine Learning (20)

Anuncio

Más reciente (20)

Introduction to Machine Learning

  1. 1. Introduction to Machine Learning Nandita Naik 1
  2. 2. Agenda for Session 1 2 1. What can Machine Learning do in art? 2. How does ML work? 3. Main Concepts: a. How does a Computer Learn From Data? b. What is an ML Model? c. How Does Training and
  3. 3. What happens when art interacts with technology? 3
  4. 4. First Example of Technology for Art (1826 AD) 4
  5. 5. 5 Technology in Art Today: 2017 Go PhotoShop!
  6. 6. This is not Machine Intelligence, because a human is doing the thinking. 6
  7. 7. So What is Machine-Generated Art ? 7
  8. 8. 8 “The Red List” by Georgia O’Keeffe
  9. 9. 9
  10. 10. 10
  11. 11. 11
  12. 12. (source) 12
  13. 13. What Else Can Machine Intelligence do? 13
  14. 14. 14 Image recognition
  15. 15. Image captioning 15
  16. 16. This is just in the area of image processing. 16 ● Language Translation ● Music Generation ● Movie Recommendation in Netflix ● Call of Duty enemies ● Fraud detection ● Voice Recognition ● Disease detection
  17. 17. To get a closer look at ML, let’s investigate... 17
  18. 18. To get a closer look at ML, let’s investigate... SNAPCHAT! 18
  19. 19. 19
  20. 20. What’s going on? 20
  21. 21. Find the different parts of the person’s face! mesh or “point mask” 21
  22. 22. The mesh uses computer vision, which involves understanding images. 22 ● Snapchat’s algorithm learns from thousands of face pictures manually tagged with these dots, ● Then it predicts where the nose is in every new face that uses the puppy filter! Learning and Prediction : Key Concepts in Machine Learning
  23. 23. Machine Learning (ML) == learning from data 23
  24. 24. Machine learning works like our brain. 24 Just like us, it learns by observing, predicting and self-correcting.
  25. 25. Machine learning works like our brain. 25 Just like us, it learns by observing, predicting and self-correcting. What does that mean? Let’s take an example.
  26. 26. Suppose... The weekend’s coming up, and you just heard of a concert. You have to make a decision: should you go to the concert or stay home? 26
  27. 27. Should I go to the concert? 1. Do I have a test coming up? a. Which class? 2. What is the weather going to be like? 3. Do I have a friend that wants to come? a. Who? 4. How much do I like the band? 27
  28. 28. Should I go to the concert? 1. Do I have a test coming up? a. Which class? 2. What is the weather going to be like? 3. Do I have a friend that wants to come? a. Who? 4. How much do I like the band? But these factors aren’t all equal! Some may be more important or have a higher weight. 28
  29. 29. test? Nice weather? friend? test weight Weather weight friend weight Go or Stay? 29
  30. 30. Computers don’t know how important these factors are (what weights to give them.) At least, not right away. Problem 30
  31. 31. Solution They can learn the weights by studying lots and lots of examples. 31
  32. 32. To understand how a machine learns from data, we’ll take a simple example: linear regression. 32
  33. 33. 33 Grade Homework hours per week
  34. 34. 34 Grade Homework hours per week
  35. 35. 35 Grade Homework hours per week f(grade) = homework hours
  36. 36. 36 Grade Homework hours per week f(grade) = homework hours
  37. 37. Goal: Guess f(x)! Let’s assume f(x) is linear, so we can write... 37
  38. 38. Goal: Guess f(x)! Let’s assume f(x) is linear, so we can write... 38 y = wx + b
  39. 39. We don’t know what w and b are. Let’s guess! 39
  40. 40. 40Grade Homework hours per week We don’t know what w and b are. Let’s guess!
  41. 41. 41Grade Homework hours per week We don’t know what w and b are. Let’s guess!
  42. 42. 42Grade Homework hours per week We don’t know what w and b are. Let’s guess!
  43. 43. How good is our guess? 43
  44. 44. How good is our guess? Let’s measure loss. Loss = penalty for a wrong prediction “Less loss” is better than “more loss” 44
  45. 45. Goal: Minimize loss. 45
  46. 46. Goal: Minimize loss. 46 SGD (stochastic gradient descent)
  47. 47. gradient descent 47
  48. 48. Recap - linear regression: fitting a line to data - We randomly choose w and b (in y = wx + b) - Figure out our loss (“less loss” means we are closer) - Adjust our weights until you arrive at the 48
  49. 49. Questions? 49
  50. 50. 50 We know how to fit a line to our homework hours vs. grades data.
  51. 51. 51 We know how to fit a line to our homework hours vs. grades data. Not everything in life can be explained with a linear function!
  52. 52. 52 We know how to fit a line to our homework hours vs. grades data. Not everything in life can be explained with a linear function! How do we do better?
  53. 53. 53 Grade Homework hours per week
  54. 54. 54 Grade Homework hours per week
  55. 55. 55 Grade Homework hours per week
  56. 56. 56 Grade Homework hours per week
  57. 57. 57 overfitting: when f(x) doesn’t generalize
  58. 58. So we don’t want that kind of nonlinear function. 58
  59. 59. 59
  60. 60. In general, if we want a machine to learn a non- linear function, we use a neural network. 60
  61. 61. 61 w b y = wx + b
  62. 62. ReLU. f(x) = max(0,x) An activation function lets our network learn a non-linear function.
  63. 63. input weight output 63 computation max(0,x) x Activation functions
  64. 64. Now let’s talk what an actual neural network looks like. 64
  65. 65. A neural network is made up of many neurons, organized into layers. 65
  66. 66. neurons make up layers input data (x) output (y) input layer output layer The arrows are the weights and the inputs. 66
  67. 67. Often, in between the input and output layer... input data (x) output (y) input layer output layer The arrows are the weights and the inputs. 67
  68. 68. We have hidden layers. 68
  69. 69. We have hidden layers. 69 Job: transform inputs into something the output layer can use
  70. 70. 70 input data (x) output (y) input layer output layerhidden layer
  71. 71. A neural network... ● Processes millions of any kind of data ● Learns the properties of that data ● Generalizes those properties to data it’s never seen before 71
  72. 72. Recap 72 overfitting: when our function fits the data too closely and can’t generalize activation functions: let us to model non-linear functions A neural network is made up of many neurons, organized into layers. There are input, output, and hidden layers.
  73. 73. Questions? 73
  74. 74. For questions, contact me at nanni.naik(at)gmail.com or Github @nnaik39. 74

Notas del editor

  • Hi everyone! Welcome to Day 1! In this lecture, we’ll cover machine learning basics. Machine learning is based on fairly advanced mathematical concepts which we will not have time to cover in these two days. My goal today is to explain the basic concepts and the main terminology used by ML researchers. There will be times to ask questions at the end of concepts, and also times when I will ask you to provide an answer.
  • Here is what you can expect to learn in this lecture.
  • First let’s ask ourselves the question, “what can happen when art interacts with computers?” To answer this, let’s first look back on how art and technology have interacted in the past.
  • This is the first photograph that was ever taken. It was taken by Joseph Niepce around 1826. This is the view from an upstairs window at his estate. Nowadays, photographs look more realistic and colorful and vibrant, like the ones in National Geographic. I imagine that when Joseph Niepce took this photograph, he could have never foreseen the many directions photography has taken art over the years.
    (Source: https://petapixel.com/2013/10/02/first-photo/)
  • Then we get to digital art, which is a huge field today. Here we can see an example of photoshop, as this image has definitely been photoshopped like crazy! We see photoshop in our daily lives all the time, from magazine covers to advertisements to Instagram pictures. But, importantly, this is not machine intelligence. Why not?
    (Source: https://s-media-cache-ak0.pinimg.com/originals/c9/b8/c4/c9b8c4461b9b1c1dc2b8beb6cb9519c2.jpg)
  • A human is doing the thinking. In that picture, there was a human figuring out where to pull his eyes out so they look buggy. The machine was just bending to the person’s will. Here, the machine is a tool. We’ll talk about when a machine is more than a tool, when it can actually make intelligent decisions.
  • We’re talking about machine-generated art, which we will elaborate more on in the very near future. This field is very new and cutting-edge. Like the very first photograph ever taken that we just saw, we’re at the beginning of something here. So much is still left to discover. Let’s take a look at some examples of machine-generated art.
  • Here is my face and here is a painting called “The Red List” by famous artist Georgia O’Keeffe. There’s something in art called a pastiche, which is a French word for an artistic work in a style that imitates that of another work, artist, or period.
    We’re going to make a pastiche, where we take the style of “The Red List” and apply it to my face.
    Source: http://theredlist.com/media/database/fine_arts/arthistory/painting/realism_figurative_painting/georgia-o-keefe/015-georgia-o-keefe-theredlist.jpg
  • And here I am! I can convince my friends that I traveled back in time and got Georgia O’Keeffe to paint my portrait.
    The distinction here is that the computer does the thinking.
  • Source: https://farm8.staticflickr.com/7294/8732030861_1a72dec272_b.jpg
  • Imagine how hard it would be to PhotoShop this.
  • And finally here is another example of “neural art”. Can you imagine how hard it might be to do this manually using photoshop?
  • We’ve covered art-centered applications. What else can machine intelligence do? We’re going to focus on image-related applications.
  • Source: https://research.googleblog.com/2017/06/supercharge-your-computer-vision-models.html
  • http://cs.stanford.edu/people/karpathy/deepimagesent/
  • As we can see, Machine Learning affects every aspect of our life!
  • https://lh4.ggpht.com/vdK_CsMSsJoYvJpYgaj91fiJ1T8rnSHHbXL0Em378kQaaf_BGyvUek2aU9z2qbxJCAFV=w300
  • (Source: http://assets.teenvogue.com/photos/579918989e016460296a15a2/master/pass/2%20-%20Ariana%20Grande.jpg)
    (http://static.boredpanda.com/blog/wp-content/uploads/2016/03/funny-snapchat-face-swaps-492__605.jpg)
  • Let’s look at the basics of how this works. Snapchat’s algorithm isn’t available to the general public, but many newspapers have published articles on the high
  • Source: https://petapixel.com/2016/06/30/snapchats-powerful-facial-recognition-technology-works/
  • We’ll go more in depth later.
  • To make a good decision, you need more information than this.
  • Source: https://www.google.com/url?sa=i&rct=j&q=&esrc=s&source=images&cd=&ved=0ahUKEwjf8cXzwpHVAhUC-GMKHZnLBUAQjBwIBA&url=http%3A%2F%2Fclipartsign.com%2Fdl.php%3Fd%3D1842&psig=AFQjCNFX3ELQAeMYAThepSCDNdqaoqCOcg&ust=1500422330517855
  • Suppose you wanted a computer to make this decision for you. This would have to be machine intelligence, right? Decision-making
  • This comes back to what we said earlier about machine learning being learning from data.
  • Suppose I go around this room and ask nine of you: what’s your current grade? How many hours of homework do you have each night?
    Then I plot your answers on this graph.
    A nice assumption to make might be if you’re in a higher grade, you have more homework hours. But this is not always the case
  • Suppose I go around this room and ask nine of you: what’s your current grade? How many hours of homework do you have each night?
    Then I plot your answers on this graph.
    A nice assumption to make might be if you’re in a higher grade, you have more homework hours. But this is not always the case
  • Suppose I go around this room and ask nine of you: what’s your current grade? How many hours of homework do you have each night?
    Then I plot your answers on this graph.
    A nice assumption to make might be if you’re in a higher grade, you have more homework hours. But this is not always the case
  • Suppose I go around this room and ask nine of you: what’s your current grade? How many hours of homework do you have each night?
    Then I plot your answers on this graph.
    A nice assumption to make might be if you’re in a higher grade, you have more homework hours. But this is not always the case
  • Suppose I go around this room and ask nine of you: what’s your current grade? How many hours of homework do you have each night?
    Then I plot your answers on this graph.
    A nice assumption to make might be if you’re in a higher grade, you have more homework hours. But this is not always the case
  • Suppose I go around this room and ask nine of you: what’s your current grade? How many hours of homework do you have each night?
    Then I plot your answers on this graph.
    A nice assumption to make might be if you’re in a higher grade, you have more homework hours. But this is not always the case
  • Suppose I go around this room and ask nine of you: what’s your current grade? How many hours of homework do you have each night?
    Then I plot your answers on this graph.
    A nice assumption to make might be if you’re in a higher grade, you have more homework hours. But this is not always the case
  • http://www.dreams.metroeve.com/wp-content/uploads/2017/06/Hill-dreams-meaning.jpg
  • Here, instead of adjusting your height, you’re adjusting your weights.
    http://www.dreams.metroeve.com/wp-content/uploads/2017/06/Hill-dreams-meaning.jpg
  • Getting a line allows you to generalize to data you’ve never seen before.
  • Okay, now we’ll take a five-minute BREAK!
  • Does not predict every data accurately. Why do we care about the line? If it’s not super accurate, then why do we care?
    The real value of machine learning is not telling us what we already know. The value is using it to predict stuff we want to know.
    You can generalize to points you’ve never seen before.
  • Do you think this function makes a good prediction?
  • This is a terrible function. There is something called Occam’s Razor, where the simplest explanation is usually the correct one.
  • Here’s a simple model of a small neuron that does linear regression.
  • Researchers have determined that this method works.
  • We’re going to
  • Now let’s talk about hidden layers.
  • Each layer can apply any function you want to the previous layer to produce an output (usually a linear transformation followed by a squashing nonlinearity). The hidden layer's job is to transform the inputs into something that the output layer can use. The output layer transforms the hidden layer activations into whatever scale you wanted your output to be on.
  • If you want a computer to tell you if there's a bus in a picture, the computer might have an easier time if it had the right tools. So your bus detector might be made of a wheel detector, a rectangle detector (since the bus is shaped like a rectangle) and a size detector (to tell you it's too big to be a car). These are the three elements of your hidden layer: they're not part of the raw image, they're tools you designed to help you identify busses. If all three of those detectors turn on (or perhaps if they're especially active), then there's a good chance you have a bus in front of you. Neural nets are useful because there are good tools (like backpropagation) for building lots of detectors and putting them together.
  • So, zooming out, by being able to model any kind of function even if it is nonlinear, neural networks can…
    Pretty powerful tools.

×