Why is the derivative of -(y log(a) + (1-y)log (1 - a)) = -y/a +(1-y)/(1-a) and not -y/a +(y-1)/(1-a)?
Hello @jchia89
Please check these steps.
To find the derivative of log(1-a) you have to solve d/da of log(1-a) * d/da of (1-a) and so you will get (1/(1-a))*(-1)
Hope my explanation clears your doubts.
All the best
Ah I see! I missed out the d/da of (1-a). Thanks rajat! I was cudgeling my brains and googling like mad ytd night while trying to figure out the discrepancy. Turns out I misunderstood the derivative of log(1-a) and extrapolated from the fact which was committed to memory that d/da log (a) = 1/a to d/da log (1-a) = just 1/(1-a), my bad. Thanks again!
Can someone explain the value of da/dz in Logistic Regression Gradient Descent?
Same here! Please let us know. Thank you.
This is how far I could get:
a= sigmoid(z)
a= 1/ 1 +e^-z
da/dz gives the value a(a-1)
If some one could share the specifics, it would help.
The following reading available in the course clarifies it:
Derivation of DL/dz (Optional)