Spam classification based on Bayesian formula