In the previous post: Understand Machine Learning, I already presented to you the motivation and the formal definition of Machine Learning. Today we will discuss about its different types.
Generally, Machine Learning has three most important types, including: Supervised Learning, Unsupervised Learning, and Reinforcement Learning. Briefly, Supervised Learning is learning from labeled data, Unsupervised Learning is learning from unlabeled data, and Reinforcement Learning is learning from feedback. We are going to detail these learning types in the following parts.
By definition, this is the task of learning a function that maps an input to an output based on a set of known input-output mappings, as illustrated by the following figure. Given an input, the learned function will predict the output based on the mapping history in which each input is already given an output.
And this set of known input-output mappings is also called the training set, which can be considered as knowledge, or useful experiences for the mapping function. Because for each input in the training set, we already know its output, so this kind of training data is also called labeled data.
In fact, Supervised learning is often used to solve two major problems: Regression and Classification.
Regression is the task of mapping input variables to a continuous function, that means: the output values are continuous. For example, when we predict stock price or forecast sales, the output may be $1000, $2000, or $1 million etc. i.e. a continuous value.
In contrast, Classification is the task of mapping input variables into discrete categories, i.e. the output values are discrete. For example, in cancer detection problem, the output has only two possible values: yes or no. Or in object recognition, the output is the name of the recognized object, which are discrete categories.
Unsupervised Learning is the task of finding inferences from a data set containing data that has no label, that is, learning without supervision. That may sound abstract, but let’s look at the following figure to get the idea.
Imagine that you have a data set in which your data is distributed like the figure on the left. In Unsupervised Learning, we have to learn the structure of data to get some valuable information, for example if we want to cluster these data into separated groups, intuitively we can see that these data can divided into three groups as in the figure on the right. This is the idea of clustering which is a very typical task in Unsupervised Learning.
So, in unsupervised learning, the data has no labeled, and we have to find inferences or undiscovered patterns in the data set. Indeed, Unsupervised Learning has many important applications. For instances, it can be used in customer segmentation in order to create different marketing strategies. Or in fraud detection, it can be used to detect anomalies in transactions. In this case, anomalies are data points that are very different from the rest, they may be abnormal behaviors that need giving more attentions. Unsupervised learning can also be used in grouping gene, or in image segmentation, and many other real-life applications.
This is the ability of intelligent agents to reach a goal in a given environment by taking actions that maximize a cumulative reward. May be this definition is not too easy to understand at the first glance, but you may be seeing many examples of Reinforcement Learning in real life. For example, suppose that you are training your cute dog by asking it to bring back an object that you just threw away. By giving the dog some rewards e.g. a food or a toy each time it accomplishes the mission, your dog understands that it needs to run and bring back the object as quickly as possible to receive more rewards. That’s a real life example of Reinforcement learning!
Let’s have a look at another example. The robot in the figure below must go through a maze with the following rules: It can only take one step at each move. If it hits a wall, one point will be taken from its cumulative reward. If it goes to an empty cell, then it will receive zero point. And if it reaches the “exit” point, it will have 100 points. So, with these requirements, how should the robot use the reward at each cell to go through the maze? In this situation, we need an iterative learning process to remember the bad paths and the good paths, from that the robot can choose the path on which it gets the maximum reward.
In Reinforcement Learning, one of the most common methods is Q-Learning algorithm. Nowadays, Reinforcement Learning also has many applications: it can be used in advertising, robotics, healthcare, or in gaming, etc.
To sum up, I would like to give you a brief summary about the three types of Machine learning in the following table.
As the matter of fact, the very first lesson in Supervised Learning is often Linear Regression. Check this post to get understand one of the most fundamental Machine Learning approaches: Linear Regression.
Thank you for reading & sharing.