fbpx

Machine Learning Vs Deep Learning: a Newbie-proof Overview

deep and machine learning

I will start this article with a giant spoiler: machine learning and deep learning are not the same things.

“Thanks, Captain Obvious!”

Second spoiler of the day? Not so obvious, I swear.

Actually, just as machine learning is a subset of AI, deep learning is a subset of machine learning.

We can see it as machine learning 2.0, to some extent.

Why? Well, let me offer you a brief overview of their main common traits and biggest differences.

But before that, I’m gonna introduce our two buddies.

ai and ml and deep learning

Let’s start with Machine learning

Machine learning (ML) is a branch of AI.

It provides systems the ability to automatically learn from sets of data and improve from experience without being explicitly programmed.

Instead of writing the code, data is entered into a generic algorithm and this algorithm inductively recognizes possible patterns and relations (usually in the form of mathematical functions).

After that, it builds a model based on the samples provided, which can help us make predictions about data.

 

Supervised and Unsupervised learning

We can follow different approaches to teach and train our system.

The main ones are supervised learning (the most common in traditional machine learning) and unsupervised learning.

 

Supervised learning

teaches machines by feeding them with previously classified samples (labeled data), already having the idea that there is some kind of relationship between the input and the resulting output.

Labeled data has been annotated with one or many labels, which can indicate for example if a photo contains a car or a person (image annotation), what the topic of an essay is (text classification), etcetera.

This reminds me of my mother who labeled a million slides and then forced all relatives to watch them for hours, sitting in front of the projector.

What a terrifying torture.

 

Unsupervised learning

On the other hand, is used in case of data without previous classification.

We just have a big mess and ask the algorithm to find some logic in it.

If the big mess in your life, it won’t help you. Sorry, mate.

 

What about Deep learning?

We can see deep learning (DL) as ML’s younger and more promising brother.

It mimics the mechanisms of the human brain to process information by using deep artificial neural networks.

Wait! Never heard about neural networks?

Briefly, a neural network consists of interconnected layers of units called artificial neurons, which send data to each other through connections called edges.

 

If it’s deep, there must be a reason

The term “deep” is our key to understand the main structural difference between this kind of learning and machine learning.

In fact, it refers to the number of layers that are hidden deep in the networks: traditional neural network can be composed of few hidden layers, while deep networks contain more than a hundred hidden layers.

So… no Cthulhu or other Lovecraftian stuff involved.

Every level of the network provides a different interpretation of the data it conveys, and the complexity of this multilevel structure computers to handle incredible tasks. For example, speech recognition and artificial vision.

deep neural networks

The main difference: autonomy

The peculiar structure of deep learning neural networks determines the main distinction between deep and machine learning: a different degree of autonomy.

In fact, machine learning models progressively improve but still need some guidance.

Firstly, they must be trained on data previously classified by humans.

Secondly, if a machine learning model elaborates an inaccurate prediction, a human programmer will have to fix that problem.

On the other hand, a deep learning model does it by himself.

 

Machine learning, dogs, and cats

We can clarify this point with a little example related to image recognition.

Before being able to recognize a dog or cat in a photo, an ML-based system must be previously fed with structured data (the labeled samples we mentioned before).

In this way, it understands how to classify the new data according to the type.

Practically, this means that developers will label the images of dogs and cats in order to determine the characteristics of both animals.

These data will be necessary to train the ML algorithm, which later will be able to go on on its own.

Even after this phase, the algorithm will need its creator’s lovely care, as a 40 years old Italian “child” who needs the lovely care of his mama.

In fact, it will be necessary some kind of human feedback and optimization to indicate any incorrect and correct classifications to the system.

 

Deep learning doesn’t need your help

Deep learning follows a different approach.

It doesn’t need structured/labeled data of the pictures to classify cats and dogs.

Its deep neural networks send inputs through different layers of the network, each one defining specific features of the sample images: the size of the animal, the colors and pattern of the fur, the cat’s human slave in the pic, etcetera…

After the data is processed, our system finds the appropriate identifiers for classifying both animals.

Deep learning networks can even learn from their mistakes and automatically correct themselves without human intervention.

However, this won’t work so well if the data quality isn’t good enough.

 

ML and DL applied to the real world

Considering what has been said so far, deep learning seems to be the go-to solution for any kind of situation.

Well, no.

For sure, ML-based systems are not suitable for solving complex problems that involve a huge amount of data. That’s because machine learning algorithms require labeled data. 

Do you really want to manually label millions of samples? I mean, It’s still shorter than my usual binge-watching on Netflix, but definitely less funny.

Instead, Deep learning is more suitable for performing this kind of calculations, given its ultra-intricate and high-performing structure.

 

DL performances come at a cost

However, deep learning requires much more data than a traditional machine learning algorithm (hundreds of millions, possibly).

The reason is that deep learning systems can recognize different elements in neural network layers only by having millions of data samples at their disposal.

In addition, Deep Learning technology is more complex to implement.

It requires more IT resources (GPU or graphics processing unit) and is much more expensive than Machine Learning.

So at the moment, it is not convenient for most companies.

 

Main fields of application

Taking into account the pros and cons just described, ML and DL give their best in different contexts, but can also be used in the same fields for specific tasks.

Traditional machine learning, among many things, is pretty common in marketing to keep track of large amounts of data and make reliable assessments.

We can also find it in online sales to successfully predict which products and services customers will potentially be interested in.

Instead, deep learning is widely exploited by digital assistants such as Siri, Alexa, and Google. Users can ask verbally to send e-mails, place orders, perform searches…

 

Chatbots: ML, DP, or pure evilness?

Chatbots are an interesting “hybrid” case. They can be based on Machine Learning, focusing on the keywords contained in the user’s requests, or they can be powered by deep learning systems.

In this last case, they won’t need specific keywords to understand natural human language, the dialogues will be much more effective and the solutions offered will be more precise.

Anyway, considering the level of frustration that chatbots usually provoke, I still think they are powered by some sort of demons.

Just my two cents…

ai burn

Conclusions

Machine and deep learning, although related, show substantial differences. Deep learning is undoubtedly more modern, performing, and, in general, superior in many ways.

But this does not mean that traditional machine learning may not be the most convenient choice in many situations.

Deep learning is a shining and wonderful Ferrari: the car of your dreams until you have to write the check or fill up the tank! 😉