Fix of mini-batch gradient descent
Fix for MapReduce gradient descent
Harmonization of loops of optimization methods