An Accurate Maximum Entropy Method for Efficient Approximations in Large-Scale Machine Learning