support for stochastic batch training

with gdmtrain and adatrain