What’s the Difference Between Machine Learning and Deep Learning?

Two core tenets of artificial intelligence are machine learning and deep learning. But what are they and how do they relate to one another? In this post, we’ll find out. 

Machine learning. Deep learning. Artificial intelligence. When you’re exploring the field of data analytics, it’s common to find these terms tossed around like so much data salad. But beyond the buzz, what exactly are machine learning and deep learning? And how do they apply to data analytics? While context determines the impact these fields have on a data analyst’s work, they have many applications in areas such as predictive analytics and data mining. But most importantly, they are thrilling fields in their own right.

In this post, we’ll introduce the concepts of machine learning and deep learning, exploring how they differ and how they’re used. As you’ll soon see, the real question is not what is the difference between machine learning and deep learning, but how do they relate to one another. When you’ve finished reading, you’ll be able to answer:

  1. What is artificial intelligence?
  2. What is machine learning?
  3. What is deep learning?
  4. In summary: machine learning vs. deep learning

Before we get down to the details, let’s contextualize these topics. For that, we need some all-important background. Enter: artificial intelligence.

1. What is artificial intelligence?

The terms artificial intelligence (AI), machine learning, and deep learning are often used interchangeably. In reality, though, they are distinct fields with different features. Let’s start with artificial intelligence. AI is a broad area of scientific study, which concerns itself with creating machines that can ‘think’. Machine learning is a subset of AI, and in turn, deep learning is a subset of machine learning. The relationship between the three becomes more nuanced depending on the context. But for this post, this is a useful way to picture them.

A simple circular diagram depicting machine learning as a subset of artificial intelligence, and deep learning as a subset of machine learning

Attribution: Yakoove,CC BY-SA 4.0, via Wikimedia Commons

Before we get further into machine learning and deep learning, let’s explore AI a bit more.

Artificial intelligence is a term used to describe computer programs that can ‘think’ and learn on their own. Or, in the more succinct words of Demis Hassabis, founder and CEO of AI company, DeepMind: “Artificial intelligence is the science of making machines smart.”

For those new to the field, the term AI may conjure up images of humanoid robots that are aware of their environment, experience human emotions, and can solve problems as a person can. However, this idea mostly comes from sci-fi movies and the occasional doom-mongering scientist who claims that AI will bring about the end of humanity. While AI’s applications are incredible, we are still a way off from a truly ‘thinking’ machine. So don’t fear the robot apocalypse just yet!

What is the purpose of AI?

When we discuss artificial intelligence (concerning data), what we’re really talking about is highly complex problem-solving algorithms. This is not to diminish what AI can achieve… already, it has transformed the way we live and work.

But most artificial intelligence concerns itself with tackling problems that computers are already highly capable at solving. For instance, searching databases and carrying out vast, complex calculations are things that computers do much better than human beings. The purpose of AI, then, is to enhance a computer’s ability to analyze and make sense of these types of data, with minimal human input.

How is AI used?

In the modern world, there are many (relatively prosaic) applications for AI. For instance, the camera in your smartphone uses AI algorithms to identify whether you’re snapping a photo of a person or a landscape. It then adjusts the filters accordingly. Likewise, if you pay for shopping using your phone, the camera uses facial recognition AI for security purposes. Apple’s Siri and Amazon’s Alexa are examples of AI that recognize and interpret human speech. Self-driving cars use artificial intelligence to avoid accidents, while Amazon and Netflix use it to make recommendations about what you might like to buy or watch next. In short, AI is everywhere, and its potential is huge.

How does artificial intelligence relate to data analytics?

While artificial intelligence and data analytics are two distinct fields, they share a great deal in common. This is primarily that they both work with big data. AI techniques, like machine learning, are often used to solve data analytics problems, to make predictions, and to support data science more broadly.

For instance, predictive analytics often relies on machine learning algorithms such as decision tree or cluster analysis. AI is also used for knowledge discovery in areas like data mining. This is why you’ll often come across the terms AI, machine learning (and to a lesser extent, deep learning) in relation to data analytics and data science. You can learn more about the different types of AI here.

Now we’ve covered the basics of AI, let’s dive in a bit to explore machine learning and deep learning in more depth.

2. What is machine learning?

