0

Using python and any machine learning library, I'm trying to have two target labels and a custom loss function. From my understanding, there is only one way to achieve this and that is by using Keras. Is this correct?

Here is a list of other things I have tried, have I missed something?

LightGBM

This article is the first that pops up when searching for custom loss functions. Unfortunately, LightGBM doees not support more than one target label and it doesn't seem like that's going to change anytime soon.

XGBoost

Has the same problem as LightGBM, you cannot have multiple labels only multiple target classes (Done by duplicating those rows) as discussed here.

SciKit-Learn: GridSearchCV and make_scorer

This initially looked good as you can have several target labels. However, the make_scorer method only scores the result of the model and it is not the loss function the model itself uses.

Rkey
  • 690
  • 2
  • 8
  • 25

0 Answers0