public static CommonOutputs.RegressionOutput TrainRegression(IHostEnvironment env, Options input) { Contracts.CheckValue(env, nameof(env)); var host = env.Register("TrainLightGBM"); host.CheckValue(input, nameof(input)); EntryPointUtils.CheckInputArgs(host, input); return(LearnerEntryPointsUtils.Train <Options, CommonOutputs.RegressionOutput>(host, input, () => new LightGbmRegressorTrainer(host, input), getLabel: () => LearnerEntryPointsUtils.FindColumn(host, input.TrainingData.Schema, input.LabelColumn), getWeight: () => LearnerEntryPointsUtils.FindColumn(host, input.TrainingData.Schema, input.WeightColumn))); }
public static CommonOutputs.BinaryClassificationOutput TrainBinary(IHostEnvironment env, Options input) { Contracts.CheckValue(env, nameof(env)); var host = env.Register("TrainLightGBM"); host.CheckValue(input, nameof(input)); EntryPointUtils.CheckInputArgs(host, input); return(TrainerEntryPointsUtils.Train <Options, CommonOutputs.BinaryClassificationOutput>(host, input, () => new LightGbmBinaryTrainer(host, input), getLabel: () => TrainerEntryPointsUtils.FindColumn(host, input.TrainingData.Schema, input.LabelColumnName), getWeight: () => TrainerEntryPointsUtils.FindColumn(host, input.TrainingData.Schema, input.ExampleWeightColumnName))); }
internal LightGbmRegressorTrainer(IHostEnvironment env, Options options) : base(env, LoadNameValue, options, TrainerUtils.MakeR4ScalarColumn(options.LabelColumn)) { }
internal LightGbmBinaryTrainer(IHostEnvironment env, Options options) : base(env, LoadNameValue, options, TrainerUtils.MakeBoolScalarLabel(options.LabelColumnName)) { }