Welcome to the Basics of ML

Machine Learning

Do you wanna know everything about Machine Learning?. If yes, then Congratulation!. You are in the right place. Here you will get every detail related to Machine Learning. Here, I will discuss the definition of Machine Learning, Types of Machine Learning Algorithms, etc.

Hello & Welcome!

Here, I am gonna tell you-

What is ML?

Machine Learning?

As the name suggests ” Machine Learning“. That means Machines are Learning something.


Machine Learning (ML) allows machines to learn in the same way as a human learns.

ML is the subpart of Artificial Intelligence. ML learns from the training data or from self experiences.

ML is the same as a Newborn child. The newborn child learns from the instructions given by his parent and by his self-experience.

He tries to walk but he falls down. And then again tries to walk. Similarly Machine Learning Works.

ML learns from training data, predict the output. Based on the predicted output, it improves accuracy by predicting again.

I hope now you Understand What is ML.

For More Detail Definition of ML. Read, this Article-What is Machine Learning? Clear your all doubts easily.

Now, let’s see What is the use of ML or Why ML?

Why ML?

There are lots of Data in Today’s world. In fact, we are living in the Data Age.

This Data is generated not only by humans but also by computers. A huge amount of data is generated daily.

According to one report, By 2025, it’s estimated that 463 exabytes of data will be created each day globally. That’s the equivalent of 212,765,957 DVDs per day!

Machine Learning

So, What is the use of this Huge amount of Data?.

Is it garbage?


This huge amount of data contains various useful pieces of information.

But, the next question is how to find useful information from the vast amount of Data?

And the answer is-

With the help of Machine Learning.

That’s why ML is very powerful and popular. Many people are shifting their careers into the ML field.

The future of ML is very bright.

I hope now you know the definition of ML, and Why it is popular. Now let’s see some basic terms used in ML.

Basic Terms used in Machine Learning

Before moving into ML working steps. I would like to clarify some terms used in ML.

1. Model

Model is the system or ML algorithm that makes a prediction. In ML, when you use any ML algorithm for prediction, that is known as Model.

2. Training Data

Machine Learning uses Training Data to train the model.

3. Testing Data

This is the Data that is used for testing the model.

4. Balance Dataset

Suppose you have to predict that the patient has heart disease or not. So for that, you need data that have both types-

The patient has heart disease”, and “has not heart disease”.

But if you have more data of “Patient has heart disease“. And less data for “No Heart disease“. So this type of data is known as Imbalance Dataset.

For achieving good results, you should have a Balanced Dataset. Balanced Dataset means an equal quantity of “Patient has heart disease“, and “No heart disease”.

From here, one more term comes. That is Bias.

5. Bias

If you have Imbalanced Dataset, then your model prediction is biased with the more quantity dataset. That means if you pass more data with “Patient has heart disease“. So it will predict “Patient has heart disease” more than “No Heart disease“.

6 Overfitting

In simple words, Overfitting is similar to overeating. LOL.

Yes, it’s right.

What happens when you overeat?.

You face some digestive problems. Right?

Similarly, when you pass extra data to the Model. Your model also faces issues.

In short, Overfitting is the problem, when you give extra data to the training phase.

7 Underfitting

Underfitting is the opposite of Overfitting. That means when you pass fewer data at the training phase. Then also your model faces a problem.

I hope, now you are familiar with these terms.

Now let’s move into the next section that is How does ML work?

How does Machine Learning Work?

ML works into following steps-

Machine Learning
  1. Data Collection.
  2. Data Preprocessing.
  3. Choose a Machine Learning Algorithm.
  4. Training the Model.
  5. Testing the Model.
  6. Tuning the Model.

1 Data Collection

Data Collection is the step, where you collect data for your model. You can collect data from various sources. These sources may be Social Media, via Interview, via Survey, and etc.

2 Data Preprocessing

The data you collect is not clean. This data have various ambiguities and noise. So to clean the data, various preprocessing steps are performed. Along with Data cleaning, some other steps are also performed. And that is-

2.1 Data Splitting

In Data preprocessing, the most important work is splitting your data into Training Data and Test Data. You have to divide your data into two parts. This splitting also affects your model accuracy.

