I have a multi classification problem which I am trying to solve and the target variable contains genders(male, female). I have used a LabelEncoder from sklearn to implement the one hot encoding. I plotted a confusion matrix, and I got an output containing 0's and 1's instead of classes. How would I be able to get back which class was mapped to which binary number(0,1 etc.)? Any suggestions would be very much helpful.
from sklearn.preprocessing import LabelEncoder
encoder = LabelEncoder()
y = encoder.fit_transform(y)