-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom loss for multiclass classification #6649
Comments
Hey @kosnikos, thanks for using LightGBM. This is most likely because of the If you want to use the built-in init scores you can find an example on how to replicate the L2 loss in #5114 (comment), note that you'll have to adjust the calculation of the init scores to use the ones for LightGBM/src/objective/binary_objective.hpp Lines 139 to 165 in 41ba9e8
You can find the implementation for the LightGBM/src/objective/multiclass_objective.hpp Lines 186 to 276 in 41ba9e8
|
I am trying to write a custom loss function for multiclass applications and I started by replicating the 'multiclassova' objective
I am calling this function using
lgb.LGBMClassifier(objective=custom_classification_loss, num_class= 3)
and making predictions by applying the sigmoid function
probabilities = sigmoid(raw_preds)
However, the results are completely different (obviously much worse) than the predictions using the built-in 'multiclassova' objective.
Does anyone now how 'multiclassova' is implemented under the hoods?
The text was updated successfully, but these errors were encountered: