In this video, we'll talk about a spatial or geometric way to understand how supervised learning works. Now, in the previous section, I talked about a prototypical machine learning problem, which is taking an image and outputting a label such as "cat" or "dog." Now, to understand how a machine learning algorithm might learn how to do this, let's think about how images are actually represented. So, each image consists of pixels and each pixel has three colors. And so, each image is actually a long list of numbers specifying the colors of each pixel. So, when we're provided with our training data set, which would be a list of pictures and labels, The pictures are long lists of numbers which - in the literature - are sometimes called "vectors." Now, these vectors can be thought of as points in a very high-dimensional space. For example, if you have a thousand pixels and each pixel has three colors, that would be a point in 3000-dimensional space. Now, the machine learning algorithm, in some sense, actually thinks in this high-dimensional space. But, for us to simplify things conceptually, were going to be thinking about these images in a lower dimensional representation. Specifically, you can see how we can think of each of these images as a point in some kind of abstract, two-dimensional space, just for visualization and conceptualization purposes. Now, in this example of the images, you are provided with a training data set. As I've mentioned, all the images in a training data set are just points in a space. And here, I've also colored the points according to their label - "cat" or "dog." So, the red points are the cat images and the blue points are the dog images. And, this is what the training data set looks like geometrically. Now, a supervised learning algorithm does the following: it essentially tries to find a surface that separates points of one class - so the dog points - from points of the other class - cat points. And, it does this by adjusting knobs, which are called "parameters," so as to best separate, in this case, the red points from the blue points... okay? And, once it's found this surface, what it can do is it can now take an image it has never seen before, which is going to be also another point in this space, and it can say: "Does it lie on the dog side of the surface "or the cat side of the surface?" Okay? And, given which side it lies on, it makes a prediction about whether this image it has never seen before is a dog or a cat. Now, that's basically the visual way, or geometrical way, to think about supervised learning. And, in the next section, we'll talk about ways to quantify or think about how good this separating surface is. which is called - in the literature - the "generalization."