Fast Implementation of a Bayesian Unsupervised Algorithm