Basics of Machine Learning and it’s Algorithms -You Need to Know

Knoldus Blog Audio
Reading Time: 6 minutes

Machine Learning and it’s Algorithms

Hi folks!

Are you intrigued about Machine Learning and its Algorithms?

If yes, Welcome. You have come to the right place. In this blog you will learn about machine learning and it’s algorithms. By the end of the blog, you will have the basic understanding of this field

Machine Learning

The term is self-explanatory enough that there is going to be a machine that will learn something. The machine is a computer and how it’s going to learn is something that is going to be interesting to know. So let’s dive into the ocean of machine learning.

In a layman’s definition, machine learning is nothing but a machine that tries to mimic human beings. Machines try to analyze the situation and predict the result just like us. The major difference between human thinking and machine thinking is, humans have brains to think and analyze but machines do not have a brain. So algorithms and models work as the brain for them. The machines are trained by using those algorithms and models in such a way that they become capable of analyzing the data provided to them and give human-like responses which are more accurate when there is a huge amount of data given.

As humans are just not capable of analyzing and handling an abundant amount of data, machine learning is one such technology that can overcome this human drawback. Just like humans machines also learn with their experiences, some amount of input is provided to the machines, and the performance increases after each try.

To understand the working of machine learning let’s see a real-life example:

When we play some sport, say basketball and initially, you don’t know much about it so you break a lot of rules and make mistakes. On the second try, you improve on those mistakes but tend to make new ones. But try after try we get familiar with how to play the sport. So it’s continuous experience and learning. In the same way, the machine also learns to try after try and finally give good results.

Basic workflow of Machine Learning

Machine Learning Flow

The above diagram shows how a basic machine learning model works.

  1. We give the dataset as the input.

2. Select a suitable machine learning algorithm (about which we will learn in a while).

3. Finally after analyzing the model we get the output as a result.

Machine learning is a treasure in itself. From forecasting the future prices of any real estate to high definition visualization, machine learning got it all.

If we are saying machines try to mimic humans then obviously machines will require food too. Let’s know about what our machine eats? Just like human beings eat food to get energy and finally invest that energy into doing work, the same way machines also need food to function and do all the analyzing. The food for machines is nothing but data or datasets. Data is the most important part of machine learning, by studying that data the machine tends to learn the trends and finally predict the future values. Without data (food), the concept of machine learning goes useless. The data is collective facts and figures that have been gathered from various surveys or experiences.

What does the dataset look like?

To explain the above dataset, we will see an example:

Above is a dataset of MagicBricks Real Estate. It contains a huge amount of data about the properties all over Delhi. The attributes are Area, BHK, Bathrooms, Furnishing, Locality, Parking, Price, Status, etc. which are all crucial parts of a house on which the price of the house is dependent. This dataset is an accumulation of details about all the properties under MagicBricks. This dataset can be used to predict the future prices of the houses by considering all the attributes in the above dataset.

There are two types of data

1. Labeled Data

This kind of data is already in a classified format. To understand what a classified format is, just look above the dataset of MagicBricks. There are various columns and in those columns, data is belonging to the mentioned column name. That is, if we see the Area column, we can easily classify that the numbers present as data is nothing but the area of houses. The data is not lying there in a useless chunk where we don’t even know what that data is actually. So this is a labeled type of data. 

2. Unlabeled Data

Just the opposite of the labeled data, unlabeled data is the data that does not belong to any class. The data just exist as a chunk of facts and figures whose category is unknown. About what the data is? What does this data represent? What value belongs to what class? If I remove the name of the first column of the above dataset, Area, can we guess what the column is representing? NO. So this kind of data needs to be classified first and then be used.

Machine learning algorithms

Broadly machine learning algorithms are categorized into three major parts:

Supervised Learning

Supervised Learning is a type of learning which is applied to labeled data. This type of learning is seen as a teacher teaching their students. The teacher here is the dataset and that dataset is used to train the machine (student). Once the machine gets trained, it’s all ready to jump-start making predictions on new data as well. 


This type of learning works as, if we have X then we can predict the value of Y (X -> Y). Suppose we have a bunch of images and we can easily know to which category the image belongs to because it’s labeled as cat images, dog images, and human images. This is how Supervised Learning works.

Unsupervised Learning

This type of learning is applied to that data that is not labeled and where we don’t know about the data. Suppose you have downloaded audio from the internet and there is no information about the speaker, what this audio is about etc. so that audio will be considered as unlabeled data. Whenever we train the unlabeled data, it is known as unsupervised learning. In this type of learning, we use the features of the data and try to find the label for it. Cluster Analysis is the technique used for this.


We have abundant data which is not labeled at all. So by training the machine we try to tell the machine to cluster the data which has the same features. Suppose we have a collection of documents that include text and image documents. By analyzing the features of the data, the machine will cluster them into two clusters as image documents and text documents.

Reinforcement Learning

It is an area of machine learning where the learning agent learns from its experiences or consequences of actions. It selects actions based on past experiences (exploitation) and also by new choices (exploration). Reinforcement learning uses these two majorly is exploitation and exploration which can lead to the desired output. Reinforcement learning also known as reward and punishment learning. 


A small child wants to watch a cartoon on TV but he doesn’t know how to turn the TV on. The child presses various buttons of the remote. Suddenly TV turns on, the child remembers the button and learns from the exploration that this particular button turns on the TV and he will not waste any time whenever he wants to watch TV. Then he wanted to watch the Hungama channel but he didn’t know how to change the channel. The child was pressing random buttons, the TV turned off this time (exploitation), and the child got to know this particular button turns the TV off so from next time I will not press that button. So here we see the small child learned from his experience and next time he will act (output) according to the experiences gained. The same way reinforcement learning works.

For more Information visit this blog.

References :