Wednesday 23 September 2020

How to convert a label to a matrix or vice versa?

label = [0,1,1,1,,0,0,0,0,0]

mlabel = pd.get_dummies(label)

nlabel = np.argmax(mlabel, axis=1)

No comments:

Post a Comment