I have labels that are one-hot encoded. I would like to use them to train and predict with a catboost classifier. However, it is giving me an error when I am fitting, saying that multiple integer values are not allowed per row for the labels. So does catboost not allow one-hot encoding for the labels? If not, how can I get catboost to work?
Asked
Active
Viewed 2,016 times
0
-
What parameters did you pass to `catboost`? Did you include `one_hot_max_size`? – Bob Dalgleish Aug 11 '17 at 23:18
-
@BobDalgleish yep... I just passed in learning_rate, depth, iterations, and one_hot_max_size .... I did find a workaround though... – TanMath Aug 11 '17 at 23:34
2 Answers
0
I have found a workaround to this problem. There might be a better solution to this problem, which I would love to hear about.
The workaround is to convert the one-hot encoding to categorical values. Of course, most of the time, we take our categorical values and convert to one-hot encoding. So just don't do this step.
Then, set the loss function to 'MultiClass'. This is the only loss function that catboost (and I think most gradient boosting packages) will support for multiclassification.

TanMath
- 598
- 1
- 9
- 27