 Have you ever noticed the freakishly good YouTube recommendations that show you exactly what you want to watch, or at least the pretty cool Snapchat filters? These are both powered by machine learning. While Snapchat filters might not profoundly change the world, machine learning also allows for self-driving cars, trucks, and buses, which could make driving far safer, but which could also take away many jobs. Even facial recognition to technology behind Snapchat filters has enabled a social credit system in China, which basically involves tracking people 24-7 to determine if they are behaving well. Making good decisions about how machine learning and more broadly artificial intelligence should be regulated to prevent their use for nefarious purposes begins with a basic understanding of how they work. artificial intelligence involves creating programs that can perform tasks that normally required human intelligence. Machine learning is a type of artificial intelligence, and as the name implies, it involves creating programs that can learn without step-by-step instructions from humans. Machine learning is itself a broad term that encompasses many different algorithms. To grasp machine learning at a deep level, it is helpful to begin with an understanding of the types of machine learning. They are the following, supervised learning, unsupervised learning, and reinforcement learning. See if you can take a guess at what these are just based on their names. Supervised learning is where a machine learns with the help of labels, which are the correct answers. Think of it as learning through being corrected by a teacher whenever you make mistakes. A supervised learning algorithm could predict a number like SAT scores based on GPA or a class like shoe brand from a picture of a shoe. The real magic behind supervised learning is training. Training is where we take a model that initially makes terrible predictions and gradually improve it by correcting it and making small adjustments to its internal representations or how it gets from input to output. After all, at school, the real bulk of learning often happens by making mistakes and being corrected. One key characteristic of supervised machine learning is that it requires a lot of data for training. So for example, to make a good supervised machine learning model, you would likely need a lot of pictures of shoes with labels identifying the brand. This data can be quite expensive to acquire and for this reason, one of the biggest challenges in supervised machine learning is simply getting enough high quality labeled data. In terms of the teacher analogy, always having a teacher or tutor correcting your mistakes can be quite costly, but what if there was a way to have machines learn without having to provide them with labeled training data? Meet unsupervised learning. In unsupervised learning, machines learn without training labels. Unsupervised learning often involves clustering similar data. Can you imagine cases when humans might not know what or how many classes there are? For example, if we need to classify teachers based on the amount of homework that they give and on the difficulty of their tests, we might not know how many kinds of teachers there are beforehand. So we could use a form of unsupervised learning to test out different clustering of teachers with different numbers of groups. K-means clustering is one of the more popular algorithms used for clustering. Our teacher dataset has two characteristics, the average amount of homework per night in hours and the difficulty of tests, which we can quantify with average test grades. Perhaps on the x-axis, we have the hours of homework per night and on the y-axis, we have the average test grade. First one chooses K, the number of clusters, and thus centroids. Centroids are essentially the mean position of a certain number of data points. At first the centroids will be randomly positioned, so they technically aren't even centroids. Then the algorithm assigns each data point to the closest centroid. Next, the centroids are recalculated for all the data points assigned to them. These two steps are repeated until there is no more change. So the data points are assigned to the closest centroids, the centroids are recalculated, and this is repeated. You can play around with the K-means clustering algorithm on this website. This algorithm is quite elegant. The beauty is that we can easily and cheaply test a bunch of different K-values, which again are the number of clusters. Finally, reinforcement learning is learning through feedback from an AI's behavior. For reinforcement learning, I like to think of an AI learning to play a game like Super Mario Bros. Essentially, you reward the AI for moving to the right, and eventually for completing the level. The AI will try a bunch of things, and at first it will be terrible. However, by rewarding it for actions that lead Mario to get further to the right, and by adjusting it whenever it makes mistakes, the AI gradually gets better. Reinforcement learning can even be used to teach a robot how to walk, by rewarding it for standing and moving. Hopefully you now understand the three types of machine learning at a high level. In the next video, we will take a closer look at supervised machine learning models and their internal representations.