From the course: Deep Learning: Getting Started

An analogy for deep learning

From the course: Deep Learning: Getting Started

An analogy for deep learning

- [Instructor] Let's use an analogy to understand how deep learning works. We will use this analogy later in the course. Deep learning is a complex and iterative process that requires a series of trials to narrow down the parameters for the model. It starts actually with random initialization of the model parameters and works towards the right values of these parameters by trial and error. In the case of a linear regression model, the model parameters are A and B. The values of A and B form the model that determines the relationship between X and Y. For analogy, let's try to find the values of A and B in the formula, 10 = 3A + B. We will follow a similar trial and error process to narrow down these values. Let's start the trials. We will initialize the values of A and B to a random value. In this case, we initialize both to 1. We then compute the value of Y using the formula, 3A + B. The result is 4. The expected result is 10, though. We end up with an error of 6. Now, we will use this error value to adjust the values of A and B and see if we are getting closer to the expected result. Let's bump A to 4 and B to 3. Now, we have the value of Y to be 15, and an error of -5. We went from a positive error to a negative error, so we will adjust to lower values of A and B. We reduce A to 2 and B to 2. Now, the error has lowered down to 2, and we are getting closer to the results. Let's just change A to 3 and see what happens. The error is -1 now. We are getting closer, but went to the negative side. We now switch the values of A to 2 and B to 3. But the error goes to the other side, to positive 1. We then adjust only B to 4, and we now get an error of 0. So we determined that A is 2 and B is 4 by trial and error. As we do these iterations, we are progressively reducing the error towards 0 as shown in the graph. While the mathematical approach of using sample values and reducing the equation works well with a small number of independent variables, it becomes incredibly complex when the number of variables is really high. Also, the equation may not always provide a zero error, but in most cases, we are trying to minimize the error to an acceptable value. Please keep this example as reference for future videos where we will explore the deep learning process in the next chapter.

Contents