1 write to Host
Microsoft.ML.Ensemble (1)
Trainer\EnsembleTrainerBase.cs (1)
78
Host
= env.Register(name);
36 references to Host
Microsoft.ML.Ensemble (36)
Trainer\Binary\EnsembleTrainer.cs (11)
70
SubModelSelector = args.SubModelSelectorType.CreateComponent(
Host
);
72
Combiner = args.OutputCombiner.CreateComponent(
Host
);
78
Host
.CheckParam(predictionKind == PredictionKind.BinaryClassification, nameof(PredictionKind));
86
return new EnsembleDistributionModelParameters(
Host
, PredictionKind, CreateModels<TDistPredictor>(models), Combiner);
87
return new EnsembleModelParameters(
Host
, PredictionKind, CreateModels<TScalarPredictor>(models), Combiner);
92
Host
.CheckValue(models, nameof(models));
94
var combiner = _outputCombiner.CreateComponent(
Host
);
98
Host
.CheckParam(models.All(m => m is TDistPredictor), nameof(models));
99
return new EnsembleDistributionModelParameters(
Host
, p.PredictionKind,
103
Host
.CheckParam(models.All(m => m is TScalarPredictor), nameof(models));
104
return new EnsembleModelParameters(
Host
, p.PredictionKind,
Trainer\EnsembleTrainerBase.cs (9)
82
using (var ch =
Host
.Start("Init"))
95
_subsetSelector = Args.SamplingType.CreateComponent(
Host
);
99
Trainers[i] = predictorFactories[i % predictorFactories.Length].CreateComponent(
Host
);
110
Host
.CheckValue(context, nameof(context));
112
using (var ch =
Host
.Start("Training"))
123
Host
.AssertValue(ch);
141
foreach (var batch in _subsetSelector.GetBatches(
Host
.Rand))
147
Parallel.ForEach(_subsetSelector.GetSubsets(batch,
Host
.Rand),
182
stackingTrainer.Train(modelsList, _subsetSelector.GetTestData(null, batch),
Host
);
Trainer\Multiclass\MulticlassDataPartitionEnsembleTrainer.cs (8)
77
SubModelSelector = args.SubModelSelectorType.CreateComponent(
Host
);
79
Combiner = args.OutputCombiner.CreateComponent(
Host
);
85
Host
.CheckParam(predictionKind == PredictionKind.MulticlassClassification, nameof(PredictionKind));
92
return new EnsembleMulticlassModelParameters(
Host
, CreateModels<TVectorPredictor>(models), Combiner as IMulticlassOutputCombiner);
97
Host
.CheckValue(models, nameof(models));
98
Host
.CheckParam(models.All(m => m is TVectorPredictor), nameof(models));
100
var combiner = _outputCombiner.CreateComponent(
Host
);
101
var predictor = new EnsembleMulticlassModelParameters(
Host
,
Trainer\Regression\RegressionEnsembleTrainer.cs (8)
65
SubModelSelector = args.SubModelSelectorType.CreateComponent(
Host
);
67
Combiner = args.OutputCombiner.CreateComponent(
Host
);
73
Host
.CheckParam(predictionKind == PredictionKind.Regression, nameof(PredictionKind));
80
return new EnsembleModelParameters(
Host
, PredictionKind, CreateModels<TScalarPredictor>(models), Combiner);
85
Host
.CheckValue(models, nameof(models));
86
Host
.CheckParam(models.All(m => m is TScalarPredictor), nameof(models));
88
var combiner = _outputCombiner.CreateComponent(
Host
);
91
var predictor = new EnsembleModelParameters(
Host
, p.PredictionKind,