Types Of Machine Learning.

As we discussed the basic concept of Machine Learning in the previous blog posts, In this blog post we will discuss the types of Machine Learning Algorithms.

There are two types of machine learning :
  • Supervised Machine Learning.
  • Unsupervised Machine Learning.
Remember? we discussed that the dataset in the most important term in machine learning, The above two types of machine learning arise from the type of the dataset we have.


In supervised machine learning, we have the inputs and the outputs both in the dataset, this means that we know both the terms, the input, and the output.

For example, let's look at this dataset :

In this dataset, we have inputs and outputs. i.e square_feet is the input and price is the output for that input.

So, we can apply the Supervised Machine Learning for this dataset.

Now, Supervised Machine Learning is further categorized into two types:
  • Regression
  • Classification
let's look back to our dataset again, the output of the dataset has continuous values,


The dataset, whose output column has continuous numeric values, we use the Regression Algorithm.

Regression Algorithms are again of two types:

  • Linear Regression
  • Non-Linear Regression
In Linear Regression, The relationship between input and output variables is linear.
But in Non-Linear Regression, The relationship between input and output variables are non-linear.


The dataset, whose output column has logical values or categorical values, we use the classification algorithm.

For example, look at the below dataset:

This is a snapshot of Iris dataset, This dataset contains the following columns:
  • sepal_length
  • sepal_width
  • petal_length
  • petal_width
  • species
The first 4 columns describe the length and width of petal and sepal of the flower whereas the last column species tell the species of the flower with the given length and width.

So, here the Input Columns are:
  • sepal_length
  • sepal_width
  • petal_length
  • petal_width
And the Output column or target column is:
  • species
Observe the values in species, it is either Iris-setosa or Iris-versicolor. such data is known as categorical data and for this type of dataset, we use a classification algorithm.

You can understand why classification? because the answer is categorical, i.e either the flower can be Iris-setosa or Iris-versicolor.

Now, the classification method has different algorithms based on the different mathematical concepts they build on:

  • KNN
  • Logistic Regression
  • Support vector machine classification
  • Decision Trees 
We will look into them one by one in further posts.

Now as we have discussed Supervised Machine learning lets look into Unsupervised machine learning.


Unlike supervised learning, In unsupervised learning, the dataset has no output columns. 
This means that we only have inputs and using that inputs only we have develope the model.

There are many algorithms in unsupervised machine learning such as:
  • K-means clustering
  • density-based clustering

Unsupervised machine learning uses probability and statistics concepts to find unknown patterns in the dataset.

We will look into details about unsupervised learning in upcoming posts.