A Computationally Efficient Method for Learning Exponential Family Distributions