perl code for constructing histograms and classifiers using mcmc techniques.