Stochastic Optimization for Large-scale Machine Learning