Dimensionality reduction with latent variable model