Latent-Variable Modeling: Algorithms, Inference, and Applications