DEV Community

Ekta Chaudhary
Ekta Chaudhary

Posted on

Supervised and Unsupervised Learning

SUPERVISED LEARNING

Supervised Learning is used whenever we want to predict a certain outcome from a given input, and we have examples of input and output pairs. We build a Machine Learning model from these input pairs, which comprise our training set. Our goal is to make accurate predictions for new, never-before-seen data. Supervised Learning often requires human effort to build a training set, but afterwards automates and often speeds up other impossible tasks.

In short

  • Supervised Learning model is a model which learns under supervision and this supervision is provided by labelled data.*
  • In this model, we are more interested in the target value.*

Supervised Learning handles mainly two types of Machine Learning Problems:-

  1. Classification Model
  2. Regression Model

Classification Model:-

In this, the goal is to predict a class label, which is a choice from a predefined list of possibilities. Here, the target variable is a category variable.
Example:- Classifying emails as email spam or not spam.

Regression Model:-

In this, the goal is to predict a continuous number or floating-point number in programming term. In this, the target variable is a continuous numerical variable
Example:- Predicting a person's annual income from their education, their age, and where they live as the amount can be any number in a given range.

An easy way to distinguish between classification and a regression model is to ask whether there is some kind of continuity in the output. If there is continuity between possible outcomes, then the problem is a regression problem.

Unsupervised Learning

In this type of learning, there is no known Output, no teacher to instruct the learning algorithm. In Unsupervised learning, the learning algorithm is just shown the input data and asked to extract knowledge from this data.

*Complement of Supervised Learning
*There is no target variable involved
*Works on only unlabelled data
*Identifies if some pattern exists in the data

Unsupervised Learning is further divided into two types:-

  1. Transformations of the dataset
  2. Clustering

Transformation of the dataset

Unsupervised transformation of a dataset are algorithms that create a new representation of the data which might be easier for human beings or other machine learning algorithm to understand compared to the original representation of the data. A common application of unsupervised transformation is dimensionality reduction, which takes a high-dimension representation of data consisting of many features, and finds a new way to represent this data that summarizes the essential characteristics with fewer features.
Example:- Reduction to 2_d for visualization purposes.

Clustering Algorithms

Partitioning data into distinct groups of similar items.
Consider the example of uploading photos to a social media site. To allow you to organize your pictures, the site might want to group them together with the same person. The site doesn't know which pictures to show whom. A sensible approach would be to extract all faces and divide them into the group of faces that look similar. Hopefully, the image can be grouped together for you.
The best example of this is Google Photos or Facebook Photos.

Challenges in Unsupervised Learning

A major challenge in unsupervised learning is evaluating whether the algorithm learned something useful. Unsupervised learning algorithms are applied to data that doesn't contain any label information, so we don't know that the output is right or not.

Top comments (0)