Probabilistic principles in unsupervised learning of visual structure: human data and a model