# chain rule of derivative

### chain rule of derivative

Guys, anyone here good at maths. I have two calculation that I can't work out how they are calculated!
I've attached the pdf of the document and have highlighted the calculation that I can't work out which is located on page 19!

I would mean a great deal if someone could show me how the equation is calculated.

Wm.
Attachments
Highlighted Neural Networks - small.pdf
fiannawarrior

Posts: 5
Joined: Fri Jun 12, 2020 5:28 pm
Reputation: 0

### Re: chain rule of derivative

Was it your intention to make it as hard as possible for people to respond?
If it was- good work!

I first had to open a pdf, something many people refuse to do for fear of viruses. Then I had to search through it for any mention of a "derivative". There was no mention of the "chain rule" but I think you are referring to the derivative of the "Sigmoid' which is given as $$\frac{1}{1+ e^{-x}}$$. (The text has partial derivatives. I don't know why since there is only the variable x.)

To differentiate that, I would write it as $$(1+ e^{-x})^{-1}$$ and think of it as $$z(y)= y^{-1}$$ with $$y(x)= 1+ e^{-x}$$. The "chain rule" then is $$\frac{dz}{dx}= \frac{dz}{dy}\frac{dy}{dx}$$. $$\frac{dz}{dy}= (-1)y^{-1-1}= (-1)y^{-2}= -\frac{1}{y^2}$$ and $$\frac{dy}{dx}= -e^{-x}$$.

So, by the "chain rule", $$\frac{dz}{dx}= \frac{1}{y^2}e^{-x}= \frac{e^{-x}}{(1+ e^{-x})^2}$$.

For some reason, in this paper they separate $$\frac{e^{-x}}{(1+ e^{-x})^2}$$ into $$\frac{e^{-x}}{1+ e^{-x}}\frac{1}{1+ e^{-x}}$$ and write $$\frac{e^{-x}}{1+ e^{-x}}$$ as $$1- \frac{1}{1+ e^{-x}}$$. That is, of course, true because $$1- \frac{1}{1+ e^{-x}}= \frac{1+ e^{-x}}{1+ e^{-x}}- \frac{1}{1+ e^{-x}}= \frac{1+ e^{-x}- 1}{1+ e^{-x}}$$.

That allows them to write $$\frac{d Sigmoid}{dx}= Sigmoid\times (1- Sigmoid)$$.

Guest

### Re: chain rule of derivative

Jesus lads, that's way beyond me. But no, the help I need is with the following calculations on page 19. Namely, how is -3.70644 and 0.15911 are calculated.

Thanks guys.

Wm.

fiannawarrior

Posts: 5
Joined: Fri Jun 12, 2020 5:28 pm
Reputation: 0

### Re: chain rule of derivative

okay lads, I'm offering £20 sterling for the first person that posts a solution! This calculation is holding me back from developing a generic algorithm in Embedded C code for artificial neural network.

PS: this is not for a job but merely my own personal code.

PS: have a look at page 19 on the pdf I've attached. I've attached pdf because MS Word docs can have viruses, also, you will need paypal for the cash transaction.

fiannawarrior

Posts: 5
Joined: Fri Jun 12, 2020 5:28 pm
Reputation: 0

### Re: chain rule of derivative

PS: I also need help in how the following variables are calculated on page 25, namely, -0.8903 and 0.058156.
Thanks guys!

fiannawarrior

Posts: 5
Joined: Fri Jun 12, 2020 5:28 pm
Reputation: 0

### Re: chain rule of derivative

I think I'll leave this for now. Maybe come back to it later.
Thanks anyway guys for having a look.
fiannawarrior

Posts: 5
Joined: Fri Jun 12, 2020 5:28 pm
Reputation: 0