Helper function
Gradient descent algorithm (with rather bad convergence test)
Logistic regression cost and gradient functions (probably wrong)
Q5.1 beginning
Refactoring