Finished sigmoid, cost, and gradient descent