Machine Learning: A Beginner’s Guide

Chaitra Naik
Analytics Vidhya
Published in
4 min readAug 9, 2020
I have taken this image from google.

We know humans learn from their past experiences and machines follow the instructions given by humans. But what if humans can train machines in such a way that they learn from their past data and do what humans can do. Well that’s what is called as Machine Learning. Although it’s not just about learning but also about understanding and reasoning. So Machine Learning is a general term used, when computers learn from data.

A much better definition for Machine Learning would be, it is a subset of Artificial Intelligence that uses computer algorithms to analyze data and make intelligent decisions based on what it has learned, without being explicitly programmed.

Let us understand more about this with the help of an example:

We all love listening to music, but have you ever wondered how does these music apps recommend you the playlist? Well songs are always defined based on intensity and tempo. Let us plot a graph of intensity vs tempo.

So as you can see here on Y axis we have intensity and on X axis we have tempo. Consider a person who loves listening to music which has less intensity and less tempo. So all the dots which are in a light and relaxing area are the dots with less intensity and less tempo. Assume it as area A. The songs having very high intensity and tempo are disliked by the person. Assume it as area B. The area C consists of the dots which have medium intensity and tempo. Whichever songs fall in the A and B category, it is easy to predict that the person will like that song or not. But the songs which fall into the C category, it is difficult to predict. This is where machine learning comes into picture.

The machine here tries to compare the dots between A, C and B. We can see the majority of dots fall in A category, this indicates that the person will like this song. So this is how it predicts whether the person will like the song or not. The prediction will be precise if: More data> Better Model> Higher accuracy.

There are lot of ways and algorithms that machine can learn from. These algorithms can be grouped into supervised, unsupervised and reinforcement algorithms.

Supervised Learning:

In supervised learning an algorithm is trained with labeled data. The more samples you provide to a supervised learning algorithm, the more precise it becomes in classifying the data. Supervised learning algorithms require input-output pairs, that is they require output.

Let’s understand this with the help of an example:

Consider a data containing 1 billion records about coins. The data contains information about 1 dollar, 1 euro, 1 rupee coin and weights associated with it. According to the data, 1 dollar coin weighs 5 grams, 1 euro coin weighs 6 grams and 1 rupee coin weighs 7 grams. Here weight becomes the feature or independent column and currency becomes the label or dependent column.

The machine learns which feature is associated with which label. So if you give any random coin which weighs 5 grams, the output will be 1 dollar. So supervised learning uses labeled data and the machine already knows the features and Labels associated with it.

Unsupervised Learning:

Where supervised learning requires input and output pairs unsupervised learning requires only input. It relies on giving the algorithm unlabeled data and letting it find patterns by itself.

Let’s understand this with the help of example:

Suppose you have a cricket chart with the names of the players with their runs and wickets. So when you feed the data to the machine, the machine will plot a graph.

So here you can see there are two clusters, cluster A and cluster B. Cluster A contains players with more runs and less wickets and cluster B contains players with more wickets and less runs. So these two clusters can be interpreted as batsman and bowlers. Learning with unlabeled data is unsupervised learning since there was no prior label here. You provide the input but not labels and let the machine infer qualities.

Reinforcement Learning:

Reinforcement learning works on the principle of feedback. Suppose you give a car’s image to the machine and the machine returns the output as bike. So here you give negative feedback to the machine. Now the machine learns from feedback and next time gives proper output. So reinforcement learning relies on providing a Machine Learning algorithm with a set of rules and constraints and letting it learn how to achieve its goals.

Thank you so much for reading this blog. If you like it then please give it a clap and share it with your friends, colleagues and family.

--

--