Supervised Learning - Teaching with Answers
There are three primary AI training methods:
-
Supervised Learning
: Learning with data that includes the correct answers -
Unsupervised Learning
: Learning with data that doesn't include correct answers -
Reinforcement Learning
: Learning by receiving rewards based on the correct answers
Among these, supervised learning, which involves guiding AI with data that includes labels, is the most widely used method for training AI.
How Supervised Learning Worksβ
Simply put, supervised learning is similar to a student solving problems while a teacher provides the correct answers.
For example, imagine you want to create an AI model that can differentiate between pictures of cats and dogs.
In supervised learning, you provide data with inputs (images)
and their corresponding labels (answers)
to the AI.
Input (Image) | Answer (Label) |
---|---|
πΆ Dog Image 1 | Dog |
π± Cat Image 1 | Cat |
πΆ Dog Image 2 | Dog |
π± Cat Image 2 | Cat |
Here, what is being categorized, such as dogs and cats, are called classes
.
As the AI model learns from this data, it becomes capable of identifying features of each class, enabling it to predict the category of new images it encounters.
Main Supervised Learning Typesβ
Supervised learning is largely categorized into two types.
1. Classificationβ
This method involves classifying input data into one among multiple categories (classes).
For instance, you could create the following classification models:
-
Email Spam Filter: Classify emails as "spam" or "non-spam"
-
Medical Diagnostic AI: Predict whether a patient has a specific disease based on their symptom data
-
Customer Review Sentiment Analysis: Determine if a review is "positive" or "negative"
2. Regressionβ
Regression involves learning the relationships between continuous numerical values such as height, temperature, and price.
The goal of a regression model is to predict the numerical value corresponding to a given input.
You could develop the following regression models:
-
Real Estate Price Prediction: Predict the price of an apartment based on size, location, and other factors
-
Stock Price Prediction: Forecast future stock prices based on past data
-
Weather Prediction: Predict tomorrowβs temperature given the current temperature, humidity, etc.
Limitations of Supervised Learningβ
Despite being the most commonly used AI training method, supervised learning has the following limitations:
1. Requires Large Amounts of Dataβ
AI requires a vast amount of data to learn effectively.
2. Needs Accurate Labelsβ
Every piece of data must have a correct answer, necessitating a labeling
process to annotate each data point with the correct label.
3. Might Struggle with New Dataβ
If the training data differs significantly from the data to be predicted, prediction accuracy could suffer.
To overcome these limitations, methods like unsupervised learning
, which utilizes data without labels, and reinforcement learning
, which relies on rewards, are also employed in machine learning.
The next lesson will discuss unsupervised learning.
Want to learn more?
Join CodeFriends Plus membership or enroll in a course to start your journey.