Machine Learning paradigms for beginners
Tags: machinelearning, ai, rl
Published: 2023-01-09 17:21:00

These days, we are hearing a lot about Machine Learning, chatGPT, AI, Robots, etc. We should not skip the trends, specifically in technology.
But what if we want to classify the general topics and methods of Machine Learning to understand better what is going on?

Imagine you want to tell new things to a computer, and that computer learns those things and new experiences from you. How many ways do we have? Which methods and paradigms are acceptable?

Currently, there are 3 main paradigms:

- Supervised Learning
- Unsupervised Learning
- Reinforcement Learning


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mh34dz7wlus3qg3o1zih.png)

Let's start with examples that make these categories more understandable.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hiq8l8jp9oivl6rsjmbg.png)

---

Machine Learning paradigms for beginners
These days, we are hearing a lot about Machine Learning, chatGPT, AI, Robots, etc. We should not skip the trends, specifically in technology.
But what if we want to classify the general topics and methods of Machine Learning to understand better what is going on?
Imagine you want to tell new things to a computer, and that computer learns those things and new experiences from you. How many ways do we have? Which methods and paradigms are acceptable?

---

In the Supervised Learning paradigm, We have a supervisor. Our data is labeled by someone else. For instance, you are a student and your teacher learns you new things. If you try to memorize exactly what your teacher said, you will fail, and if you don't learn, you will fail too. (It's the example of overfitting and underfitting in model training). You have to really LEARN!
The model will learn from its labeled inputs and will learn it's a dog picture, it's a cat, it's a dog, it's a cat … and at the end, you can evaluate your trained model by providing a picture to predict that it is an image of cat or dog. Cat and dog are our labels here.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jj3psa8r0kokvu563k0j.png)


In the Unsupervised Learning paradigm, there is no label! Your data do not have labels. It's like a student that is trying to self-study by himself without a teacher or supervisor. The student tries to find patterns and relationships by himself.



![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/iidva45ssideypzjbp86.png)


Reinforcement Learning is the third Machine learning paradigm.

It is inspired by biological learning systems.
Imagine you are stuck in a maze! What is your strategy to escape from it?

One of the best strategies is Trial-And-Error.
You need to brute force the maze, But wait, Reinforcement learning is more interesting!
Another example. You can learn your pet what is bad and what is good by punishing or giving your animal a reward.
In Reinforcement Learning, there is an agent (your pet), there is an environment (you), and a reward signal (Only you can give rewards).

When you feed your dog after he successfully fetched the wood, you are indirectly telling your dog it's a good move. But when your dog is trying to bother your grandma, and you yell at your dog, he will receive a signal that this move was wrong. With the trial and error method, this dog (Agent) is trying to be a good pet (Maximizing his rewards) for you (his environment).