An introduction to Machine Learning

An introduction to Machine Learning

By | February 1st, 2015
Comments Off on An introduction to Machine Learning

Can machines learn? What does it even mean to learn something? And if

machines really can learn, how can we use that to our advantage?


Machine learning is a term that you are likely to have encountered in increasing frequency in the past few years. It might remind you of a similar term, Artificial Intelligence, and how often it seems more disappointing than exciting to see an Artificial Intelligence (AI) at work.

If someone asked you, are machines intelligent? Can they be? Chances are most people would say no. The problem is with what we expect from Artificial Intelligence. Comparing Artificial Intelligence and human intelligence is like comparing computer and human speed. One can quickly declare that humans are faster than computers because they can run, while a computer just sits there. Artificial Intelligence needs to work with the strengths of computer systems while human intelligence needs to work with the strengths of the human mind. Criticising Artificial Intelligence because it cannot appreciate art is as bad as calling humans unintelligent because they cannot calculate π (pi) to the millionth digit.


Machine Language algorithms can find the boundary, the line, that separates the data that belongs to one category, and data that doesn’t, and then use that to classify future data.

Note that Artificial Intelligence and Machine Learning aren’t two disparate fields of computing, in fact they are closely related.

So when we speak of Machine Learning, we need to likewise account for the differences between humans and computers. Before we talk about what is learning for a computer, let’s look at what learning means for humans. Learning is about gaining knowledge and skills through study or experience. Obviously this isn’t exactly what you’d expect a computer to do, but Machine Learning does come quite close.

What is Machine Learning?

Machine Learning is the about creating computer algorithms that can learn how to make optimal decisions based on models created by processing large amounts of data. A popular example of this that you definitely would have heard of and encountered is the spam filter in email (and other places as well). There is no “formula” for calculating which email is spam and which isn’t. So how does a computer know, how does it calculate the worth of an email?

In this particular case, there is no dearth of data available about what constitutes a spam email and what constitutes a genuine email. People provide this data themselves by marking an email as spam, and less often marking an email as not spam.


Neural networks sound complicated, but are easy to grasp once you know the basics of machine learning. In the above representation, the circles in the input column represents elements of the input, for example bank balance and salary, the lines represent their weights, there can be multiple hidden layers, that apply more weights, and the output is the result.

The spam filter uses this increasing database of spam and non spam emails to develop a model of what a spam email is, and what it isn’t. For instance, a tampered or missing email header might directly qualify an email as spam no matter what its contents and an email from a valid contact might automatically pass through the spam filter even if it is quite “spammy”. In fact the above example falls into a type of Machine Learning called Supervised learning, which we will cover in greater detail later.

Here are a few more examples that might give you an idea of what machine learning is:

• Shopping recommendations on websites like Amazon: These are called recommender systems and they look at data from millions of users to recommend products to users based on their browsing / purchase history.

• Optical character recognition: These systems can convert scanned documents into editable text by detecting characters in the scanned image. Usually these software are pre-trained to recognise scanned documents, but will improve with user

• Voice recognition: Similar to above, voice recognition technologies — such as the ones built into phones these days — include a model for voice recognition that the computer learns by learning relationships between voice and text.

Often such software will continue improving by learning the users specific voice better.
In all these examples, data is a key feature, and the more you have the better. However there is more to it that just throwing more data at a problem. Let’s look a bit at what training / learning is when it comes to machines.

Training with Data

To understand training / learning from data, let’s take the example of a bank developing an algorithm to determine whether to approve a credit card request or not. There is no straightforward formula for this, but perhaps machine learning can help?

The data we can supply to the algorithm is all the data we have about the customer from the form they filled. We know their salary, their home address, their bank balance, whether they own the house they live in etc. We want the algorithm to look at this and tell us whether to approve or deny a credit card. To train this system we will give it data we already have. We give it the above information about previous customers who we already issued a credit card, with an added piece of data that says whether the card should have been approved or denied. The bank can base this information on those people who regularly paid their credit card dues, and those who de

Ashutosh Gupta