Once you get into artificial intelligence and machine learning, there’s no way to avoid three terms:
- Supervised learning
- Unsupervised learning
- Reinforcement learning
These are the three most common ways of how machines can learn, therefore understanding their meaning and differences is important to know when getting started with artificial intelligence. If you are new to the field, we recommend that you first read about the different disciplines of artificial intelligence.
Note: There are also other ways for machines to learn but this would break the format. Also, it is not necessary when starting out. Think of it like this: When you need them, you will know.
Prefer to consume this content in audio format? Check out our video below!
Machine learning in the context of AI
Machine learning is a subset of overall artificial intelligence and the general term for when computers learn from data. It describes the intersect of computer science and statistics where algorithms are used to perform a specific task without being explicitly programmed; instead, they recognize patterns in the data and make predictions once new data arrives. Eventually, it is the way of learning that is most often used to categorize machine learning in three broad categories: supervised learning, unsupervised learning and reinforcement learning.
Three forms of Machine Learning
Supervised learning makes use of a known relationship between input and output. This is where labeled data comes into play: The goal of the algorithm is to learn from “correct answers” in the training data and use the insights to make predictions when given new input data.
There are two main tasks of supervised learning:
- Regression: Predict a continuous numerical value. Example: "How long will it take you to drive home from work given distance, traffic, time and day of the week?"
- Classification: Assign a label. Example: "Is this a picture of a car or a truck?"
To see how supervised algorithms work, let’s look at a simple example for image classification: Imagine you were given a set of images each of which either depicts a car or a truck. Instead of labeling the pictures all on your own, you want to build an algorithm which does the work for you.
- Create a set of labeled data, i.e. "correct" data with both input and output information: pictures of cars and trucks, each with the corresponding class names.
- Feed the model with that labeled training dataset: The machine learning algorithm begins to "see" patterns between input (image) and output (class). The algorithm might learn complex relationships as "the distance between wheels is larger for trucks" – note that in reality it is usually hard to interpret algorithms in such a way.
- Test the model on unseen data and measure how accurately it predicts the class.
The term supervised learning stems from the fact that, in the beginning, we gave the algorithm a data set in which the “correct answers” were given. This is the key difference to unsupervised learning.
While supervised learning requires input-output pairs (or labeled data) to learn, unsupervised learning algorithms use input data only (unlabeled data). Albeit a bit less intuitive, this learning method is suitable for problems where we have little or no idea what our results should look like. The goal is to gain knowledge and find structure in the data.
Take, for instance, a list of a company’s customers (input data). The CEO of a company wishes to better understand his customers but does not yet know what kind of customer segments exist (no output data). Through unsupervised learning, the algorithm would automatically discover and group customers into different customer segments.
The difference between supervised and unsupervised becomes evident in the visualization above. While for supervised learning we already know that there are two categories (blue circle and red cross) we do not in unsupervised learning. Instead, it is the task of unsupervised learning to discover these two clusters.
In reinforcement learning, the algorithm (in this context also often referred to as agent) learns through trial-and-error using feedback to its own actions. Rewards and punishment operate as signals for desired and undesired behavior.
The best context to understand reinforcement learning is in a game with a clear objective and a point system. Imagine the following game set-up, in which a mouse (the agent) tries to maximize its rewards in a maze.
At the end of the maze waits the final reward of +1,000 points: cheese. Along the way there are lesser rewards, in form of water, worth +50 points as well as electric shocks resulting in -100 points. Through rewards and punishment the mouse gets positive and negative feedback to its behavior and learns from its own experience.
You might ask: How does reinforcement learning compare to supervised and unsupervised learning?
Similar to supervised learning, the algorithm maps input and output. The difference is that there is no labeled training data: While supervised learning algorithms need to be fed with “correct answers” (i.e. labeled data) in the beginning, reinforcement learning uses rewards and punishment as signals for desired and undesired behavior. If you are mathematically inclined, reinforcement learning is maximizing its reward function whereas the others are minimizing the loss (i.e. wrong predictions).
Compared to unsupervised learning, reinforcement learning is different in terms of goals. While the goal in unsupervised learning is to find clusters in your data (e.g. customer segments), reinforcement learning seeks to find a suitable action model that maximizes the total cumulative reward of the agent.
Reinforcement learning is widely used in building AI for playing computer games. A prominent example is Google’s computer program AlphaGo Zero. It received massive media attention by defeating the South Korean world champion in the ancient Chinese game of Go – a feat that used to be considered beyond the reach of even the most sophisticated computer programs.
Getting started with machine learning
So, now you know how machines learn—how do you start implementing it in your business?
First thing’s first, you’ll need to choose an AI solution—unless you want to hire a team of developers. Look out for a solution that’s easy to implement and use, provides accurate results, and offers ample support.
Once you’ve found a solution that meets your needs, you’re ready to get started. These are the steps you’ll need to take to create an effective AI model and workflow:
- Define your process: the first step to implementing AI in your business is to understand how it can help you perform better. Consider your business and how AI can help you, whether it’s with customer support or general business operations.
- Gather your data: once you’ve decided on your use case, it’s time to gather and upload your data. This can be data you’ve gathered through business operations, or data you’ve acquired from elsewhere—such as an online dataset provider. Upload your data to the AI tool and ensure it’s labeled, whether this is before upload or manually following upload. The more labeled data you upload, the more accurate the AI model’s predictions will be.
- Create your model: next up, you need to train your model using the data you’ve uploaded. This can take a couple of minutes, and the accuracy of your model depends on the quality of your data and labels.
- Add human review: some tools enable you to improve the accuracy of AI predictions with human review. Human review is exactly what it sounds like—a human steps in to manually review a percentage of the model’s predictions and improve accuracy.
- Build an AI workflow: once you’ve trained your AI model, you want to define your input and output to create an AI workflow. Your input is where the data will come from, and your output is the result you want to get from data processing.
Getting started is simple when you’ve got the right tools and guidance—good thing you’re in the right place for both.
Levity’s no-code AI solution makes implementing AI in your business quick and easy. Whether you’re trying to improve customer support or develop your product—Levity can help you develop flows that deliver accurate results exactly where you need them.
To briefly sum up the different types of machine learning:
- Machine learning is the field of study that gives computers the ability to learn without being explicitly programmed.
- Supervised learning, unsupervised learning and reinforcement learning are the three broad categories of machine learning.
- In supervised learning, we already know that there is a relationship between input and output and, therefore, feed the algorithm with labeled data. The goal is to make predictions when given new input data.
- In unsupervised learning, we don't necessarily know the relationships between variables in the dataset. The goal of the algorithm is to gain knowledge and find structure.
- In reinforcement learning, the algorithm learns through trial-and-error in an interactive environment using feedback from its own actions. The goal of maximizing long-term rewards drives the decision-making process.
Where to go from here? If you want to continue learning about artificial intelligence check out some of our other posts on this matter - we also wrote an article on how this can be done without programming.