The basic rule of Data splitting is 80% and 20%. That means use 80% data for the training phase and 20% data for the testing phase.

But this random splitting can affect your model accuracy. So to solve this problem, we perform K Fold Cross-Validation.

If you wanna learn What is K Fold Cross-Validation, or how does it work?. Read this Article.-K Fold Cross-Validation in Machine Learning? How does K Fold Work?. Here You will understand all the details of K-Fold Cross-Validation.

2.2 Dimensionality Reduction

The data you collect is big in size. So to process huge size data is complex. It requires more processing power and space. Therefore Dimensionality Reduction comes into the scene. It reduces the dimension of data.

For Dimensionality Reduction, Principal Component Analysis, and Linear Discriminant Analysis is performed.

To understand, how Principal Component Analysis works. Read this Article-What is Principal Component Analysis in ML? Complete Guide!

Linear Discriminant Analysis Python: Complete and Easy Guide

The next phase in Machine Learning is-

3 Choose an ML Algorithm.

Based on your problem, you choose ML Algorithm. If it is a classification problem, then choose Classification Algorithm. If it is a clustering problem, then choose Clustering Algorithms.

I will discuss different types of ML algorithms in the next section.

So, after choosing the ML Algorithm. The next step is-

4 Training The Model

After you have chosen the ML Algorithm, then you train your model. Training is performed with the help of training data.

After training the next step is-

5 Testing the Model.

After your model is trained on training data. You test your model. So, for testing, you pass testing data.

Make sure testing data is different from training data.

Your model gives prediction on testing data. And that is your model’s output or prediction.

But, if your model is not accurate, then you perform-

6 Tuning the Model

Tuning is performed to increase the accuracy of your model. Tuning is basically a trial and error process. Where you change some hyperparameters, run the algorithm on data again. And compare your model performance.

Hyperparameter is a parameter whose value is set before learning starts.

I hope, now you understand how ML works.

Now, let’s move into the next section.

Types of Machine Learning Algorithms

ML Algorithms of four types-

  1. Supervised Learning.
  2. Unsupervised Learning.
  3. SemiSupervised Learning.
  4. Reinforcement Learning.

So, let’s see one by one.

1. Supervised Learning

As the name suggests, “Supervised Learning”. That means learning under supervision. Supervised learning is also known as Classification.

Classification needs some kind of supervision. This supervision is nothing but training data with the predicted value.

Suppose you have to predict whether a patient has heart disease or not. So for that, you pass the following data-

Heart RateBlood PressureOther SymptomsHeart Disease (Y/N)

So, here two types of variables present. Dependent Variables and Independent Variable.

Independent Variables are- Hear Rate, Blood Pressure, and Other symptoms.
Dependent Variable is- Heart Disease (Y/N).

That means the patient has heart disease or not depend upon these independent variables.

You can call Dependent variable Y. And Independent variables X.

I discussed this example just to explain supervised learning.

So, in supervised learning, you pass training data in this form. Where you have X and Y both kinds of variables or attributes.

Your model learns that if a person has hight Heart rate, and blood pressure, and other symptoms. Then he is suffering from heart disease.

Here, full supervision is provided to the model. The model doesn’t have to find any patterns by self. Everything is provided in the training phase.

2. Unsupervised Learning

In unsupervised learning, there is no supervision. The model has to predict the result by itself. Unsupervised Learning is also known as Clustering.

Like in supervised Learning, the model knows the predicted value. But here, in the unsupervised learning model don’t know what to predict.

Let me simplify it.

In supervised learning, the model knows the predicted variable. Based on the predicted variable, the model learns. So if you pass new Heart Rate, BP, and other symptoms, the model will predict.


In unsupervised learning, you pass only the Independent variable. Not the predicted variable.

Suppose the supermarket manager wants to know about their customer. The manager has the following data-

Customer_idGenderAgeAnnual SalarySpending Score

Here we have only an independent variable. We don’t know the predicted variable. Only we know that we have to find some patterns.

So, that’s the difference between Supervised learning and unsupervised learning.

In short, in Supervised learning, data is labeled. But in unsupervised learning, data is not labeled.

