Why are these two quantities proportional?

38 Views Asked by At

I have a simple function $f(\theta) = z$. I plug its result into the sigmoid function $\sigma(z) = \frac{1}{1+ e^-z}$. So far so good. Then I have a function

$$L(\theta) = ln\sigma(z) - \lambda_{\theta}||\theta^2||$$

I want to take the deerivative of $L$ with respect to $\theta$ and I found in a paper that:

$$\frac{\partial}{\partial \theta}ln\sigma(f(\theta)) - \lambda_{\theta}\frac{\partial}{\partial \theta}||\theta||^2 \propto \frac{-e^{-f(\theta)}}{1+e^{-f(\theta)}}\frac{\partial}{\partial \theta}f(\theta) - \lambda_{\theta}\theta$$

So why are these quantities proportional?

1

There are 1 best solutions below

1
On BEST ANSWER

$$L(\theta)=\ln(\sigma(f(\theta)))-\lambda_{\theta}||\theta^2||$$ $$\frac{\partial}{\partial\theta}L(\theta)=\frac{\partial}{\partial\theta}\ln\left(\frac{1}{1+e^{-f(\theta)}}\right)-\frac{\partial}{\partial\theta}\lambda_{\theta}||\theta^2||$$

Taking the partial derivatives of the of the right side:

$$\frac{1}{\frac{1}{1+e^{-f(\theta)}}}\frac{-e^{-f(\theta)}}{(1+e^{-f(\theta)})^2}\frac{\partial}{\partial\theta}f(\theta)-2\lambda_{\theta}\theta$$

The first term comes from repeated application of the chain rule. Simplifying the expression, some of the $1+e^{-f(\theta)}$ expressions cancel out. The last step is just getting rid of the constant $2$ in the second term. From there, you end up with the RHS of the expression in question.