Introduction to Deep Learning: Machine Learning vs. Deep Learning

Learn about the differences between deep learning and machine learning in this MATLAB® Tech Talk. Walk through several examples, and learn how to decide which method to use.

The video outlines the specific workflow for solving a machine learning problem.

The video also outlines the differing requirements for machine learning and deep learning. You’ll learn about the key questions to ask before deciding between machine learning and deep learning.

The choice between machine learning or deep learning depends on your data and the problem you’re trying to solve. MATLAB can help you with both of these techniques – either separately or as a combined approach.

Video Transcript

Deep learning and machine learning both offer ways to train models and classify data. This video compares the two, and it offers ways to help you decide which one to use.

Let’s start by discussing the classic example of distinguishing cats from dogs. Now, in this picture, do you see a cat or a dog? How were you able to answer that? The chances are you’ve seen many cats and dogs over time, and so you’ve learned how to identify them. This is essentially what we’re trying to get a computer to do: Learn from, and recognize, examples. Also, keep in mind that sometimes even humans can get identification wrong. So we might expect a computer to make similar errors.

To have a computer do classification using a standard machine learning approach, we’d manually select the relevant features of an image, such as edges or corners, in order to train the machine learning model. The model then references those features when analyzing and classifying new objects.

This is an example of object recognition. However, these techniques can also be used for scene recognition and object detection.

When solving a machine learning problem, you follow a specific workflow. You start with an image, and then extract relevant features from it. Then you create a model that describes or predicts the object. On the other hand, with deep learning, you skip the manual step of extracting features from images. Instead, you feed images directly into the deep learning algorithm, which then predicts the objects.

So, deep learning is a sub type of machine learning. It deals directly with images, and it is often more complex. For the rest of the video, when I mention machine learning, I mean anything not in the deep learning category.

When choosing between machine learning and deep learning, you should ask yourself whether you have a high-performance GPU and lots of labeled data. If you don’t have either of those things, you’ll have better luck using machine learning over deep learning. This is because deep learning is generally more complex, so you’ll need at least a few thousand images to get reliable results. You’ll also need a high-performance GPU so the model spends less time analyzing all those images.

If you choose machine learning, you have the option to train your model on many different classifiers. You may also know which features to extract that will produce the best results. Plus, with machine learning, you have the flexibility to choose a combination of approaches. Use different classifiers and features to see which arrangement works best for your data. You can use MATLAB to try these combinations quickly. Also, keep in mind that if you are looking to do things like face detection, you can use out-of-the-box MATLAB examples.

As we mentioned before, you need less data with machine learning than with deep learning. And you can get to a trained model faster, too. However, deep learning has become veryy popular recently because it can be highly accurate. You don’t have to understand which features are the best representation of the object. These are learned for you. But in a deep learning model, you need a large amount of data, which means the model can take a long time to train. You are also responsible for many of the parameters. And because the model is a black box, if something isn’t working correctly, it may be hard to debug it.

So, in general, deep learning is more computationally intensive, while machine learning techniques are often simpler to apply.

One last point to keep in mind. There is a way to combine these two approaches. By using deep learning as a feature extractor and machine learning to classify the features, you can get an accurate and flexible model.

So, in summary, the choice between machine learning or deep learning depends on your data and the problem you’re trying to solve. MATLAB can help you with both of these techniques - either separately or as a combined approach.

Other Resources

What Is Deep Learning?
Explore deep learning fundamentals in this MATLAB Tech Talk. You’ll learn why deep learning has become so popular, and you’ll walk through 3 concepts: what deep learning is, how it is used in the real world, and how you can get started.

Machine Learning vs. Deep Learning
Learn about the differences between deep learning and machine learning in this MATLAB Tech Talk. Walk through several examples, and learn about how decide which method to use.