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