Types of Machine Learning: Supervised, Unsupervised, Reinforcement & Semi-Supervised Learning

Machine Learning (ML) is a part of Artificial Intelligence (AI) that enables computers to learn from data, identify patterns and make decisions or predictions based on what they have learned.

📊 What is Data in Machine Learning?

Imagine you want to teach a child to identify different fruits. How would you do it?

🍎 You show the child different fruit pictures:

🍎
Apple
🍌
Banana
🍊
Orange
🥭
Mango
🍇
Grapes
🍍
Pineapple

👀 After seeing many fruit pictures, the child gradually learns to recognize different fruits independently.

💡 How does this relate to Machine Learning?

A Machine Learning model works in a similar way. Instead of showing pictures to a child, we provide examples (data) to a computer program so that it can learn from them.

🎯 Remember: Data is the information or examples we provide to a Machine Learning model so that it can learn, discover patterns and make predictions or decisions..
📌 Question
💡 Simple Explanation
📊 What is data?
Information or examples given to a computer for learning.
Examples of data:
📷 A photograph is data.
📝 A sentence is data.
🎤 A recorded voice is data.
🌡️ A temperature measurement is data.
📋 A collection of student records is data.
🌐 Where does data come from?
Cameras 📷, microphones 🎙️, sensors 🌡️, databases 🗄️, websites 🌐, mobile phones 📱 and other sources.
🗂️ What forms can data take?
🖼️ Images, 📝 text, 🎵 audio, 🎬 video, 🔢 numbers and 📏 measurements.
📁 What is a collection of data called?
A Dataset – an organized collection of related data.
🎯 Why is data important?
A Machine Learning model uses data to learn useful patterns and relationships.
💻 Where is data used?
Almost every ML application, from face recognition 👤 to weather prediction 🌦️.

1. Supervised Learning – Learning with Correct Answers

Imagine you want to teach a child to identify different fruits. You show pictures of fruits and tell the child their correct names.

🍎 Step 1: Provide pictures with their correct names

🍎
Apple
🍌
Banana
🍊
Orange
🥭
Mango

Each picture is associated with its correct name. These names are called Labels.

🧠 Step 2: Learning from examples (Training)
The child observes the fruits and gradually learns to recognize their characteristics, such as colour, shape and size.

💻 Step 3: The computer learns in a similar way
We provide many fruit pictures along with their correct names to a Machine Learning model. The model studies the examples and learns useful patterns that help it distinguish different fruits.

🔍 Step 4: Make a prediction

Now, show the trained model a new fruit picture that it has not seen before. Based on what it has learned, the model predicts the fruit’s name.

🍎
New picture
➜
ML Model
Trained model
➜
🍎
Apple
Prediction
🎯 Remember: In Supervised Learning, we train a computer using examples that already have correct answers (labels). The trained model uses what it has learned to predict answers for new data.

🌍 Where is Supervised Learning Used?

🍎 1. Fruit Sorter
Learns from pictures labelled with fruit names and identifies whether a new picture shows an apple, banana or orange.
📧 2. Email Spam Filter
Learns from emails labelled as Spam or Not Spam and predicts whether a new email is unwanted.
🏠 3. House Price Prediction
Learns from previous house details, such as area, location and number of rooms, along with their selling prices to estimate the price of another house.
🏥 4. Disease Detection
Learns from medical images labelled by experts and helps identify signs of particular diseases in new images.
🏦 5. Bank Fraud Detection
Learns from previously identified fraudulent and genuine transactions to predict whether a new transaction may be fraudulent.
🌦️ 6. Weather Forecasting
Learns from historical weather measurements, such as temperature, humidity and rainfall, to predict future weather conditions.
🚚 7. Delivery Time Estimates
Learns from previous delivery records, distances and traffic conditions to estimate how long a new delivery may take.

2. Unsupervised Learning – Learning Without Labels

Imagine an alien visiting Earth for the first time. The alien knows nothing about fruits. Someone gives it a basket containing different fruits, but does not tell it their names.

👽 Step 1: Observe the fruits

The alien looks at the fruits and notices their different colours, shapes and sizes.

🍎 🍌 🍊 🥭 🍇 🍍
🔍 Step 2: Find similarities

The alien observes that some fruits look similar. For example, some are round and red, while others are long and yellow.

🗂️ Step 3: Create groups

Based on these similarities, the alien independently arranges similar fruits into separate groups.

🍎 🍎
Group 1
🍌 🍌
Group 2
🍊 🍊
Group 3
💡 Step 4: Discover patterns

The alien has discovered similarities and created groups without knowing the actual names of the fruits.

💻 How does this relate to Machine Learning?

Unsupervised Learning works in a similar way. We provide a computer with data that has no predefined labels. The Machine Learning model analyses the data, identifies similarities and discovers hidden patterns or groups on its own.

🎯 Remember: Unsupervised Learning enables a computer to discover patterns and group similar data without being provided with predefined labels or correct answers.
📝 Did you know?

After the computer discovers different groups, a Data Scientist can examine them and assign meaningful names, such as Apples, Bananas and Oranges. However, these names were not provided to the computer during the original learning process.

3. Reinforcement Learning – Learning Through Rewards and Penalties

Imagine a robot trying to find its way through a maze to reach a destination ⭐. Initially, the robot does not know which path is correct. It tries different paths and takes different actions. When it moves in the correct direction, it receives a reward (+). When it takes a wrong turn or hits an obstacle, it receives a penalty (−). By repeatedly trying different actions and learning from this feedback, the robot gradually discovers a better path to reach its destination. Similarly, in Reinforcement Learning (RL), a computer program called an Agent interacts with its surroundings, called the Environment, performs Actions and receives rewards or penalties as feedback. Over time, the agent learns which actions are more useful for achieving its goal. This learning approach is used in applications such as 🎮 video game playing, 🤖 robot navigation, 🚦 traffic signal optimization, 🧹 robot vacuum cleaners and 🚗 self-driving research.

🎯 Remember: Reinforcement Learning enables a computer to learn through trial and error by interacting with an environment and receiving rewards or penalties for its actions.

4. Semi-Supervised Learning – Learning with Both Labelled and Unlabelled Data

Imagine an alien visiting Earth and trying to identify different fruits. This time, someone provides the alien with a few fruit pictures along with their correct names, such as Apple, Banana and Orange. These are called Labelled Data. The alien also receives many more fruit pictures without names. These are called Unlabelled Data. The alien uses the labelled examples to understand the fruits and studies the additional unnamed pictures to identify similarities, discover patterns and learn more about different fruits. Similarly, in Semi-Supervised Learning (SSL), a Machine Learning model learns using a small amount of labelled data together with a large amount of unlabelled data. This approach is useful when collecting large amounts of data is easy but labelling every example is difficult, expensive or time-consuming. It is used in applications such as 🖼️ photo classification, 🏥 medical image analysis, 🎤 speech recognition, 🌐 webpage classification and voice assistants.

🎯 Remember: Semi-Supervised Learning combines a small amount of labelled data with a large amount of unlabelled data to help a computer learn more effectively.
0

Gopal Krishna

Hey Engineers, welcome to the award-winning blog,Engineers Tutor. I'm Gopal Krishna. a professional engineer & blogger from Andhra Pradesh, India. Notes and Video Materials for Engineering in Electronics, Communications and Computer Science subjects are added. "A blog to support Electronics, Electrical communication and computer students".

Leave a Reply

Your email address will not be published. Required fields are marked *

Translate »