Optimized away hypothesis calculation.
Vectorized gradient calculation.
Finding theta with scipy.optimize.fmin.