Closed aquaresima closed 2 years ago
hello and sorry for the very late reply, I hadn't seen this issue.
Yes it's by design that labels must be +-1
for binary and 1...c
for multiclass (it's in the README but I know there should be docs etc). This makes computations of the softmax more direct. MLJLinearModels doesn't bother with encoding because users are expected to use MLJ or MLJBase to do their data preprocessing before calling this package.
if you use MLJ as a way to call MLJLinearModels then you never have to think about these things because the number you get (0, 1, ...
) in your target vector are just considered as labels, the proper encoding is done behind the scene.
Hi, I faced this issue when using the multinomial regression (aka multiclass Logistic Regression). In the following, I show an example with MNIST classification.
I have to shift all categories of 1 integer (0->1, 1->2 .... 9->10) otherwise it gave the error I report in the end notes
Error with 0 among the categories: