A Stochastic Gradient Method with an Exponential Convergence Rate for Finite Training Sets