Why Machine Learning is Like Training a Dog

Machine Learning. It's a buzzword we've all heard, but how many of us actually know what it is? After trying in vain to explain to my wife the nuances of neural networks, I arrived at a canine inspired analogy that I hope might help the uninitiated gain a grasp on what this AI thing is all about.

Put simply, machine learning is about training a computer to answer a specific question based on data. 

It's a bit like how you might train a dog. You start by giving it the same instructions over and over, and when it decides (randomly at first) to do what you asked, you reward it with a treat. With enough training, the dog might learn to do different things based on what word it hears.

Machine learning follows the same approach, but instead of a dog, we train a model. The model starts off with no idea about what you want it to do; all it can do is look at some data and output a random answer. The answer could be an action, a number, or simply 'yes' or 'no'.

We train the model the same way we trained the dog - by repeatedly giving it data and evaluating its response. Except, instead of rewarding a correct answer with a treat we give it a score. Every time it gives a good answer it gets a good score, and it begins to change its behaviour to achieve the best score possible.

The maths behind how this works is complex, but the idea is simple. The reason it's called artificial intelligence is because we never tell the model what to do, rather it learns from experience. It sees patterns in the data that help it to know the correct answer.

Coming back to our original definition, if machine learning is about training a model to answer a question based on data, what kind of questions can we ask? The answer is anything, provided it is asked in the right way.

Some real life examples are listed below (see if you can work out the pattern):

  • Based on this pixel data, does this image show a skin cancer?
  • Based on this video data, is there somebody shoplifting at my store?
  • Based on this data about a person's interaction with our app, would they open this marketing email?
  • Based on this data about the weather, how many customers will I have at my restaurant tomorrow?
  • Based on this audio data of a customer's question, which department should they be directed to?

As you've probably noticed, all of these questions start with the words 'based on this data'. Without data, a model cannot exist. All a model knows is the data it's been shown. The more data the model has the smarter it becomes.

That's where big data comes in. By using thousands or even millions of examples, computers can answer these questions even better than humans can. Organisations that can harness their data can use machine learning to answer questions that will help them predict the future, automate manual processes and uncover deep insights.