A short writeup of gradient compuation for logistic loss function.
\[ \begin{eqnarray} \mathcal{L(y, x, w)} &=& - log{\frac{1}{1+e^{-y*w^Tx}}} \\ \nabla_w \mathcal{L} &=& -\left[1 + e^{-y*w^Tx}\right] \frac{-1}{\left(1 + e^{-y*w^Tx}\right)^2} \left[0 + e^{-y*w^Tx}\right] (-y*x) \\ &=& \frac{-e^{-y*w^Tx}}{1 + e^{-y*w^Tx}} \left(y*x\right) \\ &=& \left[\frac{1}{1+e^{-y*w^Tx}} - 1\right] \left(y*x\right) \end{eqnarray} \]