Bayesian confidence propagation neural network