Machine learning algorithms are those that learn and improve without being explicitly programmed to do so. The field first emerged in support of the wider quest for artificial intelligence. ML algorithms work by ingesting large amounts of raw data. They then parse that data (i.e. break it down and analyze it) to spot patterns. Based on what they observe, they can then make predictions or informed decisions. Machine learning is commonly used to conduct tasks that would be impractical for humans.

You may be interested in this webinar we held with CareerFoundry’s own senior data scientist, Tom Gadsby:

What are some examples of machine learning?

The most common example of machine learning is email filtering. By learning to spot the characteristic traits of spam emails (e.g. the types of words used, the tone of the language, the sender’s email address, and so on) an algorithm learns to identify which emails are spam. It then sends these to your junk folder.

But machine learning’s uses go far beyond this common application. It can be used in a wide range of industries for any number of tasks. From search engines to financial analysis, robotic locomotion, and even DNA sequencing. if you can imagine it, then machine learning can support it.

With so many applications, there are many machine learning algorithms out there. Luckily, to make life simpler, these can be divided into three broad categories (or “paradigms”):

  • Supervised learning
  • Reinforcement learning
  • Unsupervised learning

What is supervised learning?

As I walk down the street with my young nephew, I may point out examples of red cars to him. With my supervision and guidance, my nephew learns which cars are red. He can then point out red cars all on his own, without my help. This is a form of supervised learning.

A supervised learning algorithm works in much the same way, by ingesting training data that has been labeled (just as I ‘label’ the red cars for my nephew). Using this labeled data, the algorithm infers a relationship between input objects (e.g. ‘all cars’) and desired output values (e.g. ‘only red cars’). When it encounters new, unlabeled, data, it now has a model to map these data against. In machine learning, this is what’s known as inductive reasoning.

Like my nephew, a supervised learning algorithm may need training using multiple datasets. Supervised learning algorithms also rely on human input to tweak and refine them as necessary, for example, when they make mistakes.

What is reinforcement learning?

When my nephew is well-behaved and goes to bed on time, I reward him by reading him his favorite bedtime story. Over time, he learns that certain ‘good’ behaviors lead to a ‘reward’ (i.e. a bedtime story). Meanwhile, he also learns that ‘bad’ behaviors result in a ‘punishment’ (or no bedtime story.)

Once again, reinforcement learning works in much the same way, using intelligent algorithms that learn as they go. Unlike supervised learning, reinforcement learning does not use ‘correct’ or ‘incorrect’ outputs that have been pre-labeled. Instead, it explores an environment or dataset and measures its actions as it goes. Using predefined behavioral parameters, it assigns itself ‘rewards’ or ‘punishments’ based on its actions. Just as my nephew pushes the boundaries of what is acceptable, a reinforcement learning algorithm scores its own behavior to maximize rewards. Over time, this reinforces behaviors that statistically lead to ‘success’.

This approach is excellent for helping intelligent algorithms learn in uncertain, complex environments. It is most often used when a task lacks clearly-defined target outcomes.

What is unsupervised learning?

While I love helping my nephew to explore the world, he’s most successful when he does it on his own. He learns best not when I am providing rules, but when he makes discoveries without my supervision.

Similarly, unsupervised learning algorithms ingest data that has not been pre-labeled. Instead of being told which factors are important (such as ‘these cars are red’), an unsupervised learning algorithm aims to carry out this process on its own. By ingesting large amounts of unlabeled data, algorithms can learn to identify patterns without external support. In machine learning, this is known as self-organization.

Unfortunately, unsupervised learning is not used as commonly as supervised learning for one simple reason: it requires a much greater depth of understanding on the part of the machine. My nephew, with his rich network of biological neurons, has evolved to be excellent at making sense of the world without guidance. Unfortunately, most machines are less well-equipped to do this and work better with human input.

To get around this problem, machine-learning engineers sometimes use what’s known as semi-supervised learning. This combines a small amount of labeled data with large amounts of unlabeled data. The aim is to help algorithms improve their level of learning accuracy, with minimal human input.

The holy grail of machine learning is an algorithm that can learn, unsupervised, entirely without human input. This is not something we have yet achieved. However, it is tantalizingly within reach. And this is where deep learning comes in.

3. What is deep learning?

The ultimate goal of AI is to create a machine that can think and solve problems entirely on its own. This would have a great many potential applications, from image processing and medical diagnostics to automatic speech recognition (universal translator, anyone?)

