Find more at GeneAka Marketplace With Recent Update on 21/09

Fundamentals of Supervised Learning: A Comprehensive Overview

Supervised learning is like teaching a computer by giving it examples and telling it what those examples represent.

Image Created by Nidhi Gahlawat

Have you ever wondered how your smartphone can accurately recognize your face or how email services filter out spam messages? The answer lies in a fascinating concept called supervised learning.

Machine learning can be categorized into supervised learning, unsupervised learning, semi-supervised learning, reinforcement learning, deep learning and so on. We covered an Introduction to Machine Learning previously, today we will learn more about supervised learning.

Let’s first break down the term “supervised learning” to help you understand its meaning better:

  1. Supervised”: The word supervised refers to a presence of a supervisor (or a teacher) to make sure that the work is done correctly. In supervised learning, this supervisor is responsible for providing labelled examples or guidance to the learning algorithm.
  2. “Learning”: In machine learning, “learning” refers to the process of gaining information from given data using some algorithm.
  3. “Supervised Learning”: Putting it all together, supervised learning is a type of machine learning where the algorithm learns from labelled examples with the help of a supervisor.

In simple words, supervised learning is like teaching a computer by giving it examples and telling it what those examples represent.

Cats and Dogs

Image Created by Nidhi Gahlawat

Let’s use an example to understand supervised learning. Imagine we have a collection of images of cats and dogs, and each image is labelled as either a cat or a dog. We want to teach a machine learning model to recognize the difference between these two animals.

During the training process, the model carefully examines the labelled images to find common features that distinguish cats from dogs. It looks at things like the shape of the ears, colour patterns, and face structure. By studying many labelled images, the model gradually learns which patterns or combinations of features are associated with each animal.

Image Created by Nidhi Gahlawat

Once the training is finished, we put the model to the test. We give it new, unseen images and ask it to predict whether each image contains a cat or a dog. The model uses the patterns it learned during training to make its predictions. It looks for familiar features in the new images and assigns the appropriate label based on what it recognizes.

Image Created by Nidhi Gahlawat

The accuracy of the model’s predictions depends on how well it was trained. If the model was exposed to a diverse range of images that accurately represent different cats and dogs, it will likely perform better on unseen images. The quality of the training data is crucial for the model to learn generalizable features.

This task of classification of items into categories is a common application of supervised learning. Along with this supervised learning is also used in predictions (regression) and decision-making.

Independent & Dependent Variable

Independent variable refers to the input features, such as images of cats and dogs. While, the dependent variable or target variable is the output data, like labelling the image as cat or dog. The dependent variable is called so because its value depends on the independent variables.

Suppose you have the house rent data of a locality:

Created by Nidhi Gahlawat

Amazon Most Wished For

Here, the number of rooms, size of the house and balcony are independent variables or input features because they are the deciding factor for the rent and not vice-versa. While the rent of a house is dependent on the other features. Thus, we call “rent” a dependent variable. And the ML model will predict the rent of the house based on the input features we provide.

Supervised Learning is used here as we have a label (rent) which we need to predict based on the input features. So, now you understand the independent and dependent variables as well as how supervised learning is used in predicting values.

Popular Supervised Learning Algorithms

Below are some popular supervised learning algorithms, we will cover each of them in future articles.

  • Linear Regression: Linear regression is a regression algorithm that models the relationship between a dependent variable and one or more independent variables as a linear equation. It is often used for predicting continuous numeric values. Like in the example of house rent, linear regression can be applied to predict the house rent.
  • Decision Trees: Decision trees are versatile algorithms that can be used for both classification and regression (prediction) tasks. They create a tree-like model of decisions and their possible consequences based on features of the data.
  • Random Forests: Random forest is a method that combines multiple decision trees. They create a collection of decision trees and make predictions by aggregating the predictions of individual trees, resulting in improved accuracy and robustness. This algorithm handles both classification and regression tasks.
  • Support Vector Machines (SVM): SVM is a powerful algorithm for both classification and regression tasks. It finds an optimal decision boundary that separates different classes while maximizing the margin between them.

Use of Supervised Learning

Supervised learning is not limited to cats and dogs; it is a fundamental concept in machine learning with broad applications. It allows computers to learn from labelled examples, generalize from that knowledge, and make predictions or classifications on new, unseen data.

  1. Image Classification: As we discussed earlier, supervised learning can be used to classify images. It enables applications like object recognition, facial recognition, and medical image analysis. For instance, it can help identify diseases from medical scans or automatically tag people in photos on social media.
  2. Spam Filtering: Supervised learning can be applied to filter out spam emails. By training a model on a labelled dataset of spam and non-spam emails, the model can learn to distinguish between the two and automatically filter incoming messages.
  3. Sentiment Analysis: Supervised learning is used in sentiment analysis to determine the sentiment or opinion expressed in text. By training a model on labelled data where text is classified as positive, negative, or neutral, the model can understand and categorize sentiment in user reviews, social media posts, or customer feedback.
  4. Fraud Detection: Supervised learning can help detect fraudulent activities in various domains. By training a model on labelled data that includes fraudulent and non-fraudulent transactions, the model can learn to identify patterns indicative of fraud, such as unusual spending patterns or suspicious behaviour, in order to flag potential fraudulent activities.
  5. Autonomous Driving: Supervised learning plays a crucial role in training models for autonomous vehicles. By providing labelled data of road scenes and corresponding actions (e.g., steering, braking), the model can learn to recognize objects, interpret traffic signs, and make driving decisions based on the learned patterns.

These are just a few examples of the many applications of supervised learning. In general, supervised learning is applicable in any scenario where labelled data is available, and the goal is to make predictions, classifications, or understand patterns in new, unseen data.


In this article, we covered the basics of supervised learning including its meaning, applications, independent and dependent variables and an overview of algorithms that come under supervised learning.

In future articles, we will learn in-depth about each algorithm, ML workflow and data processing. Stay tuned!

Further Readings

  1. What is Machine Learning?! A Beginner’s Introduction
  2. AI and ML for Dummies
  3. Introduction to Python Programming

Original Post>

//Last UPDATE ON 18/09
Today's deals