I hope now you understand.

3. Semisupervised Learning

Semisupervised Learning is a mixture of both supervised learning and unsupervised learning.

That means in Semisupervised learning, some data is labeled and some data is not labeled. You can use semisupervised learning to label your data.

That means if you have data, who is not fully labeled. Then you can use semisupervised learning to label your full data.

4. Reinforcement Learning

Reinforcement Learning is a kind of hit and trial learning. In reinforcement learning, the model doesn’t have any prior knowledge. Model learn itself.

There is a Reward mechanism in Reinforcement learning. And the model learns with the help of these rewards.

If the model predicts the correct result, it is rewarded. And If it makes the wrong prediction, it is penalized.

With this mechanism, the model learns and improves its performance.

The Multi-Armed Bandit problem is an example of Reinforcement Learning.

If you wanna learn the Multi-Armed Bandit Problem in detail. Read this Article- Multi-Armed Bandit Problem- Quick and Super Easy Explanation!

Upper Confidence Bound is used to solve the Multi-Armed Bandit Problem.

A detailed article on Upper Confidence Bound- Upper Confidence Bound Reinforcement Learning- Super Easy Guide

I hope, now you understand different types of ML.

Now, let’s see the Algorithms of each type of ML.

Supervised Learning Algorithms

Supervised Learning has following Algorithms-

  1. Logistic Regression.
  2. K-Nearest Neighbors(K-NN)
  3. Support Vector Machine(SVM)
  4. Kernel SVM.
  5. Naive Bayes
  6. Decision Tree Classification.
  7. Random Forest Classification

Unsupervised Learning Algorithms

Unsupervised Learning has following Algorithms-

  1. K-Means Clustering
  2. Hierarchical Clustering.
  3. Probabilistic Clustering

Reinforcement Learning Algorithms

Reinforcement Learning has the following Algorithms-

  1. Model-Free Reinforcement Learning.
    1. Policy Optimization.
    2. Q-Learning
  2. Model-Based Reinforcement Learning.
    1. Learn the Model
    2. Given the Model.

Top 5 Best ML Books, You Should Read-

If you wanna become a Master in ML, then the best way is to read some books. Here, I will mention some best books on ML, which will give you a new direction to your ML Journey.

If you are a beginner, then you should definitely read these books-

1. Introduction to ML with Python

After reading this book, you will learn how to make an ML model with Python. Buy Introduction to ML with Python.

2. ML For Absolute Beginners: A Plain English Introduction (ML from Scratch) 

This is another book especially for beginners. This book contains a step by step guide where you will learn everything. Starting from How to download the dataset to How to build the first ML model.

Buy ML For Absolute Beginners: A Plain English Introduction (ML from Scratch) 

3. Machine Learning (in Python and R) For Dummies (1st Edition)

Buy This Book.

If you are Intermediate in ML, then these are some books, you should definitely read in order to sharpen your skills in ML-

4. Pattern Recognition and Machine Learning (Information Science and Statistics)

If you wanna dive deep into Pattern Recognition, then this is the best book for you. This book used graphical models to represent probability distribution. No other book uses Graphical models for ML.

If you are a beginner in Pattern Recognition, still you should read this book. Because this book will clear all basic concepts as well as advanced concepts regarding pattern recognition.

Buy Pattern Recognition and ML (Information Science and Statistics)

5. Fundamentals of ML for Predictive Data Analytics – Algorithms, Worked Examples, and Case Studies (The MIT Press) Hardcover 

If you have a basic knowledge of ML, and you want to dive deep into Predictive Analytics. Then this book is just for you. This book covers both Theoretical and Practical Applications.

Buy This Book.

Best Online Courses On Machine Learning You Must Know

These are some Best Online Courses you should know-

  1. Machine Learning (Coursera)
  2. Deep Learning Specialization (deeplearning.ai)
  3. Machine Learning with Python (Coursera)
  4. Advanced Machine Learning Specialization
  5. Get started with Machine Learning (Codecademy)
  6. Learn the Basics of Machine Learning (Codecademy)
  7. Mathematics for Machine Learning Specialization (Coursera)
  8. Machine Learning Engineer Masters Program (Edureka)
  9. AI & Deep Learning with TensorFlow (Edureka)
  10. Intro to Machine Learning with TensorFlow (Udacity)
  11. Become a Machine Learning Engineer (Udacity)
  12. Deep Learning (Udacity)

