2 writes to Host
Microsoft.ML.Ensemble (2)
46 references to Host
Microsoft.ML.Ensemble (46)
PipelineEnsemble.cs (46)
57throw Parent.Host.ExceptSchemaMismatch(nameof(InputRoleMappedSchema), "input", name);
67var emptyDv = new EmptyDataView(Parent.Host, schema.Schema);
68Parent.PredictorModels[i].PrepareData(Parent.Host, emptyDv, out RoleMappedData rmd, out IPredictor predictor);
71var bindable = ScoreUtils.GetSchemaBindableMapper(Parent.Host, Parent.PredictorModels[i].Predictor);
72Mappers[i] = bindable.Bind(Parent.Host, rmd.Schema) as ISchemaBoundRowMapper;
74throw Parent.Host.Except("Predictor {0} is not a row to row mapper", i);
79throw Parent.Host.Except("Predictor {0} does not contain a score column", i);
83var dv = new EmptyDataView(Parent.Host, schema.Schema);
84var tm = new TransformModelImpl(Parent.Host, dv, dv);
85var pipeline = Parent.PredictorModels[i].TransformModel.Apply(Parent.Host, tm);
86BoundPipelines[i] = pipeline.AsRowToRowMapper(Parent.Host);
88throw Parent.Host.Except("Transform pipeline {0} contains transforms that do not implement IRowToRowMapper", i);
164Parent.Host.Assert(0 <= i && i < Mappers.Length);
165Parent.Host.Check(Mappers[i].InputRoleMappedSchema.Label.HasValue, "Mapper was not trained using a label column");
176Parent.Host.Assert(0 <= i && i < Mappers.Length);
211ctx.LoadModel<IOutputCombiner<T>, SignatureLoadModel>(Host, out Combiner, "Combiner");
216Host.AssertValue(ctx);
244throw Host.Except("Unknown prediction kind");
270throw Host.Except("Unknown prediction kind");
279int classCount = CheckLabelColumn(Host, predictors, false);
286int classCount = CheckLabelColumn(Host, PredictorModels, false);
301Host.Assert(_scoreColumnKind == AnnotationUtils.Const.ScoreColumnKind.BinaryClassification);
302CheckBinaryLabel(true, Host, PredictorModels);
308Host.Assert(_scoreColumnKind == AnnotationUtils.Const.ScoreColumnKind.BinaryClassification);
309CheckBinaryLabel(false, Host, PredictorModels);
324Host.CheckValue(ch, nameof(ch));
373return CalibratorUtils.CreateCalibratedPredictor(Host, this, calibrator);
407Host.CheckNonEmpty(predictors, nameof(predictors));
408Host.CheckNonWhiteSpace(scoreColumnKind, nameof(scoreColumnKind));
440throw Host.Except("Inconsistent schemas: Some schemas do not contain the column '{0}'", name);
443Host.Check(nonHiddenCols == _inputCols.Length,
452Host.AssertNonEmpty(scoreColumnKind);
465Host.CheckDecode(length > 0);
474PredictorModels[i] = new PredictorModelImpl(Host, ent.Stream);
478Host.CheckDecode(length >= 0);
486Host.AssertValue(ctx);
499Host.AssertNonEmpty(PredictorModels);
506PredictorModels[i].Save(Host, ent.Stream);
582var dv = new EmptyDataView(Host, PredictorModels[i].TransformModel.InputSchema);
583PredictorModels[i].PrepareData(Host, dv, out RoleMappedData rmd, out IPredictor pred);
703Host.CheckValueOrNull(schema);
720var dv = new EmptyDataView(Host, PredictorModels[i].TransformModel.InputSchema);
721PredictorModels[i].PrepareData(Host, dv, out RoleMappedData rmd, out IPredictor pred);
748Host.AssertValue(summaryModel);
758Host.AssertNonEmpty(PredictorModels);
759return PredictorModels[0].GetLabelInfo(Host, out labelType);