What is machine learning?

Paul Felby
5 min readAug 11, 2017

--

With machine learning becoming increasingly present in the media, you probably ask yourself: “what is it and how does it work?”

“Machine Learning gives computers the ability to make predictions or decisions based on learning’s they have made from data.”

Don’t worry; we won’t be diving into any mathematical theory! Instead, I will show you a simple example where I will do my best to help you understand how machine learning learns at a very basic level.

I seem to be answering this question several times a week, and I think I have come up with an ok way to answer it.

Let’s get started; most machine learning algorithms exist to achieve the following:

  • Predict the probability that something will happen
  • Predict an answer; maybe the price of something
  • Classify some data; positive or negative sentiment in some text, maybe a client at risk, or even facial recognition

But the question is: how do they achieve this?

Well, if I asked you the following “how much is a carton of milk in (put here a town that you have not visited)?”

Ok, so how much do you think the milk will cost in that town?

Hopefully you had a guess, most likely an educated guess. What did you take in to account when you made your guess?

  • the population of the town?
  • what you think the average income is?
  • the larger area | county | state that the town is in?
  • some other details?

In the field of Machine Learning, a Data Scientist would call these ‘features’.

Of course there are many other things that could affect the price of milk, such as the cost of a cow, farmland rent etc, and generally, the more data points you have, the better your machine learning algorithm will be. However, adding this level of information will not change the fundamental way that machine learning works, and is therefore not necessary for this example.

What have you just done? You have predicted an outcome, based on data that you have learned throughout your life. You decided what features would influence the price of milk. Then, even if you don’t know it, you created an algorithm in your head that would use these features. Finally, you applied this algorithm, and you came up with a price prediction.

Well, thats how machine learning works.

You can apply many different types of machine learning methods to datasets. Most have cool names that leave you thinking its some kind of magic:

  • Logistic regression
  • Random Forests
  • Decision Trees
  • Neural Networks

Inside these machine learning techniques, data scientists may talk about one hot encoding or hyperparameters. Again, leaving most of their audience baffled.

But what is machine learning really doing?

Given a dataset, when you apply a machine learning technique, you will be attempting to perform the same operations as you did when you guessed the priced of milk.

Lets say for example that you have a spreadsheet with the following columns in it:

  • country
  • town
  • population
  • average temperature
  • average age
  • average income
  • price of a pint of milk

You could apply a machine learning technique to this dataset. It will learn the factors or features in your set of data that will effect the outcome you are trying to predict, in this case the price of milk. It will also tell you the factors or features that will not have any effect on the price of milk.

The result will be whats called a “model”, which is an algorithm created by machine learning, that will be able to predict the price of milk.

During the training of the model, it told us that all it needs from the dataset that you have supplied is the following columns:

  • Town
  • Population
  • Average income

The other columns did not effect the price of milk.

We now have a model which we can pass the three parameters above; town, population, average income, with values that it has never seen before. When we do, it will give us back a prediction for the price of a pint of milk.

That’s it.

As you can imagine, the strength of machine learning is most prevalent when given a huge set of data with billions or trillions of data points for it to learn from, thats one of the reasons why you are hearing about big data so much.

You may be thinking, well this is all fine, but predicting the price of milk is easy, what about facial recognition and other wonderments? thats not in a spreadsheet! Well, it still uses the same techniques. Here are some simple steps machine learning may take to achieve facial recognition:

  • a human supplies a computer with thousands of images of people showing one particular emotion
  • the machine learning algorithm receives the images, and turns them in to numbers (you can for example represent each pixel in the image with a numerical value of its colour or contrast)
  • it will now, using similar techniques as already explained to learn the common patterns that occur when a human is showing this emotion
  • when the algorithm has finished learning, you will now be able to pass it an image, and it will try and predict whether they are showing the emotion that it has learned to identify

I hope you enjoyed this very basic explanation and maybe it gave you an initial understanding of what Artificial Intelligence and Machine Learning are about.

Feel free to comment if you found my explanation helpful, or any suggestions on how it can be improved. Or, if you feel like it, just give me some abuse, it is the Internet!

--

--