Learning Library

← Back to Library

Explaining ML vs DL with Pizza

Key Points

  • Deep learning is a specialized subset of machine learning, which itself is a subfield of artificial intelligence, with neural networks forming the core of deep‑learning algorithms.
  • In a typical machine‑learning model, you assign weighted importance to a few input features (e.g., time saved, weight loss, cost) and use a simple activation function and threshold to make a binary decision, such as whether to order pizza.
  • Deep learning differs by employing *deep* neural networks—multiple stacked layers of neurons—that can learn complex representations automatically rather than relying on a handful of manually weighted inputs.
  • The video uses a pizza‑ordering scenario to illustrate these concepts and suggests viewers explore more IBM Technology Channel content on AI, ML, and deep learning.

Full Transcript

# Explaining ML vs DL with Pizza **Source:** [https://www.youtube.com/watch?v=q6kJ71tEYqM](https://www.youtube.com/watch?v=q6kJ71tEYqM) **Duration:** 00:07:50 ## Summary - Deep learning is a specialized subset of machine learning, which itself is a subfield of artificial intelligence, with neural networks forming the core of deep‑learning algorithms. - In a typical machine‑learning model, you assign weighted importance to a few input features (e.g., time saved, weight loss, cost) and use a simple activation function and threshold to make a binary decision, such as whether to order pizza. - Deep learning differs by employing *deep* neural networks—multiple stacked layers of neurons—that can learn complex representations automatically rather than relying on a handful of manually weighted inputs. - The video uses a pizza‑ordering scenario to illustrate these concepts and suggests viewers explore more IBM Technology Channel content on AI, ML, and deep learning. ## Sections - [00:00:00](https://www.youtube.com/watch?v=q6kJ71tEYqM&t=0s) **Pizza Analogy: Machine vs Deep Learning** - The speaker uses a pizza‑ordering example to illustrate the AI → ML → NN → DL hierarchy, showing how deep learning is a subset of machine learning and building a simple binary‑input model to decide whether to order pizza. - [00:04:03](https://www.youtube.com/watch?v=q6kJ71tEYqM&t=243s) **Deep Learning vs Classical Machine Learning** - The speaker illustrates a simple threshold calculation, then contrasts deep learning—characterized by multi‑layer neural networks that can ingest raw, unlabelled data—with classical machine learning, which depends on human‑engineered features and supervised labeling of datasets. ## Full Transcript
0:01look fair warning if you're feeling a 0:04little hungry right now you might want 0:06to pause this video and grab a snack 0:09before continuing because 0:11i'm going to explain the difference 0:12between machine learning 0:15and deep learning 0:17by 0:17talking about pizza 0:20delicious 0:21tasty 0:22pizza 0:25now before we get to that let's let's 0:27address the fundamental question here 0:29what is the difference between these two 0:32terms 0:33well put simply deep learning is a 0:36subset of machine learning actually the 0:40the hierarchy goes like this at the top 0:43we have a 0:44i 0:46or artificial intelligence now a 0:49subfield of a i 0:52is ml 0:54or machine learning 0:57beneath that then we have n n or 1:01neural networks 1:04and they make up the backbone of 1:07deep 1:08learning algorithms dl 1:13and 1:14here on the ibm technology channel we 1:16have a whole bunch of videos on these 1:18topics you might want to consider 1:20subscribing 1:22now machine learning algorithms leverage 1:24structured labeled data to make 1:27predictions 1:28so 1:29let's build one a model to determine 1:32whether 1:33we should order pizza for dinner 1:36there are three main factors that 1:38influence that decision so let's map 1:41those out as inputs the first of those 1:44inputs we'll call 1:46x1 1:48and x1 asks will it save time by 1:52ordering out 1:53we can say yes with a one or no with a 1:57zero 1:58yes it will so x that equals one 2:02now x two 2:05that input says will i lose weight by 2:08ordering pizza 2:11that's a zero i'm i'm ordering all the 2:13toppings 2:14and x3 2:16will it save me 2:18money 2:19actually i have a coupon for a free 2:22pizza today 2:24so that's a one 2:25now look these binary responses ones and 2:28zeros i'm using them for simplicity but 2:31neurons in a network can represent 2:32values from well everything to 2:35everything negative infinity to positive 2:37infinity 2:39with our inputs defined we can assign 2:42weights to determine importance 2:45larger weights make a single inputs 2:47contribution to the output more 2:49significant compared to other inputs 2:53now my threshold here is five so let's 2:56weight each one of these w1 2:59well i'm going to give this a full 3:02five because i value my time 3:05and w2 3:08this was the will i lose weight 1 i'm 3:10going to rate this a 3 because i have 3:13some interest in keeping in shape 3:16and for w3 3:19i'm going to give this a 2 because like 3:22either way this isn't going to break the 3:23bank to order dinner 3:26now we plug these weights into our model 3:28and using an activation function we can 3:30calculate the output 3:32which in this case is the decision to 3:35order pizza or not 3:38so to calculate that we're going to 3:40calculate the y hat 3:43and we're going to use these weights and 3:45these inputs so here we've got 1 times 5 3:51we've got 3:520 times 3 3:54and we've got 1 times 3:582. 4:00and we need to consider as well our 4:03threshold which was 4:065. 4:07so that gives us if we just add these up 4:101 times 5 that's 5 plus 4:130 times 3 that's 0 plus 1 times 2 that's 4:162 4:17minus 5. well that gives us a total of 4:22positive 2. 4:24and because the output is a positive 4:26number this correlates to 4:29pizza night 4:30okay so that's machine learning but what 4:34differentiates 4:36deep learning 4:37well the answer to that is 4:40more than three 4:42as in a neural network is considered a 4:45deep neural network 4:47if it consists of more than three layers 4:51and 4:52that includes the input and the output 4:54layer so we've got our input and output 4:58we have multiple layers in the middle 5:02and this would be considered 5:04a deep 5:06learning 5:07network 5:09classical machine learning is more 5:10dependent on human intervention to learn 5:13human experts well they determine a 5:16hierarchy of features to understand the 5:18differences between data inputs so if i 5:21showed you a series of images of 5:23different types of fast food like pizza 5:26burger and taco 5:28you could label these in a data set for 5:31processing by the neural network a human 5:33expert here has determined the 5:35characteristics which distinguish each 5:38picture as the specific fast food type 5:40so for example it might be the bread of 5:43each food type might be a distinguishing 5:45feature across each picture 5:47now this is known as supervised learning 5:50because the process incorporates human 5:52intervention or human supervision 5:55deep machine learning doesn't 5:56necessarily require a labeled data set 5:59it can ingest unstructured data in its 6:03raw form like text and images and it can 6:06automatically determine the set of 6:07features which distinguish pizza 6:10burger and taco from one another 6:14by observing patterns in the data a deep 6:16learning model can cluster inputs 6:18appropriately 6:19these algorithms discover hidden 6:21patterns of data groupings without the 6:24need for human intervention and they're 6:26known as unsupervised learning 6:29most deep neural networks are feed 6:32forward that means that they go in one 6:35direction from the input to the output 6:39however you can also train your model 6:41through something called a back 6:42propagation 6:43that is it moves in the opposite 6:45direction from output to input 6:49back propagation allows us to calculate 6:51and attribute the error associated with 6:54each neuron and allows us to adjust and 6:56fit the algorithm appropriately 6:58so when we talk about machine learning 7:00and deep learning 7:02we're essentially talking about the same 7:04field of study neural networks they're 7:07the foundation of both types of learning 7:10and both are considered subfields of a i 7:14the main distinction between the two are 7:16that number of layers in a neural 7:18network 7:19more than three 7:20and whether or not human intervention is 7:22required to label data 7:25pizza burgers tacos 7:28yeah that's uh that's enough for today 7:31it's time for lunch 7:33oh oh and before i go if you did enjoy 7:35this video here are some others you 7:37might also like 7:39if you have any questions please drop us 7:41a line below and if you want to see more 7:43videos like this in the future please 7:45like and subscribe 7:47thanks for watching