internal LightGbmBinaryTrainer(IHostEnvironment env, Options options)
     : base(env, LoadNameValue, options, TrainerUtils.MakeBoolScalarLabel(options.LabelColumnName))
 {
     Contracts.CheckUserArg(options.Sigmoid > 0, nameof(Options.Sigmoid), "must be > 0.");
     Contracts.CheckUserArg(options.WeightOfPositiveExamples > 0, nameof(Options.WeightOfPositiveExamples), "must be > 0.");
 }
        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 LightGbmBinaryClassificationTrainer(host, input),
                                                                                                     getLabel: () => TrainerEntryPointsUtils.FindColumn(host, input.TrainingData.Schema, input.LabelColumnName),
                                                                                                     getWeight: () => TrainerEntryPointsUtils.FindColumn(host, input.TrainingData.Schema, input.ExampleWeightColumnName)));
        }
 internal LightGbmBinaryClassificationTrainer(IHostEnvironment env, Options options)
     : base(env, LoadNameValue, options, TrainerUtils.MakeBoolScalarLabel(options.LabelColumnName))
 {
 }
 internal LightGbmMulticlassTrainer(IHostEnvironment env, Options options)
     : base(env, LoadNameValue, options, TrainerUtils.MakeU4ScalarColumn(options.LabelColumnName))
 {
     Contracts.CheckUserArg(options.Sigmoid > 0, nameof(Options.Sigmoid), "must be > 0.");
     _numClass = -1;
 }