An implementation of stochastic gradient descent in java