1 min readOct 11, 2018
Yes, it’s better to create 27 entries in your case, but instead of -1 you can one hot encode the classes. For example: If you have 5 classes and you have 0 2 3 as Target label for the 1s row then create 5 columns with having 1 at their respective positions like 1,0,1,1,0. And make sure every column has int or float datatype, you can view them by viewing df.dtype