Sigmoid, f and gradient functions

Check that gradient is a descent direction

Preform gradient descent