def gradient descent, stochastic, and batch