For more details, read this article-Best Online Courses On Machine Learning You Must Know in 2020

Machine Learning vs Deep Learning

This is the most common question.


So, the basic difference between ML and Deep Learning is-

ML works properly if you have a small dataset.

But, what if you have a huge dataset?.

ML Algorithms fails to solve a huge amount of data.

So for that Deep Learning is used.

In short, ML can perform on a small amount of Data. But deep learning gives excellent results on a huge amount of data.

One more important difference between the two.

And that is-

In ML, for training the model, you need to pass all the features manually.


In deep learning, you only need to give objects or data, no need to feed features manually. Deep Learning automatically generates the features of objects or data.

If you are confused between ML vs AI vs Data Science vs Deep Learning. Then read this article- ML vs AI vs Data Science vs Deep Learning

Now let’s see in which fields ML is used.

Application of Machine Learning

Machine Learning

Nowadays, ML is growing very fast. Most of the fields are adopting ML.

Here, I am gonna discuss some of the most popular ML applications.

  1. Healthcare- Healthcare is using ML. The use of ML in healthcare is very vast. Healthcare professionals are using ML to detect cancer. They are using ML in Pathology. ML is playing a significant role in the fight with the Corona Virus.
  2. Marketing- In Marketing, ML is used to detect various patterns. These patterns help to increase the sale of the product. Supermarket managers can use ML to find out the different patterns of buying. And with the help of these patterns, they can improve the sale.
  3. Amazone Recommendation System- When you purchase something from Amazon. Then based on your purchase history, amazon recommends you further products. That is because of ML.
  4. Voice Recognition- When you speak to Google Assistant or Alexa. It will act according to your instructions. This happens with the help of ML.
  5. Facebook Facial Recognition- Do you think, how Facebook tags your friend’s name. When you upload a photo. This is because of ML.

Here, I mentioned the few application of ML. But the application of ML is very vast.

Machine Learning Jobs

Machine Learning

Many people are shifting their careers and coming into the ML field. Just because the ML field is very interesting as well as very high in demand. The salary percentage for ML jobs is much higher than in other fields.

In India, Machine Learning Engineer’s average salary is INR 750k per year. And in the USA it is $ 114k per year.

There are various posts in ML.

If you want to know What are the job roles, salaries, and skills required?. Then read this article- Increase Your Earnings by Top 4 ML Jobs

How to Learn ML?

Are you thinking to learn ML?.

If yes, then Congratulations!.

You are thinking in the right way.

The scope of ML is very broad.

but, the next question comes into your mind is how to learn ML.

So, you don’t need to worry.

I have written a separate detailed article on that topic. Read it now- How do I learn Machine Learning?.

This article will show you the path to learning ML.


The ML topic is a very big topic. This is the beginning of our ML Journey. I hope, now you have basic knowledge of Machine Learning.

That’s all about the basics of Machine Learning.

Thanks for Reading!.

All the Best.

Enjoy Learning


Further Reading-

All Machine Learning Blogs

6 thoughts on “Machine Learning”

  1. Y V Ajay Kumar

    Hi Admin,
    Iam following this blog through Quora and twitter. I read most of published posts. You are doing great job by discussing in a simpler way. Looking forward for many posts from you. I support this group by sharing to my friends, ML learners. I need a suggestion from you. I want to learn Natural Language Processing in depth like specialising it. So please help me in finding good resources to learn the same. If possible post articles regarding that in this blog as well.
    Thanks a lot.

    1. Hi,
      Thanks for your appreciation.
      For NLP, you can prefer Udemy, where you will find various courses on NLP.
      This is one course, which I have found, you can have a look

      I will also write an article on NLP very soon.

      Thanks and Regards

  2. Hi, Came across your blog and i must say this is a very very good one. Very clear about the topic and concepts. Keep writting like this… great job …

Leave a Reply

Your email address will not be published. Required fields are marked *