binarize the training set