Python numpy how to do one hot encoding
import numpy as np
c = 6 # number of classes
y = np.random.randint(0,5,[1,10])
print y
y_one_hot_encoded = np.eye(c)[y]
print y_one_hot_encoded
import numpy as np
c = 6 # number of classes
y = np.random.randint(0,5,[1,10])
print y
y_one_hot_encoded = np.eye(c)[y]
print y_one_hot_encoded