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