Machine Learning in a Nutshell

Bharadwaj Narayanam
AlmaBetter
Published in
4 min readJul 20, 2021

--

Can machines learn? Yeah, but only if you are a good teacher. At school, we were taught some topics and we were expected to understand them. We were also helped with some sample problems which would be solved by the teacher for our better understanding. A different set of questions from the same topic in an examination, to test our understanding of that particular topic.

What if I tell you, Machine learning works the exact same way! You feed some data to your model, which in Machine learning terms we call training data. And test your model performance on a validation dataset that is completely new to your model.

Photo by Owen Beard on Unsplash

How do you identify if a person is a male or female? There are certain features that are unique for a male or a female. Our brain tries to identify those features, analyse them and comes to a conclusion.

The only difference between an ML algorithm and a human brain is that we think in various different aspects and the algorithm thinks in numbers.

Independent and dependent variables

In the above scenario, gender is the dependent variable. Because you decide that a person is a male or a female depending on various factors. The factors could be anything, the type of dress they wore, voice etc. These factors are called independent variables.

Machine learning is not magic. It is pure math. So every decision a machine learning algorithm takes, has a reason. But sometimes, the reason might be so complex for us humans to understand. In such scenarios, the ML model is called a “black box”.

Supervised Machine Learning

You are given a pile of mixed vegetables and your task is to segregate label them with their names. It will be an easy task for you as you’ve been familiar with vegetables throughout your life and you know the names of them.

The same applies to an ML model. We provide the dependent variable while the model trains so that it can create a relationship between independent and dependent variables.

Unsupervised Machine Learning

Now, what if I put you on a beach and ask you to collect all types of stones, segregate and label their names? Maybe you’re a super-human and would be able to do this, What about me?

I will try to bag similar-looking stones and keep them separately. I don’t know their names, but I know that they are similar. This is Unsupervised learning, where the labels are not present.

Now that we know what is supervised and unsupervised learning, let us understand what is reinforcement learning.

Reinforcement Learning

I don’t know the names of varieties of stones available on the beach. So, I took my friend who is an expert, with me. Each time I pick a stone, He tells me the name of the stone I have picked. Here, I am learning from my experiences. This is called Reinforcement Learning.

We will discuss some methods of supervised and unsupervised learning and leave reinforcement learning for another day.

Classification

You know it by the name. Classification techniques are used when the target variable is Discrete. For example, if we want to predict whether someone is going to default on a loan, we use classification.

Some of the popular classification techniques are Logistic regression and Random Forest classifier.

Regression

Regression techniques are used when the target variable is continuous. When you want to predict the price of a car using different independent variables, you can use regression.

Some of the popular regression techniques are Linear regression and Random Forest regressor.

Classification and Regression are examples of Supervised ML.

Clustering

What do you mean by a cluster? A cluster is something that consists of points that are close enough to each other. This is an Unsupervised ML technique.

Why do we need to make clusters? As we are not provided with labels, we can only divide the data into different groups in which points are similar to each other.

In an X-Y coordinate plane, we can easily measure the distance between the points and classify them into clusters. What about n-dimensional space?

It is impossible for a human brain to imagine anything beyond 3 dimensions. But we can do it mathematically. This is a very interesting topic and itself is worth an article. We’ll discuss this in the upcoming articles.

Examples of clustering techniques are K-means clustering and hierarchical clustering.

What did you like about ML?

References

ALMABETTER

--

--

Bharadwaj Narayanam
AlmaBetter

On a mission of writing 100 quality articles related to statistics and data science.