5 writes to LastTransformer
Microsoft.ML.Data (5)
DataLoadSave\TransformerChain.cs (5)
91LastTransformer = transformers.LastOrDefault() as TLastTransformer; 110LastTransformer = null; 116LastTransformer = transformers.Last() as TLastTransformer; 217LastTransformer = _transformers[len - 1] as TLastTransformer; 219LastTransformer = null;
58 references to LastTransformer
Microsoft.ML.Data (2)
DataLoadSave\TransformerChain.cs (2)
93Contracts.Check((_transformers.Length > 0) == (LastTransformer != null)); 117Contracts.Check(LastTransformer != null);
Microsoft.ML.IntegrationTests (19)
Explainability.cs (9)
60linearPredictor = (loadedModel as TransformerChain<ITransformer>).LastTransformer as RegressionPredictionTransformer<FastTreeRegressionModelParameters>; 68linearPredictor = model.LastTransformer; 101var linearModel = model.LastTransformer.Model; 125var treeModel = model.LastTransformer.Model; 152var treeModel = model.LastTransformer.Model; 182var predictor = model.LastTransformer; 219var predictor = model.LastTransformer; 256var predictor = model.LastTransformer; 294var predictor = model.LastTransformer;
IntrospectiveTraining.cs (8)
46var fastForestModel = model.LastTransformer.Model; 90var fastTreeModel = model.LastTransformer.Model.SubModel; 151var gamModel = model.LastTransformer.Model; 192var ldaTransform = model.LastTransformer; 237var linearModel = model.LastTransformer.Model; 271var normalizer = model.LastTransformer; 403var kMeansModel = (modelComponents[1] as TransformerChain<ClusteringPredictionTransformer<KMeansModelParameters>>).LastTransformer; 404var mcLrModel = (modelComponents[2] as TransformerChain<MulticlassPredictionTransformer<MaximumEntropyModelParameters>>).LastTransformer;
Prediction.cs (2)
65if (transform != model.LastTransformer) 68transformers.Add(mlContext.BinaryClassification.ChangeModelThreshold(model.LastTransformer, 0.7f));
Microsoft.ML.PerformanceTests (1)
KMeansAndLogisticRegressionBench.cs (1)
46return model.LastTransformer.Model;
Microsoft.ML.Predictor.Tests (2)
TestIniModels.cs (2)
542((ICanSaveInIniFormat)model.LastTransformer.Model).SaveAsIni(iniWriter, roleMappedSchema); 578var calibratedPredictor = model.LastTransformer.Model;
Microsoft.ML.Samples (11)
Dynamic\Trainers\BinaryClassification\PermutationFeatureImportance.cs (1)
40var linearPredictor = model.LastTransformer;
Dynamic\Trainers\BinaryClassification\PermutationFeatureImportanceLoadFromDisk.cs (2)
31var lt = model0.LastTransformer; 41var linearPredictor = (model as TransformerChain<ITransformer>).LastTransformer as BinaryPredictionTransformer<CalibratedModelParametersBase<LinearBinaryModelParameters, PlattCalibrator>>;
Dynamic\Trainers\MulticlassClassification\PermutationFeatureImportance.cs (1)
42var linearPredictor = model.LastTransformer;
Dynamic\Trainers\MulticlassClassification\PermutationFeatureImportanceLoadFromDisk.cs (1)
50var linearPredictor = (model as TransformerChain<ITransformer>).LastTransformer as MulticlassPredictionTransformer<MaximumEntropyModelParameters>;
Dynamic\Trainers\Ranking\PermutationFeatureImportance.cs (1)
42var linearPredictor = model.LastTransformer;
Dynamic\Trainers\Ranking\PermutationFeatureImportanceLoadFromDisk.cs (1)
49var linearPredictor = (model as TransformerChain<ITransformer>).LastTransformer as RankingPredictionTransformer<FastTreeRankingModelParameters>;
Dynamic\Trainers\Regression\LightGbmAdvanced.cs (1)
53model.LastTransformer.Model.GetFeatureWeights(ref weights);
Dynamic\Trainers\Regression\LightGbmWithOptionsAdvanced.cs (1)
62model.LastTransformer.Model.GetFeatureWeights(ref weights);
Dynamic\Trainers\Regression\PermutationFeatureImportance.cs (1)
41var linearPredictor = model.LastTransformer;
Dynamic\Trainers\Regression\PermutationFeatureImportanceLoadFromDisk.cs (1)
48var linearPredictor = (model as TransformerChain<ITransformer>).LastTransformer as RegressionPredictionTransformer<OlsModelParameters>;
Microsoft.ML.TensorFlow.Tests (1)
TensorflowTests.cs (1)
2069tfInputShape = transformer.LastTransformer.TFInputShapes;
Microsoft.ML.Tests (22)
PermutationFeatureImportanceTests.cs (1)
138pfi = ML.Regression.PermutationFeatureImportance(model.LastTransformer, data);
Scenarios\Api\CookbookSamples\CookbookSamplesDynamicApi.cs (5)
242var modelParameters = trainedModel.LastTransformer.Model as MaximumEntropyModelParameters; 359var featureImportance = context.Regression.PermutationFeatureImportance(model.LastTransformer, transformedData); 397var linearModel = model.LastTransformer.Model; 432var linearModel = model.LastTransformer.Model; 470var linearModel = model.LastTransformer;
TrainerEstimators\CalibratorEstimators.cs (1)
114Transformer = ((TransformerChain<BinaryPredictionTransformer<LinearBinaryModelParameters>>)transformer).LastTransformer as BinaryPredictionTransformer<LinearBinaryModelParameters>,
TrainerEstimators\LbfgsTests.cs (6)
65var linearModel = transformerChain.LastTransformer.Model.SubModel as LinearBinaryModelParameters; 92var linearModel = transformer.LastTransformer.Model.SubModel as LinearBinaryModelParameters; 128var lastTransformer = ((TransformerChain<ITransformer>)transformerChain).LastTransformer as BinaryPredictionTransformer<CalibratedModelParametersBase<LinearBinaryModelParameters, PlattCalibrator>>; 172var model = transformer.LastTransformer.Model as MaximumEntropyModelParameters; 194var model = transformer.LastTransformer.Model as MaximumEntropyModelParameters; 223var lastTransformer = ((TransformerChain<ITransformer>)transformerChain).LastTransformer as MulticlassPredictionTransformer<MaximumEntropyModelParameters>;
TrainerEstimators\TreeEstimators.cs (9)
754var numOfSubParameters = (model.LastTransformer.Model as OneVersusAllModelParameters).SubModelParameters.Length; 761numOfSubParameters = (model.LastTransformer.Model as OneVersusAllModelParameters).SubModelParameters.Length; 768numOfSubParameters = (model.LastTransformer.Model as OneVersusAllModelParameters).SubModelParameters.Length; 993var trainedTreeEnsemble = transformer.LastTransformer.Model.SubModel.TrainedTreeEnsemble; 995var modelParameters = transformer.LastTransformer.Model.SubModel as ICanGetSummaryAsIDataView; 1011var trainedTreeEnsemble = transformer.LastTransformer.Model.TrainedTreeEnsemble; 1013var modelParameters = transformer.LastTransformer.Model as ICanGetSummaryAsIDataView; 1059var trainedTreeEnsemble = transformer.LastTransformer.Model.SubModel.TrainedTreeEnsemble; 1061var modelParameters = transformer.LastTransformer.Model.SubModel as ICanGetSummaryAsIDataView;