dotnet / dotnet/machinelearning
How to append estimator after a LightGBM trainer with early stopping
- Dominant language
- C#
- Stars
- 9.4k
- Forks
- 2k
- Avg merge
- 2d 20h
- Merged PRs (30d)
- 11
Description
Version: 0.11
When using early stopping (which is fantastic) with LightGBM you have to use:
```C#
var trainer = ctx.MulticlassClassification.Trainers.LightGbm(options);
var model = trainer.Fit(trainEncodedDv, testEncodedDv);
```
However, I need to append other estimators after the trainer. Like:
```C#
trainer = trainer.Append(ctx.Transforms.Conversion.MapKeyToValue(DefaultColumnNames.PredictedLabel))
.Append(ctx.Transforms.Conversion.MapKeyToValue((nameof(MlNetPrediction.OriginalLabelData), DefaultColumnNames.Label)));
```
Which of course I cannot do since then I cannot call the *two*-arity `fit` method anymore.
How can I solve this issue?
Btw: I think early stopping is absolutely crucial for any machine learning and IMO all iterative algorithms should support it.
Contributor guide
Assessment
This issue has not been assessed yet.