This contains the bayesian confusion code I've been working on....