The last sort of problem I'll describe is one from computer vision. So you might take a picture like this and your phone or camera automatically highlights all the faces in there because faces are important to human beings we like to know where the faces are. I guess I imagine the future computers could highlight the computers in an image, but we're not there yet. Or I might take a picture like this and like to know, is there anyone outside my house right now at night, yep. Or I might take a selfie, I want to count the number of people in that selfie. So all of these are situations where you'd like to be able to identify and place where are the faces in an image. So everybody is, I have a picture like this, how does this work? Well, I'm going to take a little window of that picture and I'm going to basically crop it out of that picture and say is this a face, I'll ask. Somehow I'll write a little piece of program that'll determine is this a face, no that's not face and then I'll slide it a little bit in this case to the right and I'll ask is this a face and it will say no. And I'll keep sliding it like that until we're all the way across the top row and then all the way across an extra etc., and I'll find any place that says it is a face. So if I get over to this position here, I'll feed that little box in and it will say yes, that's a face, okay, this one here will say no that's not a face as an example. Now if I want to find faces in different sizes, I just rescale the image, so the box remains the same size, but I rescale the image it's equivalent to rescaling the box. But now my little Is this a face piece of code has to only look at boxes or snippets of the image that are the same size. Okay, so that's great, I've engineered the solution down now I just have to write this little function that basically takes in a piece of image and tells me if it's a face and that's hard. If you ask a typical computer programmer, how would you know if an image were a face or a cat or a dog or something else? On the outstream he'd say it's not clear how to do that. This is in fact what the computer looks at, that's some piece of the image there and each pixel in that image is represented by a number and there it is. And so you can ask yourself, do you think that's a face? Turns out it looks like this and now you can say that yes, that is a face because your brain has circuitry. And it's in the back of your head generally moving forward, that works really well in images but it doesn't work so well and just like raw numbers to be able to make sense of it, okay. So that's, that is that is a face, here's a different one, do you think that's a face? Yes, it is, it's a darker face in that the lighting is not as bright on that particular part of the image, but it is also a face, okay. So we need a function that map's images onto faces and that's hard to write but we can give it examples, I can give it a whole bunch of examples like this. So this little image patch is not a face and this one is a face and this one is a face and that one's not a face. I can give this as a large dataset you can just go through images and pull out all the different faces in there as a human being and throw those as examples and then anything I don't say is a face is clearly not a face. Okay, and so that brings us to sort of a machine learning problem, which is I give you some examples but I don't tell you exactly what the function is. And now I'd like you, you being the computer, I'd like the computer to help with a general function that will map inputs to outputs, so images to whether or not it's a face. And that function needs to generalize, that is it can't just work on the examples I showed it it's suppose to work on unseen future examples. Okay, so faces are difficult to describe, so let me describe this maybe in terms of an insect example instead. So in machine learning, we're trying to map something we've measured, so an input an image something we measure or something onto an output. Which is maybe is it a face is not a face is it a grasshopper is it not a grasshopper or something like that? And so the inputs are called the features and the outputs called the label or the class in this particular case. So here's an example maybe is purely fictitious, no insects were actually harm in the creation of this dataset. So maybe I've measured hypothetically, the wing beat frequency and the mass of some various insects, okay. And the blue ones are one type of insect and the red ones another type of insect, okay. And so in two dimensions if I just measured two things I can plot that and as a human being you could draw a line or something else. In general I've measured usually many more than two things, right? If I have an image that's 16 pixels by 16 pixels, each of those pixels is a measure of the amount of bite that fell on a particular part and so I have 256, 16 times 16 different measurements, right? Here I only have two different measurements, so the problem is easy, but I have to so I can show it to you because I can't show you something in 256 dimensional space. So in this case what we're looking for is some rule, so in this case, the rules a line and it says everything on one side of the line is of type blue and everything on the other side of the line is of type red, right? So that means if I give you a new insect that I measure its wing beat frequency and its mass then that corresponds to some point on this space. And then the rule will tell me should that be blue or should that be read and I've generalize from those examples to a general rule. Here's a more difficult one, maybe I've measured something else crazy about again hypothetical insects. And so maybe I'm looking for a more complex rule in this case or maybe I'm not maybe that's too complex a rule and I've messed up the problem by looking for more complex rules like this, okay. So that's the general way machine learning enters into problems, usually there's some transformation like in that image problem I want to find the faces. I first transform into the problem of sliding a window across an image and for each window in the image asking whether or not to face. Now, I've transformed in a problem of this binary classification problem, and then I bring in machine learning to solve that binary classification problem. These sorts of techniques are used in credit card fraud detection, so they have large databases of credit card transactions ones that were fraudulent ones that were not features about each. Medical diagnosis, satellite imagery analysis machine translation actually uses this as core component inside, online advertising trying to decide which ads if I put them up next to your web search would result in you clicking them or not brain-computer interfaces, all these sorts of things rely on that.