Hello.
Welcome back.
In this lesson we are going to give a short revision of calculus.
This will help you to be able to picture back propagation and gradient descent more easily in future
lessons.
You do not need to understand calculus to work with deep learning.
In fact out say majority of the people working with deep learning nowadays don't even understand the
calculus behind the back propagation and gradient descent apart from the hard core researchers.
Of course so let's begin
this function over here says F of equals 3 A.
This means we get a result of the function f of E by multiplying the number three by whatever the value
of is.
In this graph.
Over here the x axis represent a
the x axis represent a and the y axis represents the values for F of E.
For example let's say a equals to
then F A is going to be six.
Since we multiply 2 by 3 to get F of E as we have over here all right.
And for example let's say we increase a by a tiny amount an amount such as zero point zero 0 1 if we
increase a base viewpoints for a short one and we compute f a.
This is what we get we get six point church or three since f of E equals three because we are going
to perform three more to play by two point zero to one right.
We can realize that whatever it is F of a is three times that value.
When we plot our value and our correspondent f of a values this is what we get we get this graph over
here as you can see we've got two here we increase we get two points you sure one we've got six here
we increase we get six points or two or three close when we increase this when we compute f off two
points which are one We get six points for short three right we can compute the slope of F of a bi divide
into vertical change by the horizontal change over here we have named the vertical change height you
can see height and the horizontal change has been named as with and this is the height zero point zero
three the width is your points which are 1 when we perform this division we arrive at the answer 3 as
we have over here and is the same thing we get over here.
This is often referred to us the F E over d e f of e of a D E and this is how we write it d e f g over
D E and we get 3.
Also I should point out that you don't always need to plot a graph in order to compute the functions
we should define basic rules for finding derivatives later on in the lesson.
Let's take a look at another example.
Over here we have a function Y equals X squared right.
Another way to find the derivative is the change in y over change in x which is the same thing as what
we spoke of earlier but we can write it as Delta Delta to represent change.
So delta y over delta x over here we have a number of x values in the corresponding y values from this
graph.
If x is 1 given our equation Y equals X squared then Y will still be a y will be 1.
Also if x is 3 y will be 9.
If we find a delta x meaning the change in x we get to if we find a Delta why the change in Y.
We get 8 if we perform delta y over Delta 2 we get for this is that there effective delta y over delta
x 8 divided by two equals four.
Right now let's take a look at some routes of derivatives the power to state star to find a derivative
of a function x rated a power n.
The answer becomes.
And times X reached the power end minus one.
If N equals zero then then the derivative is zero because that they're effective of a constant is equal
to zero.
Right.
If we want to find the derivative of a constant a multiplied by a function f of x we can find a derivative
of the function f effects and then multiply the answer by the constant a derivative of a function f
of x is also sometimes written us f prime of X prime.
Is this apostrophe sine you have up here.
So that's another way of writing the derivative.
D derivative of the sum of two functions f of x and f of T is equal to D.
Derivative of F of X plus the derivative of F of G as we can see shown in these two examples over here.
Right.
You can post a video and take a look at the examples we already mentioned the derivative of a constant
equals zero.
Right.
The derivative of a function multiplied by a constant equals the derivative of the function only then
multiplied by the constant.
So if we have the function multiplied by a constant and we want to find a derivative we first have to
find a derivative of the function alone and then it would multiply the answer by the constant.
The difference rule works the same way.
Like the sum rule and we've already seen the same rule we set the m the derivative of the sum of two
functions f of x plus G of X equals that derivative of F of X plus the derivative of G F X and a differential
works exactly the same way as the sum rule the product to over here says the derivative of the derivative
of the product of two functions is equal to D derivative of the first function multiplied by the second
function plus defense function multiplied by the derivative of the second function the derivative of
sine X equals cause X and the derivative of course X equals minus sine X right.
And the derivative of each less constant e raised about X is the same thing E ratio part X the chain
rule is the one group that is heavily applied in back propagation.
It states that we apply the chain rule by multiplying the derivative of the outside function by the
inside function.
It is often expressed as D X equals DFT y dot do Y D X let's say we want to find the derivative of a
function over here that they're a victim of this function brackets open three x plus two X squared brackets
closed or squared.
We first find the derivative of the entire function which gives us 2 x brackets open 3 x plus 2 x squared
brackets closed and once we've done that we have to find the derivative of the content inside the front
inside a bracket.
And that gives us 3 x plus 4 x.
So first we find the derivative of the entire function.
And then we've multiplied by the derivative of the constant in the brackets.
Only remember the entire function is bracket open three x plus two X squared brackets close squared.
That is the entire function.
The content of the frac the content of the bracket only is three x plus two X squared.
So entire function derivative multiply by content of bracket derivative.
That is the chain rule right.