A class of algorithms to learn classification RBM