A Bayesian Approach to Impression Formation