Stochastic gradient methods for principled estimation with massive data sets