Basics of Machine Learning
This article will give you a vis-a-vis to the world of Machine Learning in general!
So, what is Machine Learning and where is it used in real life?
Let me start with a very familiar example. It's Google Search!
Have you seen the Documentary The Social Dilemma in Netflix? Go watch it!
The documentary tells you the story about how big tech companies collect data from you and use it to show you advertisements. But this is just the tip of Ice Berg. They predict your next move! When you go to google and type "climate change is" you will see the results are different for different people across the world.
Your Twitter, LinkedIn and Instagram feed are different from mine! And that's okay because you and I may not like the same thing. Well, but how did Instagram or LinkedIn learn that? Well, that's Machine Learning! They learnt from your previous actions and the accounts you followed, the number of times you chatted with someone or the amount of time you took to look in a certain post. Everything is tracked and recorded!
What is Machine Learning made off??
Well Machine Learning, as the name suggests, is a computer program that is made up of a number of algorithms which predict the next move based on the previous data given to it.
Let's start with an example!
Suppose somehow, I built a Machine Learning Model to predict Cats. The model is 70% accurate i.e. If I show the model a picture of a cat, it will be able to tell me with 70% accuracy whether the image is of a cat or not! So, I train the model a bit more and it learns from the data I feed to it. Now the model is 99% accurate and now it can detect a cat from any image. This is just a small example of how ML models work.
In real life, ML models have a variety of use cases. It can be used to predict new chemical combinations for new medicines, stock prices, you next search in google, or the next post you're going to see in Instagram
Now let's talk about types of Machine Learning
They are generally of 3 types...
- Supervised Learning
- Unsupervised Learning
- Reinforcement Learning
Well, there can be a lot of types that can be mentioned like Semi-Supervised or Inductive Learning, but that requires a separate blog to talk about, hence I am not mentioning them here.
So, coming up with Supervised Learning! What is it?
So Supervised Learning as the name suggests is Machine Learning under supervision. Which means the ML model is trained under labelled data which contains correct inputs and its desired output. The ML model learns over time to predict the correct results. Remember, it knows what is correct only on the basis of the fact that we teach them what is right and what is wrong. If I teach slapping is Good and Loving is Bad, it will learn that! The ML model will later classify slapping as a good act! And that's Supervised Learning
Example of Supervised Learning:
Your Outlook or Gmail account that detects and puts certain emails into the spam folder is an example of Supervised Learning. It has been trained previously and it further learns from the Spam emails that get filtered out. It's a continuous process.
Next is Unsupervised Learning
So Unsupervised Learning is based on Machine Learning Algorithms that clusters data sets which are generally unlabeled and hence this does not require any human intervention, hence "Unsupervised Machine Learning.
Let's Take an Example
If I give my ML model some images of a cat, and on the basis of the algorithm in it, the model predicts that the cat has a tail, 4 legs and 2 eyes. And they discovered it without any human intervention!
Finally, we have Reinforcement Learning
RL is an algorithm to train ML models to make a sequence of decisions. The whole process is generally based on a reward-based system where we give a reward to if it takes the right decision and we punish it if they take some wrong decision.
Example:
This is a very famous example of RL where we teach a rocket to land perfectly. It gets a reward for every small step it performs and the final goal is to reach maximum reward and land the rocket in the desired position.