Machine Learning is spreading into every sector of business. It is the new industrial revolution. Any economy that wants to remain competitive in the near future will need a lot of software developers with Machine Learning expertise. It has led to breakthroughs in medicine, art history, cars, finance, and more. But what is it? And how does it work?

Simply put Machine Learning is the ability for machines to learn a behaviour it was not specifically programmed for. And it is often used to make predictions based on a large amount of data.

Tom M. Mitchell, the author of the book Machine Learning wrote a widely quoted formal definition:

“A computer program is said to learn from experience E with respect to some class of tasks T and performance measure P if its performance at tasks in T, as measured by P, improves with experience E.” – Tom M. Mitchell

So to make machines learn we need to give it some experience (E), which often is a very large set of data, for example 60 000 images of handwritten digits. Then we need to define one or more tasks (T) that the machine should learn, for example recognize handwritten digits. And finally we need to measure  the performance (P) of the machine. In our example we need to measure how accurately it can recognize the handwritten digits. For this we use a cost function.

The key to successfully apply machine learning to a problem is to correctly analyze the task and use the right type of machine learning algorithm for your problem, as well as defining a meaningful and quantifiable cost function.

Most machine learning tasks are either classification tasks or regression tasks. Classification categorizes an input into a predefined discrete category, while regression predicts a continuous output. Recognizing handwritten digits is a classification task. Predicting housing prices based on historical data is a regression task.

Machine learning algorithms can be divided into different types of learning:

  • Supervised Learning
  • Unsupervised Learning
  • Reinforcement Learning

In supervised learning the algorithm is given a training set of data with labels. In our digit example it will be given 60 000 images of digits together with labels that says which digit category (0-9) each of the images belongs to.

In unsupervised learning the algorithm is only given the data, without any predefined labels or categories. Google news is an example of unsupervised learning where it groups together news articles that it thinks are related to the same story.

In reinforcement learning the algorithm receives reward/punishment for actions that it is performing in a dynamic environment, such as driving a car or playing a game against an opponent.

A key difference between traditional programming and machine learning is that in machine learning the answer is never definite. The machine learning algorithm will tell you “this is probably the right answer” with some measure of accuracy. This opens up possibilities that are not obtainable with a strictly True/False perspective of the world.

In the movie I, Robot Detective Del Spooner (Will Smith) asks rhetorically if a robot can write a symphony or create art. If this question intrigues you you might want to check out the DeepBach project which uses machine learning to write music in the style of Bach. Or have a go at art yourself with this intermediate level tutorial on creating art with Deep learning through neural style transfer. While those examples are not quite a symphony or art from a blank canvas they are certainly fascinating examples of the direction we are headed.

Have you seen another fascinating application of machine learning? Please share with us in the comments!