set_class_index method on Bayesian classifier