Inferring Parameters and Structure of Latent Variable Models by Variational Bayes