Latent classification models for binary data