Bayesian Classification Algorithm