Machine Learning for the Average Person: What are the types of machine learning?

An analysis of the types of machine learning, written for the average person.

Imagem de capa

Machine Learning

At a high-level, machine learning is simply the study of teaching a computer program or algorithm how to progressively improve upon a set task that it is given. On the research-side of things, machine learning can be viewed through the lens of theoretical and mathematical modeling of how this process works. However, more practically it is the study of how to build applications that exhibit this iterative improvement. There are many ways to frame this idea, but largely there are three major recognized categories: supervised learning, unsupervised learning, and reinforcement learning.

In a world saturated by artificial intelligence, machine learning, and over-zealous talk about both, it is interesting to learn to understand and identify the types of machine learning we may encounter. For the average computer user, this can take the form of understanding the types of machine learning and how they may exhibit themselves in applications we use. And for the practitioners creating these applications, it’s essential to know the types of machine learning so that for any given task you may encounter, you can craft the proper learning environment and understand why what you did worked.

Supervised Learning

Supervised learning is the most popular paradigm for machine learning. It is the easiest to understand and the simplest to implement. It is very similar to teaching a child with the use of flash cards.

Given data in the form of examples with labels, we can feed a learning algorithm these example-label pairs one by one, allowing the algorithm to predict the label for each example, and giving it feedback as to whether it predicted the right answer or not. Over time, the algorithm will learn to approximate the exact nature of the relationship between examples and their labels. When fully-trained, the supervised learning algorithm will be able to observe a new, never-before-seen example and predict a good label for it.

Supervised learning is often described as task-oriented because of this. It is highly focused on a singular task, feeding more and more examples to the algorithm until it can accurately perform on that task. This is the learning type that you will most likely encounter, as it is exhibited in many of the following common applications:

Unsupervised Learning

Unsupervised learning is very much the opposite of supervised learning. It features no labels. Instead, our algorithm would be fed a lot of data and given the tools to understand the properties of the data. From there, it can learn to group, cluster, and/or organize the data in a way such that a human (or other intelligent algorithm) can come in and make sense of the newly organized data.

What makes unsupervised learning such an interesting area is that an overwhelming majority of data in this world is unlabeled. Having intelligent algorithms that can take our terabytes and terabytes of unlabeled data and make sense of it is a huge source of potential profit for many industries. That alone could help boost productivity in a number of fields.

For example, what if we had a large database of every research paper ever published and we had an unsupervised learning algorithms that knew how to group these in such a way so that you were always aware of the current progression within a particular domain of research. Now, you begin to start a research project yourself, hooking your work into this network that the algorithm can see. As you write your work up and take notes, the algorithm makes suggestions to you about related works, works you may wish to cite, and works that may even help you push that domain of research forward. With such a tool, your productivity can be extremely boosted.

Because unsupervised learning is based upon the data and its properties, we can say that unsupervised learning is data-driven. The outcomes from an unsupervised learning task are controlled by the data and the way its formatted. Some areas you might see unsupervised learning crop up are:

Reinforcement Learning

Reinforcement learning is fairly different when compared to supervised and unsupervised learning. Where we can easily see the relationship between supervised and unsupervised (the presence or absence of labels), the relationship to reinforcement learning is a bit murkier. Some people try to tie reinforcement learning closer to the two by describing it as a type of learning that relies on a time-dependent sequence of labels, however, my opinion is that that simply makes things more confusing.

I prefer to look at reinforcement learning as learning from mistakes. Place a reinforcement learning algorithm into any environment and it will make a lot of mistakes in the beginning. So long as we provide some sort of signal to the algorithm that associates good behaviors with a positive signal and bad behaviors with a negative one, we can reinforce our algorithm to prefer good behaviors over bad ones. Over time, our learning algorithm learns to make less mistakes than it used to.

Reinforcement learning is very behavior driven. It has influences from the fields of neuroscience and psychology. If you’ve heard of Pavlov’s dog, then you may already be familiar with the idea of reinforcing an agent, albeit a biological one.

However, to truly understand reinforcement learning, let’s break down a concrete example. Let’s look at teaching an agent to play the game Mario.

For any reinforcement learning problem, we need an agent and an environment as well as a way to connect the two through a feedback loop. To connect the agent to the environment, we give it a set of actions that it can take that affect the environment. To connect the environment to the agent, we have it continually issue two signals to the agent: an updated state and a reward (our reinforcement signal for behavior).

In the game of Mario, our agent is our learning algorithm and our environment is the game (most likely a specific level). Our agent has a set of actions. These will be our button states. Our updated state will be each game frame as time passes and our reward signal will be the change in score. So long as we connect all these components together, we will have set up a reinforcement learning scenario to play the game Mario.

Where is reinforcement learning in the real world?

Tying it All Together

Now that we’ve discussed the three different categories of machine learning, it’s important to note that a lot of times the lines between these types of learning blur. More than that, there are a lot of tasks that can easily be phrased as one type of learning and then transformed into another paradigm.

For instance, take a recommender system. We discussed it as an unsupervised learning task. It can also easily be rephrased as a supervised task. Given a bunch of users’ watch histories, predict whether a certain film should be recommended or not recommended. The reason for this is that in the end, all learning is learning. It’s simply how we phrase the problem statement. Certain problems are more easily phrased one way or another.

That also highlights another interesting idea. We can blend these types of learning, designing components of systems that learn one way or another, but integrate together in one larger algorithm.

Again, I think it is very important that we all understand a bit of machine learning, even if we will never create a machine learning system ourselves. Our world is drastically changing with machine learning becoming increasingly more prevalent in everything we use each day. Understanding even the fundamentals will help us to navigate this world, demystifying what can seem like a lofty concept and allowing us to better reason about the technology that we use.

If you have any questions, let me know! I am still learning a lot of things about the field of AI, myself, and discussions helps refine understanding.

If you enjoyed this post or found it helpful in any way, I would love you forever if you passed me along a dollar or two to help fund my machine learning education and research! Every dollar helps me get a little closer and I’m forever grateful.