A maximum likelihood algorithm for the estimation and renormalization of exponential densities