def _encode_labels(self, y, k):
        onehot = np.zeros((k, y.shape[0]))
        for idx, val in enumerate(y):
            onehot[val, idx] = 1.0
        return onehot
Encode labels into one-hot representation.
dataset/ETHPy150Open rasbt/mlxtend/mlxtend/classifier/neuralnet_mlp.py/NeuralNetMLP._encode_labels