Vectorization

Vectorization

Octave matrix index starts with 1 instead of 0 in array.
Vectorized implementation is simpler and take advantage of efficient implementation of popular libraries (in this case Octave).

Calculate hypothesis h(x)
Calculate Gradient descent:

Comments