I have
$$ J_{\theta}(X) = - \frac 1 m \cdot \left[ y \cdot ln( h_{\theta} (X ) ) + ( 1 - y) \cdot ln ( 1 - h_{\theta}(X) ) \right] $$
I need $\frac d {d\theta} J_{\theta}(X)$. I tried many time, and here's my result
$$ \frac d {d\theta} J_{\theta}(X) = - \frac 1 m \cdot \left[ \frac y {h_{\theta}(X)} - \frac { (1 - y) } { 1 - h_{\theta}(X)} \right] \cdot \frac d {d\theta} h_{\theta}(X) $$
But when I plug in the result of $\frac d {d\theta}h_{\theta}(X)$, I cannot get the expected result, which is
$$ \frac 1 m \cdot (h_{\theta}(X) - y) \cdot X $$
$h_{\theta}(X)$ and its derivative are defined here.