Closed
Description
openedon Feb 13, 2019
In FastTree
, the EarlyStoppingRule
is defined as
[Argument(ArgumentType.Multiple, HelpText = "Early stopping rule. (Validation set (/valid) is required.)", ShortName = "esr", NullName = "<Disable>")]
[TGUI(Label = "Early Stopping Rule", Description = "Early stopping rule. (Validation set (/valid) is required.)")]
public IEarlyStoppingCriterionFactory EarlyStoppingRule;
This can be specified like so:
var fastTreeTrainer = mlContext.Regression.Trainers.FastTree(new
Trainers.FastTree.FastTreeRegressionTrainer.Options {
EarlyStoppingMetrics = 2,
EarlyStoppingRule = new GLEarlyStoppingCriterion.Arguments()
});
This exposes the IComponentFactory
way of doing things in the public API, which seems to be inconsistent with the public API. One suggestion is to use an enum
over the existing options.
That said, this does support custom early stopping methods through implementing IEarlyStoppingCriterionFactory
.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment