A Generalization of Principal Components Analysis to the Exponential Family