Bayesian Model Selection For Classification With Possibly Large Number Of Groups