Add doctests to stochasticGradientDescent