y should be in shape of [n_samples, n_classes]