Machine Learning for Beginners

Original article was published by Unsa Arshad on Artificial Intelligence on Medium

Machine Learning for Beginners

“A breakthrough in machine learning would be worth ten Microsoft.” Bill Gates

Machine Learning allows computers to learn and improve from experience and act accordingly without programming them.

You’re at a party and waiting for your friend. Among a lot of people around, you could easily recognize your friend. This is how a normal human brain works. But have you ever thought how you can train your computer to do the same? One way is that you set some rules that describe your friend’s appearance, for example she has long hair, fair complexion and short height. But these features can fit a lot of people. If we want to program a computer to perform such a task, it would be very difficult. The task of face recognition is very simple for humans but much difficult for computers. Such tasks are called Artificial Intelligence (AI) and one of the techniques that can solve such AI problems is called Machine Learning.

In Machine Learning we do not program the computer and feed the tiny details about tasks, instead we provide it with examples known as Data. Machine Learning creates programs called Models. A machine learning algorithm takes input to train the model. The input can be videos, pictures, music, speech or anything that can be represented in the computer.

There are three types of Machine Learning.

Supervised Learning

It is like a teacher training a student. Here the dataset is the teacher while your model is the student. Whenever a model is trained on examples of input and output, it is called Supervised Learning. The program is provided with labeled inputs and corresponding outputs. Once the model is trained, it provides good results with new data.

For example, we provide the pictures of apples with the label “Apple” and bananas with “Banana”. The algorithm trains the model by adapting the details and plots the input data to corresponding outputs. After training, when you give it a new picture without a label as an input, it will give the output.

Supervised Learning

Unsupervised Learning

It happens at times that we don’t certainly know what the right output is. In such cases, we provide the learning algorithm a set of input data and let it figure out the categories on its own, this is called Unsupervised Learning. The model learns through observations and instead of giving answers it simply groups the similar types of input data. It cannot label them, just separating the different types of samples in input data.

For example, a learning algorithm is provided with pictures of fruits including banana, apple and watermelon. It will find a pattern in uncategorized data and it will give the output by grouping the same kind of fruits together.

Unsupervised Learning

Reinforcement Learning

This type of learning is just like training a dog that gets a treat on doing something good and a punishment for doing something wrong. This involves something like hit and trial. The model trains itself on the basis of positive rewards it gained during the process.

A very famous example of this type of learning is AlphaGo which was a software that made the world champ at the game Go. It used Reinforced Learning and trained itself based on whether it won or lost the games. This is how it learnt the best strategies and beat the professional human Go player.


Machine Learning is the new internet and it is revolutionizing the world. Although there are some dangers associated with it but it has a lot more advantages that is helping us in almost every field of our lives.