Let $J(\theta) = \theta^3$. Furthermore, let $\theta = 1$ and $\epsilon=0.01$. You use the formula

$(J(\theta+\epsilon )- J(\theta-\epsilon))/2\epsilon$

to approximate the derivative. What value do you get using this approximation ?(When $\theta=1$,the true, exact derivative is
$d/d\theta J(\theta) = 3$ ).

The Octave code that I used to solve this is

((1+0.01)^3-(1-0.01)^3)/(2*0.10)


3.0001

### One Response to Gradient checking quiz

1. suggestion says:

(2*0.10) it should be 2*0.01