No history yet

Introduction to Deep Learning

What Is Deep Learning?

Deep learning is a specific method within the broader field of machine learning. It uses structures inspired by the human brain, called artificial neural networks, to learn from large amounts of data. The "deep" in deep learning refers to the number of layers in these networks. A deep network has many layers, allowing it to learn complex patterns and features from the data step-by-step.

Think of it like recognizing a face. Your brain first processes simple shapes and lines, then combines those into features like eyes and a nose, and finally assembles those features to recognize a specific person. Deep learning models work in a similar, layered way.

Lesson image

This layered approach is what gives deep learning its power. It's the engine behind many modern technologies, from voice assistants and self-driving cars to medical image analysis and content recommendation on streaming services.

A New Way to Learn

The main difference between deep learning and traditional machine learning lies in how they handle features, which are the key characteristics of the data. In traditional machine learning, a human expert must carefully select and engineer these features. For example, to build a model that predicts house prices, you might manually select features like square footage, number of bedrooms, and age of the house.

Deep learning automates this process. Instead of being told what to look for, a deep learning model learns the important features directly from the raw data. If you feed it thousands of images of cats, it will learn on its own to recognize the features that define a cat—pointy ears, whiskers, fur patterns—without any human guidance.

FeatureTraditional Machine LearningDeep Learning
Feature EngineeringRequires manual feature extraction by a human expert.Learns features automatically from data.
Data RequirementCan perform well on smaller datasets.Requires large amounts of data to be effective.
ComplexityUses simpler algorithms like linear regression or decision trees.Uses complex, multi-layered neural networks.
PerformancePerformance can plateau as data size increases.Performance generally improves with more data.

This ability to learn from raw data is why deep learning excels at tasks involving unstructured data like images, text, and sound, where defining features manually would be nearly impossible.

The Building Blocks of Data

To a computer, all data—whether it's a picture, a sentence, or a stock price—is just a collection of numbers. Deep learning models organize these numbers into specific structures. The most fundamental of these is the tensor.

A tensor is simply a container for numbers. Its dimension, or rank, tells you how the numbers are organized.

Let's look at the most common types of tensors:

Scalar

noun

A single number, like 5 or -12.3. It's a 0-dimensional tensor.

A vector is an ordered list of numbers. Think of it as a single row or column in a spreadsheet. It's a 1-dimensional tensor. For example, the features of a single house (3 bedrooms, 2 bathrooms, 1500 sq ft) could be represented as the vector [3, 2, 1500].

v=[321500]v = \begin{bmatrix} 3 \\ 2 \\ 1500 \end{bmatrix}

A matrix is a grid of numbers with rows and columns, like a full spreadsheet. It's a 2-dimensional tensor. A grayscale image can be represented as a matrix, where each number corresponds to the brightness of a pixel.

M=[210205198150145142959188]M = \begin{bmatrix} 210 & 205 & 198 \\ 150 & 145 & 142 \\ 95 & 91 & 88 \end{bmatrix}

Tensors can have even more dimensions. A 3D tensor can be imagined as a cube of numbers, and so on. These structures are the language that deep learning models use to process information.

Representing the Real World

So how do we translate real-world information into these tensors? It depends on the type of data.

  • Vector Data: A collection of patient records could be represented as a 2D tensor (a matrix), where each row is a patient and each column is a feature (age, blood pressure, heart rate).

  • Image Data: Images are typically represented as 3D tensors. The dimensions are height, width, and color channels. For a standard color photo, you have three color channels: Red, Green, and Blue (RGB). So, a 256x256 pixel color image would be a tensor of shape (256, 256, 3).

  • Video Data: A video is a sequence of images. So, it's represented by a 4D tensor: (number of frames, height, width, color channels).

  • Text Data: Text is converted into numbers through a process called embedding, where each word or character is mapped to a vector. A sentence becomes a matrix (a 2D tensor), and a batch of sentences becomes a 3D tensor.

Lesson image

Understanding how data is structured as tensors is the first step in building and training deep learning models. This numerical representation is what allows a computer to "see" an image or "read" a sentence, transforming abstract information into a format it can learn from.

Quiz Questions 1/5

What is the primary difference between how deep learning models and traditional machine learning models handle data features?

Quiz Questions 2/5

The "deep" in "deep learning" refers to what characteristic of the model?