Some Types of Learning
06 Dec 2024
GDRLIn this post, we want to find out what supervised, unsupervised, and reinforcement learning are, as they are essential branches of machine learning.
As you have some knowledge about computers, you know that we write algorithms as descriptions of what we want a computer to do for us. Writing a good description for a computer is a tough task. You need to know the language of the computer and some other structures to do it well. Another way is to change our perspective. By creating a way in which computers can make the algorithms themselves, we achieve what is called machine learning. So, how do we do that? Up to now, there are three main ways: supervised, unsupervised, and reinforcement learning.
Imagine that you have a child, and you want to teach him or her to walk. How do you choose the way of teaching? You could teach the child in a classroom, like in universities, but before that, the child would need to know a natural language at least! See? Learning is a complicated process, even for the most intelligent creature in the world (according to some systems of belief). To make this complicated process simpler, scientists have tried to define terms like the ones italicized. Let’s understand what learning is by exploring these terms further.
Supervised Learning
Supervised learning (SL) is the task of learning from labeled data.
– Grokking Deep Reinforcement Learning Book
One way of teaching your children to learn walking is by showing them how to walk! If we trust their brain, we simply walk in front of them and tell them, “This is walking.” We label this action. If something else happens, we tell them, “You are not walking; you are doing something else.” Until we tell them what is walking and what is not, we are supervising them.
To avoid further metaphorical explanations, in supervised learning, you bring two things together:
-
Labeled Data: Some form of data that has been digitized, such as images, text, sound, etc., along with related metadata or labels that indicate how we, as humans, interpret this data.
-
Model: This is our child with the capacity for learning. In computer science, the method that has demonstrated this capability more than others is Deep Learning, which we will explore later.
After providing some education and training to the model, we expect it to correctly label unseen data.
Unsupervised Learning
Unsupervised learning (UL) is the task of learning from unlabeled data.
– Grokking Deep Reinforcement Learning Book
Another way to teach is to rely more on the child’s brain. As you know, the child can recognize differences between actions, so you don’t even need to label them. You can let the child learn through the differences between actions. If we have just two things, $A$ and $B$, if something is not $A$, then it must be $B$. Logical, right? But you only do this when you are sure the child understands the logic.
Again, in unsupervised learning you need two things:
-
Unlabeled Data: Some amount of data with common features that can be used to separate the data into parts.
-
Model: A learning method with a logic for separating data.
In this type of learning, the quality of the results depends almost entirely on the logic. Better logic leads to better learning.
Reinforcement Learning
Reinforcement learning (RL) is the task of learning through trial and error.
– Grokking Deep Reinforcement Learning Book
Can we improve our understanding of learning? By being more aware of intelligence, we can change our perspective on learning. Guide your children by giving them rewards or punishments. There is no need to label things for them to learn. Create a good environment and let them explore!
In reinforcement learning, there are two other important things to consider:
-
Agent: The entity that has the capability to learn.
-
Enviornment: The framework that can be explored by the agent.
Learning in this manner happens through a circular process. The agent performs an action, the environment responds with a reaction, and the agent learns something from the reaction, repeating the cycle. At the end of the process, we expect a fully skilled agent capable of interacting with the environment in the best possible way.
This article is a very simplified version of what it could be. I hope it gives you some initial ideas about the three essential learning methods in machine learning. There will be more in the near future. For further reading, I recommend the Grokking Deep Reinforcement Learning book.