DEV Community

Cover image for Types of Machine Learning you must know!
Badhon Nandi
Badhon Nandi

Posted on

Types of Machine Learning you must know!

There are 4 Major types of Machine Learning

  1. Supervised Learning
    • Regression
    • Classification
  2. Unsupervised Learning
    • Clustering
    • Dimensionality Reduction
    • Anomaly Detection
    • Association
  3. Semi Supervised Learning
  4. Reinforcement Learning

Lets Explain one by one for a clear idea that what exactly they are about!

Supervised Learning

If we have a dataset with both input and output, our job is to understand the relationship between them. Then, we can use that understanding to predict the output for new input. This type of learning is called supervised machine learning.

Example: Lets take 1000 Students Data.

Image description

Now the ML model will create a mathematical link between the input and output. So, in the future, if I give it details about a new student, it will be able to tell me if that student is placed or not.

Image description

Now, the model can give the output on its own by using the pattern it learned from the previous input and output data. This is how supervised learning works.

Now if we talk about data types, there are 2 types of Data.

  • Numberical
    • Age
    • Weight
    • CGPA
    • IQ and etc.
  • Category
    • Gender
    • Nation
    • Place and etc.

Supervised Learning has 2 Parts:

  • Regression: If the output data is numerical then this is called regression.

Image description

  • Classification: Non-Numerical Datatypes are called classification.

Image description

this was all about supervised learning.

Unsupervised Learning

We only have input, with no output. So, making predictions is impossible because we don't know what to predict. So, what's the purpose of it?

Unsupervised Learning has 4 Parts:

  • Clustering
  • Dimensionality Reduction
  • Anomaly Detection
  • Association Rule Learning

Clustering
Clustering in unsupervised learning is when we group similar data points together without knowing the labels or categories beforehand. The goal is to find patterns or structures in the data on its own.

Image description

Imagine on the X-axis we have IQ and on the Y-axis we have CGPA. Clustering helps us see which students should be grouped together based on these factors. We can also use clustering for our own analysis.

For example, in my e-commerce website, I can figure out what type of customers I have and how to group them. And, clustering algorithms can group data with many dimensions that we can't see with our eyes.

This makes clustering very useful.

Dimensionality Reduction
In supervised learning, we often have many input columns, like in image or text data, sometimes over 1000. When there's too much data, the algorithm runs slower. After a certain point, adding more columns doesn't improve the result, so those extra columns are unnecessary. Removing them helps reduce the data size and makes the algorithm faster and more efficient. This process is called dimension reduction.

Image description
A simple example of this is called feature extraction. It's also well-known as the PCA algorithm (Principal Component Analysis).

We can not plot any data if we have 4 or more columns of data. Human brain can only draw till 3D coordinate system. So, here reducing the dimensionality from 1000 to 2/3D coordinate system helps us to plot those points. Now we can easily study and visualise those data. So, dimension reduction plays here an important role.

Anomaly Detection
It is a method to find patterns or data points that are unusual or different from the norm. It helps to spot things that don't fit the regular trend or pattern.

Image description

Association Rule Based Learning
It is a method used to find relationships between different items in data. It helps to understand which items are often bought or occur together.

Example: If you run a big store, you can use past sales data to see which products are often bought together. For example, if you find that when people buy milk, they often buy eggs too, you should keep milk and eggs next to each other in the store.

So sells will be improved. In this way we do data mining and then draw conclusion using Association Rule Based Machine Learning.

Semi-Supervised Learning

Semi-supervised learning is a method where a computer learns from both labeled data (with known answers) and unlabelled data (without known answers). That means partially Supervised and partially unsupervised learning.

When we add labels to data, it usually takes a lot of time because it's done manually by people.but human though I will only add 1-2 label and except that all the data/label get cover it self. This is the core-idea behind semi-sup learning.

Example: Google Photos.
We store many of our pictures in Google Photos. One day, Google Photos asked, "Who is this?" I said, "This is my brother." After that, Google Photos grouped all the pictures of my brother under the same label, making a cluster of them.

Reinforcement Learning

Reinforcement Learning is a type of machine learning where a computer learns to make decisions by trying different actions and getting rewards or penalties. It learns over time to choose actions that give the best rewards.

When I go for my university after leaving my own home, I don't know what should I do. So I make mistakes and learn from those.

Imagine teaching a dog to sit. Every time the dog sits when you say "sit", you give it a treat as a reward. If the dog doesn't sit, it doesn't get a treat. Over time, the dog learns that sitting when you say "sit" will give it a reward. This is like reinforcement learning, where the dog is learning through rewards (treats) to do the right action.

Self Driving cars can also be a great example of it.

These are all types of Machine Learning. Thank you for your time.

Top comments (0)