Next-Level AI Terminology

Machine Learning Simplified: A terminology guide Part 2 (With Examples)

Next-Level AI Terminology

In the first part of this guide, we discussed the basic terms you need to know to understand how AI works. In this article, we’ll build on those concepts and deepen your knowledge of AI. Don’t worry if you’ve tried to learn about AI before and couldn’t wrap your brain around it. Our aim is to simplify a very complex topic, so all our examples will be simple enough to explain to a 5-year-old.

What is an agent?

This is a common term used in reinforcement learning to refer to the entity that is making decisions and receiving rewards or punishments. It could be a robot, a computer program, or any other entity that is interacting with an environment and trying to learn a policy that maximizes its rewards.

What is supervised learning?

Supervised learning is a type of machine learning where we teach a computer program how to do a task by showing it examples of how to do it correctly. We do this by providing the program with a lot of examples of things we want it to recognize, like pictures of animals or numbers. Each example is labeled with the correct answer, so the program can learn to recognize patterns and make predictions about new examples it hasn’t seen before.

Example of supervised learning

Let’s say we want to teach a child how to recognize different animals. We would show the child lots of pictures of animals and tell them the names of each animal. For example, we might show them pictures of dogs, cats, birds, and elephants. We would tell the child “This is a dog”, “This is a cat”, “This is a bird”, and “This is an elephant”.

After the child has seen lots of pictures and learned the names of the animals, we would ask them to look at a new picture and tell us what animal it is. If the child correctly identifies the animal, we would praise them and give them positive feedback. If they make a mistake, we would gently correct them and show them more examples of that animal to help them learn.

Over time, the child would get better at recognizing different animals, just like a supervised machine learning model gets better at recognizing patterns in data. With enough practice, the child might even be able to recognize new animals they haven’t seen before, just like a machine learning model can make predictions about new data it hasn’t seen before.

What is unsupervised learning?

Unsupervised learning is a type of machine learning where the program is not given labeled examples, but instead must find patterns and structure in the data on its own.

Let’s say we want to teach a child about different shapes, but we don’t have any labeled examples to show them. Instead, we give the child a box of blocks in different shapes and colors, and let them explore and play with the blocks on their own.

As the child plays with the blocks, they might start to notice that some of them have similar shapes or colors. They might group the blocks together based on these similarities, even if we haven’t told them what each block is called.

In unsupervised learning, a machine learning model would do something similar – it would analyze the data and try to find patterns and clusters on its own, without being told what each data point represents. For example, an unsupervised machine learning model might analyze customer shopping data and group customers together based on their purchasing habits, even if we haven’t labeled each customer with a specific category or segment.

Reinforcement learning

Reinforcement learning is a type of machine learning where an “agent” learns to make decisions by interacting with an environment and receiving feedback in the form of rewards or punishments.

Example of reinforcement learning

For example, imagine we want to train a robot to navigate a maze. The robot starts at the entrance of the maze and must find its way to the end by moving through the maze one step at a time. Each time the robot takes a step, it receives feedback in the form of a reward or punishment. If the robot takes a step that gets it closer to the end of the maze, it receives a positive reward. If the robot takes a step that gets it further away from the end, it receives a negative reward. The goal of the robot is to learn a policy – a set of rules or actions – that maximizes its total reward over time.

As the robot explores the maze and receives feedback, it updates its policy based on the rewards it receives. For example, if the robot takes a step that leads it to a dead end and receives a negative reward, it will update its policy to avoid taking that step in the future. Over time, the robot will learn a policy that allows it to navigate the maze efficiently and reach the end with a high total reward.

Reinforcement learning is used in a variety of applications, from training robots to play games like chess and Go, to optimizing energy usage in buildings and factories.

How do engineers reward and punish?

In reinforcement learning, engineers reward and punish a machine or agent by defining a reward function that specifies the rewards or penalties that the machine receives for different actions or behaviors.

The reward function is a way to communicate to the machine what actions are desirable and what actions are not. For example, in the robot maze example I gave earlier, the robot received a positive reward for taking a step that brought it closer to the end of the maze, and a negative reward for taking a step that brought it further away.

The specific way that engineers define the reward function depends on the problem and the behavior they want to encourage. In some cases, the reward function might be very simple – for example, a chess-playing robot might receive a positive reward for winning the game and a negative reward for losing. In other cases, the reward function might be more complex, taking into account multiple objectives or constraints.

