1 write to LightGbmTrainerOptions
Microsoft.ML.LightGbm (1)
LightGbmTrainerBase.cs (1)
354
LightGbmTrainerOptions
= options;
50 references to LightGbmTrainerOptions
Microsoft.ML.LightGbm (50)
LightGbmBinaryTrainer.cs (2)
258
var cali = new PlattCalibrator(Host, -
LightGbmTrainerOptions
.Sigmoid, 0);
268
if (
LightGbmTrainerOptions
.LightGbmModel == null)
LightGbmMulticlassTrainer.cs (14)
223
var cali = new PlattCalibrator(Host, -
LightGbmTrainerOptions
.Sigmoid, 0);
238
if (
LightGbmTrainerOptions
.LightGbmModel == null)
321
int minimumExampleCountPerLeaf =
LightGbmTrainerOptions
.MinimumExampleCountPerLeaf ?? DefaultMinDataPerLeaf(numRow, numberOfLeaves, _numberOfClassesIncludingNan);
325
if (!
LightGbmTrainerOptions
.LearningRate.HasValue)
326
ch.Info("Auto-tuning parameters: " + nameof(
LightGbmTrainerOptions
.LearningRate) + " = " + GbmOptions["learning_rate"]);
327
if (!
LightGbmTrainerOptions
.NumberOfLeaves.HasValue)
328
ch.Info("Auto-tuning parameters: " + nameof(
LightGbmTrainerOptions
.NumberOfLeaves) + " = " + numberOfLeaves);
329
if (!
LightGbmTrainerOptions
.MinimumExampleCountPerLeaf.HasValue)
330
ch.Info("Auto-tuning parameters: " + nameof(
LightGbmTrainerOptions
.MinimumExampleCountPerLeaf) + " = " + minimumExampleCountPerLeaf);
342
if (
LightGbmTrainerOptions
.UseSoftmax.HasValue)
343
useSoftmax =
LightGbmTrainerOptions
.UseSoftmax.Value;
349
ch.Info("Auto-tuning parameters: " + nameof(
LightGbmTrainerOptions
.UseSoftmax) + " = " + useSoftmax);
361
if (
LightGbmTrainerOptions
.LightGbmModel == null)
367
var metadata =
LightGbmTrainerOptions
.LightGbmModel == null ? new SchemaShape(labelCol.Annotations.Where(x => x.Name == AnnotationUtils.Kinds.KeyValues).Concat(AnnotationUtils.GetTrainerOutputAnnotation())) : new SchemaShape(AnnotationUtils.GetTrainerOutputAnnotation());
LightGbmRankingTrainer.cs (1)
245
if (
LightGbmTrainerOptions
.LightGbmModel == null)
LightGbmRegressionTrainer.cs (1)
230
if (
LightGbmTrainerOptions
.LightGbmModel == null)
LightGbmTrainerBase.cs (32)
355
ParallelTraining =
LightGbmTrainerOptions
.ParallelTrainer != null ?
LightGbmTrainerOptions
.ParallelTrainer.CreateComponent(Host) : new SingleTrainer();
356
GbmOptions =
LightGbmTrainerOptions
.ToDictionary(Host);
370
if (
LightGbmTrainerOptions
.LightGbmModel != null)
372
LightGbmTrainerOptions
.LightGbmModel.Position = 0;
375
StreamReader reader = new StreamReader(
LightGbmTrainerOptions
.LightGbmModel);
393
Type optionsType =
LightGbmTrainerOptions
.GetType();
398
var lightGbmName =
LightGbmTrainerOptions
.GetOptionName(field.Name);
405
field.SetValue(
LightGbmTrainerOptions
, Double.Parse(modelParameters[lightGbmName]));
409
field.SetValue(
LightGbmTrainerOptions
, int.Parse(modelParameters[lightGbmName]));
413
field.SetValue(
LightGbmTrainerOptions
, float.Parse(modelParameters[lightGbmName]));
420
field.SetValue(
LightGbmTrainerOptions
, true);
422
field.SetValue(
LightGbmTrainerOptions
, false);
425
field.SetValue(
LightGbmTrainerOptions
, Convert.ChangeType(modelParameters[lightGbmName], field.FieldType));
501
if (
LightGbmTrainerOptions
.LightGbmModel == null)
507
double learningRate =
LightGbmTrainerOptions
.LearningRate ?? DefaultLearningRate(numRow, hasCategorical, totalCats);
508
int numberOfLeaves =
LightGbmTrainerOptions
.NumberOfLeaves ?? DefaultNumLeaves(numRow, hasCategorical, totalCats);
509
int minimumExampleCountPerLeaf =
LightGbmTrainerOptions
.MinimumExampleCountPerLeaf ?? DefaultMinDataPerLeaf(numRow, numberOfLeaves, 1);
515
if (!
LightGbmTrainerOptions
.LearningRate.HasValue)
516
ch.Info("Auto-tuning parameters: " + nameof(
LightGbmTrainerOptions
.LearningRate) + " = " + learningRate);
517
if (!
LightGbmTrainerOptions
.NumberOfLeaves.HasValue)
518
ch.Info("Auto-tuning parameters: " + nameof(
LightGbmTrainerOptions
.NumberOfLeaves) + " = " + numberOfLeaves);
519
if (!
LightGbmTrainerOptions
.MinimumExampleCountPerLeaf.HasValue)
520
ch.Info("Auto-tuning parameters: " + nameof(
LightGbmTrainerOptions
.MinimumExampleCountPerLeaf) + " = " + minimumExampleCountPerLeaf);
616
bool useCat =
LightGbmTrainerOptions
.UseCategoricalSplit ?? numRow > useCatThreshold;
617
if (!
LightGbmTrainerOptions
.UseCategoricalSplit.HasValue)
618
ch.Info("Auto-tuning parameters: " + nameof(
LightGbmTrainerOptions
.UseCategoricalSplit) + " = " + useCat);
668
LoadDataset(ch, factory, dtrain, numRow,
LightGbmTrainerOptions
.BatchSize, catMetaData);
690
LoadDataset(ch, factory, dvalid, numRow,
LightGbmTrainerOptions
.BatchSize, catMetaData);
712
dvalid: dvalid, numIteration:
LightGbmTrainerOptions
.NumberOfIterations,
713
verboseEval:
LightGbmTrainerOptions
.Verbose, earlyStoppingRound:
LightGbmTrainerOptions
.EarlyStoppingRound))