Understanding Supervised Learning
What Is Supervised Learning?
Supervised learning is a machine learning approach in which a model learns from labeled training data. Each example contains input features and a known target.
For example, a dataset used to predict house prices might contain the following information:
Area (sq. ft.) | Bedrooms | Price |
| 800 | 2 | ₹30 lakh |
| 1,200 | 3 | ₹45 lakh |
| 1,600 | 3 | ₹60 lakh |
| 2,000 | 4 | ₹80 lakh |
The area and number of bedrooms are features. The price is the target label.
During training, the model learns patterns connecting the features to the target. It can then estimate the price of a house whose price is not already known.
How Does Supervised Learning Work?
A typical supervised learning workflow includes:
- Collect labeled examples.
- Clean and prepare the dataset.
- Separate input features from the target.
- Divide the data into training and evaluation sets.
- Select and train an algorithm.
- Evaluate predictions using appropriate metrics.
- Improve the model through validation and tuning.
- Deploy and monitor the model when appropriate.
The quality of the training examples matters. If the labels are inaccurate or the dataset does not represent real-world conditions, the model may learn misleading relationships.
Regression vs Classification
Supervised learning includes two major problem types.
Regression predicts numerical values.
Examples include:
- Predicting house prices.
- Estimating delivery times.
- Forecasting product demand.
- Predicting electricity consumption.
Classification predicts categories.
Examples include:
- Classifying emails as spam or legitimate.
- Detecting fraudulent transactions.
- Predicting whether a customer may cancel a subscription.
- Identifying an image's category.
The type of target usually determines whether a problem is regression or classification.
Understanding Model Predictions
Suppose a classification model estimates that a transaction has a 0.85 probability of being fraudulent.
This value represents the model's estimated probability for the relevant class. A classification system may compare it with a decision threshold to produce a final label.
For example, with a threshold of 0.5, a prediction of 0.85 would be classified as fraudulent. A different threshold may be appropriate when the costs of false alarms and missed fraud differ.
For regression, the model directly predicts a numerical value, such as an estimated delivery time of 35 minutes.
Generalization
A supervised learning model should learn patterns that apply beyond its training examples.
Generalization describes how effectively a model performs on previously unseen data drawn from the intended prediction environment.
A model that memorizes its training observations but performs poorly on new data has not learned a sufficiently general pattern.
Separating training and test data helps evaluate generalization, while validation techniques help select and improve models.
Artificial Intelligence Tutorial
Vishalini A