It’s worth noting that in reinforcement learning, the machine learns from the feedback it receives and updates its behavior over time. This means that the reward function can be adjusted as needed to encourage different behaviors or outcomes. For example, if the robot in the maze example was consistently taking too long to reach the end of the maze, we could adjust the reward function to give a higher reward for faster completion times.

What is Q-Learning?

Q-learning is an algorithm used in reinforcement learning that helps an agent (like a robot) learn how to make the best decisions in a given situation by estimating the expected rewards for each possible action in each possible state.

During training, the agent explores the environment and receives rewards based on its actions. It uses this experience to update a table called the Q-table, which stores the expected reward for each action in each state. The Q-table is updated using a formula that combines the immediate reward received for taking an action with the expected reward for the next state, and it is weighted by a learning rate and a discount factor.

Once the training is complete, the agent can use the Q-table to make decisions in real time by selecting the action with the highest expected reward in each state. This way, the agent can choose the actions that are most likely to lead to a positive outcome.

Example of Q-Learning

A Q-table is like a cheat sheet for a robot playing a game. It helps the robot decide what to do next by telling it which actions are best for each situation it might encounter during the game. The robot looks at the Q-table and chooses the action with the highest reward, so it can make the best decision and do well in the game.

What is overfitting?

Overfitting is a common problem in machine learning where a model is trained too well on a specific set of data that it becomes too specialized to that data and performs poorly on new, unseen data.

Example of overfitting

You have a friend who is trying to memorize a list of words for a spelling bee. Your friend studies the list of words over and over again until they can spell them perfectly. However, when they go to the spelling bee, they are given a new list of words that they haven’t seen before, and they struggle to spell them correctly because they only memorized the original list. This is similar to overfitting – your friend “overlearned” the original list of words and didn’t learn how to spell other words that weren’t in the list.

In the same way, a machine learning model can become too specialized to the training data it was given and not perform well on new data it hasn’t seen before. This is a problem because the goal of machine learning is to create a model that can generalize to new data and make accurate predictions, not just memorize the training data.

What is underfitting?

Underfitting is another common problem in machine learning where a model is too simple and doesn’t capture all the important patterns and relationships in the data, resulting in poor performance on both the training and test data. This can happen when the model is too limited or when the training data is noisy or not representative of the overall population. As a result, the model doesn’t perform well on both the training and test data, and its predictions are inaccurate.

Example of underfitting

You have a friend who is learning how to draw a cat. However, instead of practicing drawing a realistic cat, your friend only draws a simple stick figure cat. As a result, when your friend tries to draw more detailed and realistic cats, they struggle because they never learned how to capture the important details.

What are optimization algorithms?

Optimization algorithms are used to find the best values for certain variables or parameters. For example, if you have a mathematical equation with some variables in it, an optimization algorithm can help you find the values of those variables that maximizes/minimizes the value of the function.

The optimization algorithm is what you use to adjust the model parameters to minimize the cost function. The algorithm is like a recipe that tells you how to adjust the parameters to get a lower score on the game. There are many different optimization algorithms, like gradient descent, which is a popular one for minimizing cost functions in machine learning.

Example of an optimization algorithm:

You and your (really fun) friends are hanging out again, trying to find the highest point on a hill by taking steps in different directions. To do this, you need to figure out which direction to step in to get closer to the top of the hill.

One simple way to do this is called the “uphill” method. You start at the bottom of the hill and take a small step in the direction that leads to a higher point. Then, you repeat this process, taking small steps in the direction that leads to a higher point each time.

This is kind of like what an optimization algorithm does. Instead of a hill, it looks for the best solution to a problem by taking small steps in different directions and checking if the solution gets better or worse. If it gets better, it keeps going in that direction. If it gets worse, it tries a different direction.

One example of an optimization algorithm is called “gradient descent.” Imagine you’re trying to find the lowest point on a hill instead of the highest point. You start at the top of the hill and take small steps downhill in the direction that leads to lower points. By doing this over and over again, you eventually find the lowest point on the hill.

In a similar way, gradient descent is an algorithm that tries to find the lowest point (or minimum) of a cost function by taking small steps in the direction that leads to lower cost. By doing this over and over again, it eventually finds the set of parameter values that produce the lowest possible cost for a given problem.

_____

Machine learning is a powerful technology that has the potential to transform industries and improve our daily lives. At Quant, we specialize in developing custom machine learning software for businesses and organizations across a variety of industries. Our team of experts is committed to creating the most accurate and reliable machine learning models possible, using the latest technologies and techniques. If you’re interested in incorporating machine learning into your business, please don’t hesitate to contact us. We would be happy to discuss your specific needs and create a tailored solution that meets your goals.

Share this Article