You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a data with 46 classes. Because the 46th class is small in splitting it moves to tet and it doesn't exist in train. now my onehotencoder has 45 classes but after all I need to train my model with 46 classes. What can be done?
from sklearn.preprocessing import OneHotEncoder
num_labels = 46
#creating instance of one-hot-encoder
encoder = OneHotEncoder(handle_unknown='ignore')
#perform one-hot encoding on 'team' column
e_sh['one_hot_labels'] =list(encoder.fit_transform(e_sh[['Label']]).toarray())
The text was updated successfully, but these errors were encountered:
I have a data with 46 classes. Because the 46th class is small in splitting it moves to tet and it doesn't exist in train. now my onehotencoder has 45 classes but after all I need to train my model with 46 classes. What can be done?
The text was updated successfully, but these errors were encountered: