Introduction to Machine Learning for Absolute Beginners

Shrish Last Updated : 23 Feb, 2021
6 min read

This article was published as a part of the Data Science Blogathon.

Introduction

Machine learning.Sounds cool right? When I see those two words, I imagined 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 due, let’s get started.

If you are interested in a career in Data Science and want to start learning these algorithms and techniques with industry-relevant projects check out our Certified AI & ML BlackBelt Accelerate program here.

 

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.

Machine Learning application

Here what do you see?

You can see there are two robots there let’s call them machines in this context and there is 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 than that, 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

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

Machine Learning types

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

Supervised Learning

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, checking is giving a response. If it guesses correctly you replied yes else you replied now. In short, you are supervising chuck to identity 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

Unsupervised Learning

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 classifies 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 on 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.

 

Reinforcement Learning

Let me explain the last remaining topic of machine learning with the help of a picture

Reinforcement Learning

Reinforcement learning is quite tricky to explain. Let me try to explain this with the help of the above example

Imagine you are teaching your dog let’s called it fido to fetch a stick. Each time when fido fetches the stick successfully, you offered him a treat ( a bone let’s say ). Eventually, fido recognized this pattern, and each time when you throw a stick, it tries to fetch it as fast as it can to gain a reward( a bone) resulting in lesser and lesser fetching time.

Well, that’s reinforcement learning in a nutshell.

 

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.

If you like this post, please share your feedback at [email protected]

Shrish Mohadarkar

https://www.linkedin.com/in/shrish-mohadarkar-060209109

The media shown in this article are not owned by Analytics Vidhya and is used at the Author’s discretion.

My name is Shrish. I have been working as a data scientist at EY. I love technology and during my free time, I try to use my skills to create something awesome in python so that it can be shared on the analyticsvidhya platform

Responses From Readers

Clear

Shivi
Shivi

I have no background even in programming world but very much fascinated by ML and AI. Can I learn ML or should I choose for some easier computer science field like java developer or web developer etc. I only know basic programming languages and soon to graduate from college!

Robin Rai
Robin Rai

Ultimate blog, very well articulated, and an easy step-by-step guide on machine learning. Thank you for sharing

Gracia Richlin
Gracia Richlin

The article is so good

We use cookies essential for this site to function well. Please click to help us improve its usefulness with additional cookies. Learn about our use of cookies in our Privacy Policy & Cookies Policy.

Show details