Closed peterewills closed 6 years ago
Hi! Sorry for a long response -- I'm on vacation now.
In fact, Classifier
and Regressor
are just TFFMBase
with hardcoded losses.
About weights -- there are some attempts to implement it (you can find it in branches). Generally, it's quite easy to implement weights for losses.
From my point of view, if you want to implement some custom loss -- right way to do this is to use TFFMBase
(similar as it done for TFFMClassifier
). If you only need weights for classification -- it's OK to make them as parameter in TFFMClassifier.fit()
method.
Is there a reason that custom loss functions are not enabled for
TFFMClassifier
andTFFMRegressor
? In particular, it would be helpful to be able to use weighted log-loss, so that there is aclass_weight
keyword argument a lasklearn.linear_model.LogisticRegression
.If appropriate, I'd be happy to implement this.