DEV Community

Cover image for Types Of Machine Learning Algorithms
likhitha manikonda
likhitha manikonda

Posted on

Types Of Machine Learning Algorithms

Machine learning algorithms are usually grouped into three main categories:
🧠 1. Supervised Learning:
🕵️ 2. Unsupervised Learning:
🎮 3. Reinforcement Learning:

Imagine you're teaching a puppy new tricks. There are a few ways you can do it:

  1. "Show me how it's done!" Learning (Supervised Learning): This is like showing the puppy exactly what to do and telling it "Good job!" when it gets it right. You give the computer lots of examples where you already know the right answers, and it learns to copy them. For example, showing it lots of pictures of cats and dogs, and telling it which is which.

  2. "Figure it out yourself!" Learning (Unsupervised Learning): This is like putting a bunch of different toys in front of the puppy and letting it sort them into groups all by itself. The computer gets lots of information but no answers. It has to look for patterns and group similar things together. Like sorting all your socks by color!

  3. "Try, try again!" Learning (Reinforcement Learning): This is like training a puppy to do a trick by giving it a treat when it's close to doing it right, and maybe a gentle "no" if it does something wrong. The computer learns by trying things out and getting "rewards" (like treats!) when it does well, and "penalties" when it messes up. It's like a game where the computer tries to get the highest score!

There are even other cool ways, like mixing these methods together! It's all about making computers smarter so they can help us do amazing things. ✨

Lets learn each :)

🧠 1. Supervised Learning: You train the model using labeled data (you know the correct answers).
In supervised learning, the algorithm is trained on data that already has answers (labels). It learns patterns to predict future outcomes.

Supervised Learning will have dependent and independent features
For example if we have age and weight as data age is independent feature and weight is dependent feature which is dependent on age.

a) Regression - when we have a continuous variable then its a regression problem
(o/p variable) is weight →continuous variable

age weight
20 58
55 69
58 78

b) Classification - Fixed number of categories then its a classification
If we have two categories to classify its binary classification, if its more than then its a multi class classification.

No_of_hours No_of_play_hours No_of_sleep_hours - Features

Features are the inputs — the variables or columns you use to make predictions. For example, in a housing dataset, features might include)
result - label

From below we can classify the students as pass/fail so its binary classification.

For example if take below dataset as example in the result the classifiation is like active,tied,energetic then its a multiclass classification.

🕵️ 2. Unsupervised Learning: You train the model using unlabeled data (no correct answers provided).No Dependent Variable
In unsupervised learning, the algorithm finds patterns or groups in data without knowing the answers ahead of time.

salary age
230000 23
580000 33
40000 60

a) Clustering- Customer segmentation - Grouping people as clusters -each cluster specifies some group (example as rich people,middle class people) based on salary - Used for Ad Marketing

Ex: If we do this then we can sell particular product to particular cluster of people like rich,middle class by classifying into clusters.

b) Dimensionality Reduction - Reducing data

🎮 3. Reinforcement Learning: Models learn by trial and error, receiving rewards or penalties (ex: game-playing bots).

🧪 Bonus: Other Categories
Semi-Supervised Learning: Mix of labeled and unlabeled data
Self-Supervised Learning: Learns structure from data itself (used in modern AI models)
Ensemble Methods: Combine multiple models (e.g., Random Forest, Gradient Boosting)

Semi-Supervised Learning and Reinforcement Learning

Semi-Supervised Learning: A mix of known and unknown
Imagine you’re teaching a class, but only a few students have labeled name tags. You use those name tags to guess the names of the rest.

🔧 Where it’s used:
Speech recognition: Only some audio clips are labeled with words.
Medical imaging: A few scans are labeled with diseases, most are not.
Web content classification: Some pages are tagged, most aren’t.

🧠 Why it’s useful:
Saves time and cost — labeling data is expensive.
Learns from both labeled and unlabeled data.

🎮 Reinforcement Learning: : Learn by trial and error
Imagine training a dog. You give it treats when it does something right. Over time, it learns what actions lead to rewards.

🔧 Where it’s used:
Game playing: AI learns to play chess or video games.
Robotics: Robots learn to walk or pick up objects.
Self-driving cars: Learn to navigate safely by getting feedback from the environment.
Stock trading bots: Learn which trades lead to profit.

🧠 How it works:
The AI is an agent.
It interacts with an environment.
It gets rewards or penalties based on actions.
It learns a strategy to maximize rewards over time.


🧠 If this post sparked a neuron or two, don’t stop now — the next one might just light up the whole circuit! ⚡ https://dev.to/codeneuron/classification-of-machine-learning-algorithms-2f0l

Top comments (0)