Machine Learning : Types of Machine Learning - Supervised and Unsupervised

Machine Learning : Types of Machine Learning - Supervised and Unsupervised


Hi welcome to the article on types of machine learning supervised and unsupervised.

In the previous article we learnt about:

  1. Explain what data is and its role in machine learning
  2. Explain what is a machine learning model and how it interacts with data to make predictions and recommendations.

Learning Objectives:

By the end of this topic you will be able to:

  1. Define the terms labelled data and unlabeled data
  2. Explain supervised learning and unsupervised learning

In this article we learn about different types of machine learning models that are available to us. Supervised learning and unsupervised learning at the two most commonly used types of machine learning models. There are other types of models as well which we will briefly touched upon them later in the article.

Machine Learning : Types of Machine Learning - Supervised and Unsupervised - Types


Labelled and Unlabeled Data

Before we start our discussion on supervised and unsupervised learning it is important to understand what is labelled and what is unlabeled data. As we had learnt earlier data is a collection of information about something. And this data contains a target variable or an output variable that answer the question of interest then we say that it is a labelled data. Confused don't worry take some examples to understand this better.

For Example 1 :- Suppose we have the results of patients was suffering from a particular disease and receiving treatment for it. The data may contain information like patient name, his gender, location, hospital name, time Since patient is suffering from the disease, type of disease, it completely level, patients weight, body temperature, blood pressure, heart rate and the amount of dose given, etc.

Machine Learning : Types of Machine Learning - Supervised and Unsupervised - Patient example

Additionally we also have information whether the patient was completely cured or not after the treatment. This additional information can be represented as a category variable containing yes or no against each patient depending on whether he or she was cured after the treatment or not. And additional information is what we call a target variable or an output variable. Since it answer the question whether the patient was cured or not. This target variable is also called the dependent variable. Since its value yes or no may depend on some of the other information we have about the patient. Such as gender, weight, age, treatment dose, treatment duration, etc. And other information is referred to as independent variables. Such kind of data with contains a target variable or a dependent variable answering a question of interest is called labelled data.

Example 2 :- Now let us consider another example where we have data of employees of an organization. The information contained employees name, age, location, date of joining, designation, roll, job type, time of service, time in roll, years of experience, monthly salary, average rating, last appraisal percentage, etc. In addition to this we also have information about the employee leaving the organization or not. So this data again is called a labelled data. Because it has employee level details and also tells us whether a particular employee is still with the organization or not. Had this information not been present in the data we would have classified as unlabeled data. So unlabeled data is one which contains information about something but does not have a predefined target variable. It is actually just the opposite of labelled data.

Machine Learning : Types of Machine Learning - Supervised and Unsupervised - Employee example

In case you are wondering what kind of data that may be or what could be used. We would understand that right after we learn about supervised learning.


Supervised Learning

From the term supervised learning, we can inferred that supervised learning model is a model which learns under supervision. And this supervision is provided by the labelled data which contains the target variable and a few independent variables. In a supervised learning model we are more interested in the target value.

Machine Learning : Types of Machine Learning - Supervised and Unsupervised - Supervision learning of model

Just like a student Learns from teacher and then delivers in the exam. In supervised learning the model first Learns about the target variable and how it depends on the rest of the information or variable using the past labelled data. This is referred to as training the model. Once the model has been trained on this label data. We can feed the new unlabeled data to it for which we want to make predictions of the target variable. And it would predict the value of the target variable for the new data based on its learning from the past data.

Machine Learning : Types of Machine Learning - Supervised and Unsupervised - Unlabeled learning of model

For example 1 :- Let's say we have labelled data of customers from a particular E-Commerce website. We have information like name of the customer, gender, age or occupation, monthly salary, monthly expenditure, percentage spent on e-commerce website, duration of visits, categories browsed, products browsed, browsed product's price, discount available, offers and finally at target variable of number of products purchase in the last one month. So this information tells us whether the customer will buy a product or not.

Machine Learning : Types of Machine Learning - Supervised and Unsupervised - Customer data example

We can now train our model using this data and the model will understand the pattern of customers who buying a product. Based on its learning the model can now predict whether a new customer will buy a product or not based on other variable information of that customer. So this was an example of supervised learning. Where we first train the model using the labelled data and then the model predicts answers to a question for new data based on it past learning.

Machine Learning : Types of Machine Learning - Supervised and Unsupervised - Customer data model

Example 2 :- Let us consider another example of supervised learning. Let say online education platform, they are very interested in predicting how many marks should we score in our final test. For this, they have past student data who have passed this final test. They have the data such as name, gender, college, branch, year of study, CGPA, how much time we spent on training, how many times we revised the videos, how was our performance in quiz questions, etc. They also have data on target variable that is how many marks the students scored in the final test.

A supervised learning model can be trained on this data. And can later a look at the same information for you such as your name, gender, college, CGPA, time spending in watching these videos, etc. And predict how many marks would we score in the final test. Is it that cool? one key difference between this example of supervised learning and previous example of unsupervised learning is the kind of values you would expect in the target variable.

Machine Learning : Types of Machine Learning - Supervised and Unsupervised - Student data model

In case of patient data the target variable would contain yes or no values in it. And is called the category variable. Since it can have only one discrete value from a predefined set of values. Well in case of test score prediction model the target variable would contain a students marks in the final test which is the continuous numerical value. And such target variable is called a continuous variable it can take any numerical value in a given range.

Accordingly supervised learning models are further classified into two types namely:

  1. Classification model where target variable is a category variable and
  2. Regression models with target variable is a continuous numerical variable.

Machine Learning : Types of Machine Learning - Supervised and Unsupervised - Supervised learning types of data

Most of machine learning model that we use today are based on supervised learning. They are trained on labelled data and belong to either of these two type. We will be talking about these models more in detail later.


Unsupervised Learning

We can say:

  1. Unsupervised learning is the complement of supervised learning.
  2. There is no target variable involved and
  3. It works only on unlabeled data

The objective of this type of machine learning model is to identifies if some pattern exist in the data or not.

For example :- The population data which has information for each household. Such as date of Survey, state, district, locality, pin code, total family members in the house, number of children in the house, number of senior citizens, number of males, number of females, number of people working, household income, whether it has a dish connection or not and many more.

Machine Learning : Types of Machine Learning - Supervised and Unsupervised - Population data example

Now we do not have a target variable in this data which is trying to predict our answer specific questions for each data point. And hence this is unlabeled data. But let say in this population we want to make a group of household which are similar to each other based on the information available for them. These groups could be similar based on one characteristic such as there is a child in the house or not or multiple characteristics say all the household over certain annual income, located in urban centers and having children could be clubbed together to form a group. And there could be several groups the population can be divided into.

Machine Learning : Types of Machine Learning - Supervised and Unsupervised - Population data  grouping example

The machine learning that is deployed to find such patterns in unlabeled data is referred to as unsupervised machine learning. Since there is no target variable to learn from. That in this article. In the next article you will learn about Types of Data.


Attention readers! Don't stop learning now. Check out our articles to gain more knowledge.

Post a Comment

If you have any doubt, let me know.

Previous Post Next Post