batch learning with regularization