Machine Learning For Beginners

Saad Raees
6 min readFeb 25, 2021

Introduction

Machine learning sounds cool right? When I see these two words, I imagine the movie “Terminator: The rise of the machines” where Skynet had identified humans as a threat and created an army of terminators(T-100 Models) and eventually destroys humanity by creating havoc of nuclear weapons around the world …..

It was a really good movie but it will take us some time to meet a real T-100 for sure.

Here in this article, we will see what exactly is machine learning and why it is so trending nowadays. This article is created for anyone who is just starting to get into the world of machine learning. Consider this as a machine learning guide for NOOBS. At the end of this blog, I have also created a FAQ section to answer some of the common questions about machine learning. So without further ado, let’s get started.

What is Machine Learning?

Before understanding the meaning of machine learning in a simplified way, let’s see the formal definitions of machine learning.

Definition 1:

Machine Learning at its most basic is the practice of using algorithms to parse data, learn from it, and then make a determination or prediction about something in the world. — NVIDIA

Definition 2:

Machine learning is the science of getting computers to act without being explicitly programmed.- Stanford

Definition 3:

Machine learning is based on algorithms that can learn from data without relying on rules-based programming.-McKinsey & Co.

Definition 4:

Machine learning algorithms can figure out how to perform important tasks by generalizing from examples.-University of Washington

All the above definitions are technically sound and those are provided by experts in this field, however for someone who is starting with machine learning, those definitions might feel a little bit difficult. As this is a machine learning guide for noobs, let’s create our machine learning definition in a noobs way.

Simplified Definition of Machine Learning:

Machine learning is the ability of the machine to learn on its own

Wait. That’s it. Is this the definition of machine learning?

Well Yes, in layman’s terms that’s the definition of machine learning. Now how we arrive at this definition, how a machine learns and how it can solve one of the toughest problems in the world, is something we are going to see further down the road.

An explanation for Machine learning

So how machine learning works. Well, let me show you a picture.

Here what do you see?

You can see there are two robots there let’s call them machines in this context and there is a human teaching those machines. Well, that’s machine learning in a nutshell. In machine learning, we do not explicitly code machines on how to solve a particular problem. Rather, we give the machine the abilities so that it can figure out the problem and try to solve it on its own.

Ingredients of Machine Learning

For any machine learning algorithm to function properly, four ingredients are necessary.

1.Data: Input data provided to the machine learning algorithm

2.Model: Machine learning algorithm that we are going to construct

3.Objective Function: Measures how close your predicted output to the actual one is

4.Optimisation Algorithm: a loop of trials

To explain those terms more quickly, I will explain those ingredients while explaining the types of machine learning.

Types of Machine Learning

Depending upon how the learning process takes place for the machine, machine learning is classified into 3 main categories

1.Supervised Learning

2.Unsupervised Learning

3.Reinforcement Learning

NOTE: Here in this post I am going to explain to you about supervised, unsupervised, and reinforcement learning

Supervised Learning

Let’s understand supervised learning with the help of a picture

Let’s assume that the person in this picture is you and the robot is your friend, let’s call him Chuck. You are playing with Chuck’s “Guess the fruit” game. In this game, you will show Chuck some images of fruits, and Chuck in turn will guess what that fruit is.

Now let’s understand supervised learning from the below perspectives:

1.Data: Here in this picture, you are holding some images of fruits, that is your data.

2.Model: Your friend Chuck is our model. Technically model can be anything. It is as simple as an algorithm or a function or regression equation as well.

3.Objective Function: This is something that calculates how close Chuck’s result to the actual result

4.Optimisation Algorithm: After playing this game multiple times you decided to upgrade the CPU, RAM, and Image sensor for Chuck so that it can see images more clearly and due to faster CPU and RAM can process those images faster. Let’s consider those series of steps as algorithms and this is now our optimization algorithm.

Now the question is why this is called supervised learning?

Well, it’s clear from the picture itself. You are showing Chuck images and in turn, Chuck is giving a response. If it guesses correctly you reply yes else you reply no. In short, you are supervising Chuck to identify the fruit correctly which is shown in the image and that’s why the name supervised.

Unsupervised Learning

Let’s understand unsupervised learning with the help of a picture

You and chuck both enjoyed playing the guess the fruit game. However, you have an important office meeting to catch up. In the meantime to keep chuck occupied you give him another game. This time you placed an image having some fruits on the table and told chuck to classify those fruits and you left for the meeting.

Now Let’s understand unsupervised learning from the below perspectives:

1.Data: Image having various fruits

2.Model: Chuck itself

3.Objective Function: Does Chuck classify the fruits correctly?

4.Optimisation Algorithm: –

Since you are in the meeting, Chuck has to play this game on its own. But this time, after seeing those images Chuck got confused about how to classify those. Chuck now got confused and start to do this activity on its own.

Now the question is why this is called Unsupervised learning?

Well, again it’s clear from the picture itself :). Since you are in the meeting, there is no one to supervise Chuck and it needs to figure this out on its own. Lack of supervision and hence this is called unsupervised learning.

One thing you might ask is why I haven’t mentioned anything in the optimization algorithm. The reason for this is that in unsupervised learning since we are not supervising the machine on how to solve our problem, the machine has to figure this on its own and perform its own optimizations.

Machine Learning FAQ’s

1.What is a model in machine learning?

In layman’s, terms a model can be anything. It can be your machine learning algorithm implemented in R or Python or it can be as simple as a mathematical equation

2.Is data necessary for a machine-learning algorithm to function?

Yes, a lot of data is necessary for a machine-learning algorithm to function. Without data, there is no machine learning.

3.Where does machine learning lies in the data science universe?

Computer Science -> Data Science -> Machine Learning

4.When to use which type of machine learning algorithm?

Well, it’s hard to decide. There is no specific answer for this. It entirely depends on the type of problem you are trying to solve. But in a nutshell,

1.Supervised Learning: ex. Regression, Classification

2.Unsupervised Learning: ex. Clustering

3.Reinforcement Learning: ex. Self-driving car

5.Which language to use for building machine learning algorithms?

It is entirely up to you which programming language you want to use. If one programming language offers better functionality than another one, use that. There is no right or wrong.

--

--