While we’re some way off from machines that can think for themselves, the emerging field of deep learning has many people very excited. But what exactly is deep learning and why is there such a buzz around it?

Deep learning is a subset of machine learning that mimics the workings of the human brain. It analyzes data by using a logic structure similar to how a person would solve a problem. This is very different from traditional machine learning techniques, which use binary logic and are limited in what they can do. Instead, deep learning uses a layered structure of algorithms known as an artificial neural network.

Certain tasks, such as recognizing imagery (for instance, the sketch of an elephant) are easy for humans to do. For computers, though, these tasks are much more challenging. In a multi-layer neural network, information is processed in increasingly abstract ways. But by combining information from all these abstractions, deep learning allows the neural network to learn in a way that is much more similar to the way that humans do.

The progression from very simple sketch to a detailed image of an elephant

Attribution: Sven Behnke,CC BY-SA 4.0, via Wikimedia Commons

To be clear: while artificial neural networks are inspired by the structure of the human brain, they do not mimic it precisely. This would be quite an achievement. It currently goes far beyond our capabilities.

At its present stage of evolution, deep learning still requires a combination of supervised, semi-supervised, and unsupervised learning. The ultimate goal, though, is a neural network that requires no supervised input. While neural networks are highly complex, if we can perfect them, then they have the potential to solve a wide range of human problems. One day in the future they may even lead to computers that can think completely for themselves. We’re not there yet…but watch this space!

What are some examples of deep learning?

The best example of deep learning is DeepMind’s AlphaGo. This computer program was designed to learn how to play the abstract strategy board game, Go. By playing against numerous professional players, AlphaGo quickly learned to master the game. It learned so well iteven beat the world champion.

Despite AlphaGo’s achievements, a game-playing computer does not have very many applications in the real world. But what it does show us is the potential of deep learning. To illustrate this, more recently, DeepMind has applied the same technology to one of biology’s most challenging problems, known as the protein-folding problem.

Essential to all aspects of biology, proteins underpin life as we know it. Understanding how they fold—a key step towards unlocking their secrets—would be a great scientific advancement. Unfortunately, this understanding has evaded scientists for over half a century. That is until DeepMind created AlphaFold, a program that learns to predict protein structures. In November 2020, AlphaFold made a huge breakthrough bysolving the protein folding problem (sort of).

While this is an isolated example, the underlying principles of deep learning mean that many believe it is the first type of machine learning technique that could lead to truly functional unsupervised learning. The potential, as we can see, is limitless.

4. Machine learning vs. deep learning in summary

In this post, we’ve delved into the fascinating world of artificial intelligence, machine learning, and deep learning. We’ve looked at how these concepts relate to one another, and what their differences are. We’ve learned that:

  • Deep learning is a subset of machine learning (which itself is a subset of artificial intelligence).
  • Machine learning algorithms learn and improve on their own, without being explicitly told what to do.
  • Deep learning is a complex form of machine learning that aims to mimic the way neurons work in the human brain.
  • Traditional machine learning techniques use algorithms that parse data, spot patterns, and make decisions based on what they learn.
  • Deep learning uses algorithms in abstract layers, known as artificial neural networks. These have the potential to allow machines to learn entirely on their own.
  • Machine learning and deep learning are used in data analytics. In particular, they support predictive analytics and data mining.

Given the speed at which machine learning and deep learning are evolving, it’s hardly surprising that so many people are keen to work in the field of AI. To discover how a career in data analytics could be your first step into artificial intelligence, try our free, five-day data analytics short course.

You can also read more introductory data analytics topics:

What You Should Do Now

  1. Get a hands-on introduction to data analytics and carry out your first analysis with our free, self-paced Data Analytics Short Course.

  2. Take part in one of our FREE live online data analytics events with industry experts, and read about Azadeh’s journey from school teacher to data analyst.

  3. Become a qualified data analyst in just 4-8 months—complete with a job guarantee.

  4. We’re offering two scholarships celebrating Women’s History Month to the first 100 applicants—worth up to $1,615 off all career-change programs 🙌 Book your application call today!

What is CareerFoundry?

CareerFoundry is an online school for people looking to switch to a rewarding career in tech. Select a program, get paired with an expert mentor and tutor, and become a job-ready designer, developer, or analyst from scratch, or your money back.

Learn more about our programs