1 write to SubModel
Microsoft.ML.Data (1)
Prediction\Calibrator.cs (1)
221SubModel = predictor;
68 references to SubModel
Microsoft.ML.Data (25)
Prediction\Calibrator.cs (24)
143/// <see cref="CalibratedModelParametersBase{TSubPredictor, TCalibrator}.SubModel"/> and 171/// Class for allowing a post-processing step, defined by <see cref="Calibrator"/>, to <see cref="SubModel"/>'s 196/// <see cref="SubModel"/>'s output would calibrated by <see cref="Calibrator"/>. 201/// <see cref="Calibrator"/> is used to post-process score produced by <see cref="SubModel"/>. 206IPredictorProducing<float> IWeaklyTypedCalibratedModelParameters.WeaklyTypedSubModel => (IPredictorProducing<float>)SubModel; 209PredictionKind IPredictor.PredictionKind => ((IPredictorProducing<float>)SubModel).PredictionKind; 228var saver = SubModel as ICanSaveInIniFormat; 235var saver = SubModel as ICanSaveInTextFormat; 243var saver = SubModel as ICanSaveInSourceCode; 251var saver = SubModel as ICanSaveSummary; 260var saver = SubModel as ICanGetSummaryInKeyValuePairs; 269ctx.SaveModel(SubModel, ModelFileUtils.DirPredictor); 312_mapper = SubModel as IValueMapper; 506Host.Check(SubModel is IPredictorWithFeatureWeights<float>, "Predictor does not implement " + nameof(IPredictorWithFeatureWeights<float>)); 507_featureWeights = (IPredictorWithFeatureWeights<float>)SubModel; 582Host.Check(SubModel is IParameterMixer<float>, "Predictor does not implement " + nameof(IParameterMixer)); 583Host.Check(SubModel is IPredictorWithFeatureWeights<float>, "Predictor does not implement " + nameof(IPredictorWithFeatureWeights<float>)); 584_featureWeights = SubModel as IPredictorWithFeatureWeights<float>; 624return (IParameterMixer<float>)model.SubModel; 755_bindable = ScoreUtils.GetSchemaBindableMapper(Host, SubModel as IPredictorProducing<float>); 756_featureContribution = SubModel as IFeatureContributionMapper; 762_bindable = ScoreUtils.GetSchemaBindableMapper(Host, SubModel as IPredictorProducing<float>); 763_featureContribution = SubModel as IFeatureContributionMapper; 1040predictor = p.SubModel;
Transforms\ExplainabilityCatalog.cs (1)
71=> new FeatureContributionCalculatingEstimator(CatalogUtils.GetEnvironment(catalog), predictionTransformer.Model.SubModel, numberOfPositiveContributions, numberOfNegativeContributions, predictionTransformer.FeatureColumnName, normalize);
Microsoft.ML.FastTree (4)
GamModelParameters.cs (1)
886rawPred = calibrated.SubModel;
TreeEnsembleFeaturizationEstimator.cs (1)
246return trained.Model.SubModel;
TreeEnsembleFeaturizer.cs (2)
416predictor = calibrated.SubModel; 721predictor = calibratedModelParametersBase.SubModel;
Microsoft.ML.IntegrationTests (9)
IntrospectiveTraining.cs (1)
90var fastTreeModel = model.LastTransformer.Model.SubModel;
Training.cs (8)
236var firstModelWeights = firstModel.Model.SubModel.Weights; 240var firstModelWeightsPrime = firstModel.Model.SubModel.Weights; 243var secondModel = trainer.Fit(featurizedData, firstModel.Model.SubModel); 244var secondModelWeights = secondModel.Model.SubModel.Weights; 422var firstModelWeights = firstModel.Model.SubModel.Weights; 426var firstModelWeightsPrime = firstModel.Model.SubModel.Weights; 429var secondModel = trainer.Fit(featurizedData, firstModel.Model.SubModel); 430var secondModelWeights = secondModel.Model.SubModel.Weights;
Microsoft.ML.Predictor.Tests (1)
TestIniModels.cs (1)
579var predictor = calibratedPredictor.SubModel as ICanSaveInIniFormat;
Microsoft.ML.Samples (10)
Dynamic\Trainers\BinaryClassification\Gam.cs (1)
48var gam = model.Model.SubModel;
Dynamic\Trainers\BinaryClassification\GamWithOptions.cs (1)
56var gam = model.Model.SubModel;
Dynamic\Trainers\BinaryClassification\PermutationFeatureImportance.cs (1)
63linearPredictor.Model.SubModel.Weights[i],
Dynamic\Trainers\BinaryClassification\PermutationFeatureImportanceLoadFromDisk.cs (1)
62linearPredictor.Model.SubModel.Weights[i], // this way we can access the weights inside the submodel
Dynamic\Trainers\Regression\GamAdvanced.cs (1)
48var gam = model.Model.SubModel;
Dynamic\Trainers\Regression\GamWithOptionsAdvanced.cs (1)
56var gam = model.Model.SubModel;
Dynamic\Transforms\CalculateFeatureContributionCalibrated.cs (3)
44linearModel.Model.SubModel.Bias, 45linearModel.Model.SubModel.Weights[0], 46linearModel.Model.SubModel.Weights[1]);
Dynamic\Transforms\TreeFeaturization\PretrainedTreeEnsembleFeaturizationWithOptions.cs (1)
57ModelParameters = model.Model.SubModel, // Pretrained tree model.
Microsoft.ML.Tests (19)
TrainerEstimators\LbfgsTests.cs (5)
28trainer.Fit(transformedDataView, model.Model.SubModel); 65var linearModel = transformerChain.LastTransformer.Model.SubModel as LinearBinaryModelParameters; 92var linearModel = transformer.LastTransformer.Model.SubModel as LinearBinaryModelParameters; 131linearModel = model.SubModel as LinearBinaryModelParameters; 149var subPredictor = result?.SubModel as LinearBinaryModelParameters;
TrainerEstimators\SymSgdClassificationTests.cs (2)
26trainer.Fit(transformedDataView, model.Model.SubModel); 40modelParameters: initPredictor.Model.SubModel);
TrainerEstimators\TrainerEstimators.cs (1)
104trainer.Fit(transformedDataView, model.Model.SubModel);
TrainerEstimators\TreeEnsembleFeaturizerTest.cs (7)
149var treeFeaturizer = new TreeEnsembleFeaturizationTransformer(ML, dataView.Schema, dataView.Schema["Features"], model.Model.SubModel, 166var leafId = model.Model.SubModel.GetLeaf(treeIndex, new VBuffer<float>(10, features[dataPointIndex]), ref path); 167var leafValue = model.Model.SubModel.GetLeafValue(0, leafId); 260ModelParameters = model.Model.SubModel, 281var leafId = model.Model.SubModel.GetLeaf(treeIndex, new VBuffer<float>(10, features[dataPointIndex]), ref path); 282var leafValue = model.Model.SubModel.GetLeafValue(0, leafId); 328ModelParameters = treeModel.Model.SubModel
TrainerEstimators\TreeEstimators.cs (4)
993var trainedTreeEnsemble = transformer.LastTransformer.Model.SubModel.TrainedTreeEnsemble; 995var modelParameters = transformer.LastTransformer.Model.SubModel as ICanGetSummaryAsIDataView; 1059var trainedTreeEnsemble = transformer.LastTransformer.Model.SubModel.TrainedTreeEnsemble; 1061var modelParameters = transformer.LastTransformer.Model.SubModel as ICanGetSummaryAsIDataView;