def binarize_labels(self, y):
        binary_y = np.zeros((len(y), self.num_classes))
        for c in xrange(self.num_classes):
            binary_y[y==c,c] = 1

        return binary_y
Turns discrete labels into binary vector labels.
dataset/ETHPy150Open bbabenko/simple_convnet/simple_convnet/convnet.py/SoftmaxNet.binarize_labels