A simple introduction to machine learning


At a high level, machine learning is about trying to make programs that learn from experience. The aim is for the program to perform better when presented with information that’s similar to the experience. Why would we want to do this? Well, it turns out that there’s a lot of problems which we can’t solve with normal programming! What exactly does this mean?

With conventional software engineering, we invent a series of instructions (aka an algorithm) which transform inputs into given results. For example, the program below will count how many vowels are in a given word or sentence. You can click the ▶️ icon to run it

However, suppose you wanted to make a program that could categorise all the different species of life. How exactly would you do this? There are approximately 8.7 million species, what algorithm could you write for this? It doesn’t seem so straightforward. This is where machine learning comes in! Instead of worrying about writing a rule for each one, we instead create a model. What’s a model? You can think of a model as being a special kind of program which has been created using experience. We  call this experience data. In our image classification example, each piece of data would be made up of two parts: a picture and it’s label. For example:

Intuitively, our approach gives the same kind of information we’d use if we were teaching a child what a new animal was. Unlike a human being who can recognise a tiger from a few prior examples, our model would need to see multiple images of tigers to really learn. This would apply to every kind of species we wanted our model to classify. Once we had finished training (showing our model all the different examples), we would have a model that we could then use like a normal program. So, we could give it just the image alone (without a label) and boom, we’d get the wolf classification. All without writing a specific rule for how a wolf looks like!

This is phenomenal! We’ve basically used data (images) to create a model (special program) that can then gives us results (classification) without having to write down a specific algorithm from scratch. This approach can be used to solve a whole variety of problems which is why machine learning is truly a game-changer in how we create solutions using computers.


There are multiple other ways in which machine learning are applied and practioner are always developing new algorithms. Recommendation systems use machine learning to help personalise products: Spotify personalises the music shown on each users home page, Amazon tailors items which you’ll most likely buy and Youtube shows videos which match your interests. Computer vision is used in multiple domains from Tesla’s autopilot for it’s self driving cars to maximising employee safety to robot powered package delivery and even applying artistic styles to an image.

With reinforcement learning: Deepmind has conquered the games of Go, chess and shogi with an agent that plays itself whilst Google has reduced it’s energy consumption by 40%. With natural language processing, OpenAI has made incredible progress with text generation which has unlocked a myriad of novel applications for users of it’s GPT-3 interface whilst Microsoft’s Swiftkey makes typing on phone keyboards much more convenient using word prediction. These are just some of the ways machine learning – ML – is being used today. If you want to see more examples, this article has much greater coverage.


To ground our understanding of machine learning, it’s helpful to have some context. Does it have anything to do with artificial intelligence? Yes it does! Artificial intelligence is the field concerned with creating machines that exhibit intelligence. The aim of the filed is to manifest artificial general intelligence, a form of intelligence that is akin or even surpasses human intelligence. How do we achieve this? At present, there are different approaches to achieving this lofty vision and machine learning is one such approach. Therefore, machine learning is a subfield of artificial intelligence which uses algorithms which use experience/data to improve their performance.

How does this relate to deep learning? It turns out that deep learning is a subfield of machine learning which uses a particular type of machine learning structure – neural networks – for learning. Neural networks are made of layers which process data. The deep in deep learning refers to stacking these layers to make a multilayer structure. It’s almost like creating a multilayered cake except that with neural networks, you can potentially have 100s of layers! Most of the most cutting edge applications of machine learning tend to use deep learning based algorithms in combination with other classical machine learning algorithms.


I hope you’ve enjoyed this introduction to machine learning and seen how data is the secret sauce to a new way of problem solving using computers. I also hope you’re more aware of how artificial intelligence and deep learning are related to machine learning. Enjoy the fun music video below which broadly covers some of the concepts introduced above. I hope it inspires you to make the data lit in your own machine learning and artificial intelligence journey.

Bookmark the permalink.