computes cost function for X, y, theta
update: disabled printing each calculation to the screen
Perform gradient descent to learn theta by minimizing the cost function