4 interfaces inheriting from ITransformer
Microsoft.ML.Core (1)
Data\IEstimator.cs (1)
298
internal interface ITransformerWithDifferentMappingAtTrainingTime :
ITransformer
Microsoft.ML.Data (2)
Prediction\IPredictionTransformer.cs (2)
16
public interface IPredictionTransformer<out TModel> :
ITransformer
44
internal interface ISingleFeaturePredictionTransformer :
ITransformer
Microsoft.ML.TimeSeries (1)
PredictionEngine.cs (1)
18
internal interface IStatefulTransformer :
ITransformer
10 implementations of ITransformer
Microsoft.ML.Data (5)
DataLoadSave\TransformerChain.cs (2)
53
public sealed class TransformerChain<TLastTransformer> :
ITransformer
, IEnumerable<
ITransformer
>, ITransformerChainAccessor, IDisposable
DataLoadSave\TransformWrapper.cs (1)
16
internal sealed class TransformWrapper :
ITransformer
Transforms\ColumnSelecting.cs (1)
150
public sealed class ColumnSelectingTransformer :
ITransformer
Transforms\RowToRowTransformerBase.cs (1)
13
public abstract class RowToRowTransformerBase :
ITransformer
Microsoft.ML.Transforms (5)
CustomMappingTransformer.cs (1)
18
public sealed class CustomMappingTransformer<TSrc, TDst> :
ITransformer
OneHotEncoding.cs (1)
28
public sealed class OneHotEncodingTransformer :
ITransformer
OneHotHashEncoding.cs (1)
23
public sealed class OneHotHashEncodingTransformer :
ITransformer
StatefulCustomMappingTransformer.cs (1)
21
public sealed class StatefulCustomMappingTransformer<TSrc, TDst, TState> :
ITransformer
Text\TextFeaturizingEstimator.cs (1)
672
private sealed class Transformer :
ITransformer
819 references to ITransformer
Microsoft.Extensions.ML (9)
ModelLoaders\FileModelLoader.cs (2)
22
private
ITransformer
_model;
101
public override
ITransformer
GetModel()
ModelLoaders\ModelLoader.cs (1)
25
public abstract
ITransformer
GetModel();
ModelLoaders\UriModelLoader.cs (2)
26
private
ITransformer
_model;
164
public override
ITransformer
GetModel()
PredictionEnginePool.cs (2)
51
public
ITransformer
GetModel(string modelName)
64
public
ITransformer
GetModel()
PredictionEnginePoolPolicy.cs (2)
20
private readonly
ITransformer
_model;
29
public PredictionEnginePoolPolicy(MLContext mlContext,
ITransformer
model)
Microsoft.Extensions.ML.Tests (3)
FileLoaderTests.cs (1)
50
var
model = loaderUnderTest.GetModel();
PredictionEnginePoolTests.cs (1)
39
var
model = pool.GetModel("model1");
UriLoaderTests.cs (1)
90
public override
ITransformer
GetModel()
Microsoft.ML.AutoML (172)
API\AutoCatalog.cs (1)
301
public SweepableEstimator CreateSweepableEstimator<T>(Func<MLContext, T, IEstimator<
ITransformer
>> factory, SearchSpace<T> ss = null)
API\BinaryClassificationExperiment.cs (8)
164
public override ExperimentResult<BinaryClassificationMetrics> Execute(IDataView trainData, ColumnInformation columnInformation, IEstimator<
ITransformer
> preFeaturizer = null, IProgress<RunDetail<BinaryClassificationMetrics>> progressHandler = null)
214
public override ExperimentResult<BinaryClassificationMetrics> Execute(IDataView trainData, IDataView validationData, ColumnInformation columnInformation, IEstimator<
ITransformer
> preFeaturizer = null, IProgress<RunDetail<BinaryClassificationMetrics>> progressHandler = null)
247
public override ExperimentResult<BinaryClassificationMetrics> Execute(IDataView trainData, IDataView validationData, string labelColumnName = "Label", IEstimator<
ITransformer
> preFeaturizer = null, IProgress<RunDetail<BinaryClassificationMetrics>> progressHandler = null)
257
public override ExperimentResult<BinaryClassificationMetrics> Execute(IDataView trainData, string labelColumnName = "Label", string samplingKeyColumn = null, IEstimator<
ITransformer
> preFeaturizer = null, IProgress<RunDetail<BinaryClassificationMetrics>> progressHandler = null)
268
public override CrossValidationExperimentResult<BinaryClassificationMetrics> Execute(IDataView trainData, uint numberOfCVFolds, ColumnInformation columnInformation = null, IEstimator<
ITransformer
> preFeaturizer = null, IProgress<CrossValidationRunDetail<BinaryClassificationMetrics>> progressHandler = null)
303
public override CrossValidationExperimentResult<BinaryClassificationMetrics> Execute(IDataView trainData, uint numberOfCVFolds, string labelColumnName = "Label", string samplingKeyColumn = null, IEstimator<
ITransformer
> preFeaturizer = null, IProgress<CrossValidationRunDetail<BinaryClassificationMetrics>> progressHandler = null)
324
private SweepablePipeline CreateBinaryClassificationPipeline(IDataView trainData, ColumnInformation columnInformation, IEstimator<
ITransformer
> preFeaturizer = null)
399
var
model = res.Model;
API\ColumnInference.cs (2)
33
/// See <see cref="ExperimentBase{TMetrics, TExperimentSettings}.Execute(IDataView, ColumnInformation, IEstimator{
ITransformer
}, System.IProgress{RunDetail{TMetrics}})" />, for example.</para>
47
/// See <see cref="ExperimentBase{TMetrics, TExperimentSettings}.Execute(IDataView, ColumnInformation, IEstimator{
ITransformer
}, System.IProgress{RunDetail{TMetrics}})" />, for example.</para>
API\ExperimentBase.cs (16)
68
string samplingKeyColumn = null, IEstimator<
ITransformer
> preFeaturizer = null, IProgress<RunDetail<TMetrics>> progressHandler = null)
110
IEstimator<
ITransformer
> preFeaturizer = null, IProgress<RunDetail<TMetrics>> progressHandler = null)
159
public virtual ExperimentResult<TMetrics> Execute(IDataView trainData, IDataView validationData, string labelColumnName = DefaultColumnNames.Label, IEstimator<
ITransformer
> preFeaturizer = null, IProgress<RunDetail<TMetrics>> progressHandler = null)
188
ColumnInformation columnInformation, IEstimator<
ITransformer
> preFeaturizer = null,
218
ColumnInformation columnInformation = null, IEstimator<
ITransformer
> preFeaturizer = null,
249
string samplingKeyColumn = null, IEstimator<
ITransformer
> preFeaturizer = null,
275
IEstimator<
ITransformer
> preFeaturizer,
282
ITransformer
preprocessorTransform = null;
299
IEstimator<
ITransformer
> preFeaturizer,
306
ITransformer
[] preprocessorTransforms = null;
326
IEstimator<
ITransformer
> preFeaturizer,
333
ITransformer
[] preprocessorTransforms = null;
344
IEstimator<
ITransformer
> preFeaturizer,
358
private static (IDataView[] trainDatasets, IDataView[] validDatasets,
ITransformer
[] preprocessorTransforms)
359
ApplyPreFeaturizerCrossVal(IDataView[] trainDatasets, IDataView[] validDatasets, IEstimator<
ITransformer
> preFeaturizer)
366
var preprocessorTransforms = new
ITransformer
[trainDatasets.Length];
API\MulticlassClassificationExperiment.cs (8)
148
public override ExperimentResult<MulticlassClassificationMetrics> Execute(IDataView trainData, ColumnInformation columnInformation, IEstimator<
ITransformer
> preFeaturizer = null, IProgress<RunDetail<MulticlassClassificationMetrics>> progressHandler = null)
199
public override ExperimentResult<MulticlassClassificationMetrics> Execute(IDataView trainData, IDataView validationData, ColumnInformation columnInformation, IEstimator<
ITransformer
> preFeaturizer = null, IProgress<RunDetail<MulticlassClassificationMetrics>> progressHandler = null)
235
public override ExperimentResult<MulticlassClassificationMetrics> Execute(IDataView trainData, IDataView validationData, string labelColumnName = "Label", IEstimator<
ITransformer
> preFeaturizer = null, IProgress<RunDetail<MulticlassClassificationMetrics>> progressHandler = null)
245
public override ExperimentResult<MulticlassClassificationMetrics> Execute(IDataView trainData, string labelColumnName = "Label", string samplingKeyColumn = null, IEstimator<
ITransformer
> preFeaturizer = null, IProgress<RunDetail<MulticlassClassificationMetrics>> progressHandler = null)
256
public override CrossValidationExperimentResult<MulticlassClassificationMetrics> Execute(IDataView trainData, uint numberOfCVFolds, ColumnInformation columnInformation = null, IEstimator<
ITransformer
> preFeaturizer = null, IProgress<CrossValidationRunDetail<MulticlassClassificationMetrics>> progressHandler = null)
293
public override CrossValidationExperimentResult<MulticlassClassificationMetrics> Execute(IDataView trainData, uint numberOfCVFolds, string labelColumnName = "Label", string samplingKeyColumn = null, IEstimator<
ITransformer
> preFeaturizer = null, IProgress<CrossValidationRunDetail<MulticlassClassificationMetrics>> progressHandler = null)
314
private SweepablePipeline CreateMulticlassClassificationPipeline(IDataView trainData, ColumnInformation columnInformation, IEstimator<
ITransformer
> preFeaturizer = null)
377
var
model = res.Model;
API\Pipeline.cs (1)
25
public IEstimator<
ITransformer
> ToEstimator(MLContext context)
API\RegressionExperiment.cs (8)
145
public override ExperimentResult<RegressionMetrics> Execute(IDataView trainData, ColumnInformation columnInformation, IEstimator<
ITransformer
> preFeaturizer = null, IProgress<RunDetail<RegressionMetrics>> progressHandler = null)
194
public override ExperimentResult<RegressionMetrics> Execute(IDataView trainData, IDataView validationData, ColumnInformation columnInformation, IEstimator<
ITransformer
> preFeaturizer = null, IProgress<RunDetail<RegressionMetrics>> progressHandler = null)
229
public override ExperimentResult<RegressionMetrics> Execute(IDataView trainData, IDataView validationData, string labelColumnName = "Label", IEstimator<
ITransformer
> preFeaturizer = null, IProgress<RunDetail<RegressionMetrics>> progressHandler = null)
239
public override ExperimentResult<RegressionMetrics> Execute(IDataView trainData, string labelColumnName = "Label", string samplingKeyColumn = null, IEstimator<
ITransformer
> preFeaturizer = null, IProgress<RunDetail<RegressionMetrics>> progressHandler = null)
250
public override CrossValidationExperimentResult<RegressionMetrics> Execute(IDataView trainData, uint numberOfCVFolds, ColumnInformation columnInformation = null, IEstimator<
ITransformer
> preFeaturizer = null, IProgress<CrossValidationRunDetail<RegressionMetrics>> progressHandler = null)
286
public override CrossValidationExperimentResult<RegressionMetrics> Execute(IDataView trainData, uint numberOfCVFolds, string labelColumnName = "Label", string samplingKeyColumn = null, IEstimator<
ITransformer
> preFeaturizer = null, IProgress<CrossValidationRunDetail<RegressionMetrics>> progressHandler = null)
297
private SweepablePipeline CreateRegressionPipeline(IDataView trainData, ColumnInformation columnInformation, IEstimator<
ITransformer
> preFeaturizer = null)
404
var
model = res.Model;
API\RunDetails\CrossValidationRunDetail.cs (2)
27
IEstimator<
ITransformer
> estimator,
54
public
ITransformer
Model { get { return _modelContainer.GetModel(); } }
API\RunDetails\RunDetail.cs (4)
38
public
ITransformer
Model { get { return _modelContainer?.GetModel(); } }
53
IEstimator<
ITransformer
> estimator,
95
public IEstimator<
ITransformer
> Estimator { get; private set; }
101
IEstimator<
ITransformer
> estimator,
API\SweepableExtension.cs (5)
9
public static SweepablePipeline Append(this IEstimator<
ITransformer
> estimator, SweepableEstimator estimator1)
14
public static SweepablePipeline Append(this SweepablePipeline pipeline, IEstimator<
ITransformer
> estimator)
24
public static SweepablePipeline Append(this SweepableEstimator estimator, IEstimator<
ITransformer
> estimator1)
29
public static SweepablePipeline Append(this IEstimator<
ITransformer
> estimator, SweepablePipeline pipeline)
45
public static SweepablePipeline Append(this IEstimator<
ITransformer
> estimator, params SweepableEstimator[] estimators)
AutoMLExperiment\Runner\SweepablePipelineRunner.cs (1)
45
var models = new List<
ITransformer
>();
AutoMLExperiment\TrialResult.cs (2)
19
public
ITransformer
Model { get; set; }
67
public EstimatorChain<
ITransformer
> Pipeline { get; set; }
EstimatorExtensions\EstimatorExtensions.cs (28)
11
public IEstimator<
ITransformer
> CreateInstance(MLContext context, PipelineNode pipelineNode)
24
private static IEstimator<
ITransformer
> CreateInstance(MLContext context, string[] inColumns, string outColumn)
32
public IEstimator<
ITransformer
> CreateInstance(MLContext context, PipelineNode pipelineNode)
45
private static IEstimator<
ITransformer
> CreateInstance(MLContext context, string inColumn, string outColumn)
53
public IEstimator<
ITransformer
> CreateInstance(MLContext context, PipelineNode pipelineNode)
66
private static IEstimator<
ITransformer
> CreateInstance(MLContext context, string inColumn, string outColumn)
74
public IEstimator<
ITransformer
> CreateInstance(MLContext context, PipelineNode pipelineNode)
87
private static IEstimator<
ITransformer
> CreateInstance(MLContext context, string inColumn, string outColumn)
95
public IEstimator<
ITransformer
> CreateInstance(MLContext context, PipelineNode pipelineNode)
108
private static IEstimator<
ITransformer
> CreateInstance(MLContext context, string[] inColumns, string[] outColumns)
122
public IEstimator<
ITransformer
> CreateInstance(MLContext context, PipelineNode pipelineNode)
135
private static IEstimator<
ITransformer
> CreateInstance(MLContext context, string[] inColumns, string[] outColumns)
149
public IEstimator<
ITransformer
> CreateInstance(MLContext context, PipelineNode pipelineNode)
162
private static IEstimator<
ITransformer
> CreateInstance(MLContext context, string inColumn, string outColumn)
170
public IEstimator<
ITransformer
> CreateInstance(MLContext context, PipelineNode pipelineNode)
183
public static IEstimator<
ITransformer
> CreateInstance(MLContext context, string[] inColumns, string[] outColumns)
196
public IEstimator<
ITransformer
> CreateInstance(MLContext context, PipelineNode pipelineNode)
214
private static IEstimator<
ITransformer
> CreateInstance(MLContext context, string[] inColumns, string[] outColumns)
227
public IEstimator<
ITransformer
> CreateInstance(MLContext context, PipelineNode pipelineNode)
240
private static IEstimator<
ITransformer
> CreateInstance(MLContext context, string inColumn, string outColumn)
248
public IEstimator<
ITransformer
> CreateInstance(MLContext context, PipelineNode pipelineNode)
261
private static IEstimator<
ITransformer
> CreateInstance(MLContext context, string[] inColumns, string[] outColumns)
274
public IEstimator<
ITransformer
> CreateInstance(MLContext context, PipelineNode pipelineNode)
288
private static IEstimator<
ITransformer
> CreateInstance(MLContext context, string inColumn, string outColumn)
297
public IEstimator<
ITransformer
> CreateInstance(MLContext context, PipelineNode pipelineNode)
313
private static IEstimator<
ITransformer
> CreateInstance(MLContext context, string inColumn, string outColumn)
322
public IEstimator<
ITransformer
> CreateInstance(MLContext context, PipelineNode pipelineNode)
338
private static IEstimator<
ITransformer
> CreateInstance(MLContext context, string inColumn, string outColumn)
EstimatorExtensions\IEstimatorExtension.cs (1)
9
IEstimator<
ITransformer
> CreateInstance(MLContext context, PipelineNode pipelineNode);
Experiment\ModelContainer.cs (5)
13
private readonly
ITransformer
_model;
15
internal ModelContainer(MLContext mlContext,
ITransformer
model)
21
internal ModelContainer(MLContext mlContext, FileInfo fileInfo,
ITransformer
model, DataViewSchema modelInputSchema)
33
public
ITransformer
GetModel()
42
ITransformer
model;
Experiment\Runners\CrossValRunner.cs (4)
19
private readonly IEstimator<
ITransformer
> _preFeaturizer;
20
private readonly
ITransformer
[] _preprocessorTransforms;
30
IEstimator<
ITransformer
> preFeaturizer,
31
ITransformer
[] preprocessorTransforms,
Experiment\Runners\CrossValSummaryRunner.cs (4)
21
private readonly IEstimator<
ITransformer
> _preFeaturizer;
22
private readonly
ITransformer
[] _preprocessorTransforms;
33
IEstimator<
ITransformer
> preFeaturizer,
34
ITransformer
[] preprocessorTransforms,
Experiment\Runners\RunnerUtil.cs (2)
21
ITransformer
preprocessorTransform,
29
var
model = estimator.Fit(trainData);
Experiment\Runners\TrainValidateRunner.cs (4)
19
private readonly IEstimator<
ITransformer
> _preFeaturizer;
20
private readonly
ITransformer
_preprocessorTransform;
30
IEstimator<
ITransformer
> preFeaturizer,
31
ITransformer
preprocessorTransform,
Experiment\SuggestedPipeline.cs (3)
113
public IEstimator<
ITransformer
> ToEstimator(IDataView trainset = null,
116
IEstimator<
ITransformer
> pipeline = new EstimatorChain<
ITransformer
>();
Experiment\SuggestedPipelineRunDetails\SuggestedPipelineCrossValRunDetail.cs (1)
48
public CrossValidationRunDetail<TMetrics> ToIterationResult(IEstimator<
ITransformer
> preFeaturizer)
Experiment\SuggestedPipelineRunDetails\SuggestedPipelineRunDetail.cs (1)
52
public RunDetail<TMetrics> ToIterationResult(IEstimator<
ITransformer
> preFeaturizer)
Experiment\SuggestedPipelineRunDetails\SuggestedPipelineRunDetailUtil.cs (3)
9
public static IEstimator<
ITransformer
> PrependPreFeaturizer(IEstimator<
ITransformer
> estimator, IEstimator<
ITransformer
> preFeaturizer)
SweepableEstimator\Estimators\ApplyOnnx.cs (1)
9
public override IEstimator<
ITransformer
> BuildFromOption(MLContext context, ApplyOnnxModelOption param)
SweepableEstimator\Estimators\Calibrators.cs (1)
9
public override IEstimator<
ITransformer
> BuildFromOption(MLContext context, NaiveOption param)
SweepableEstimator\Estimators\Concatenate.cs (1)
9
public override IEstimator<
ITransformer
> BuildFromOption(MLContext context, ConcatOption param)
SweepableEstimator\Estimators\FastForest.cs (3)
11
public override IEstimator<
ITransformer
> BuildFromOption(MLContext context, FastForestOption param)
29
public override IEstimator<
ITransformer
> BuildFromOption(MLContext context, FastForestOption param)
47
public override IEstimator<
ITransformer
> BuildFromOption(MLContext context, FastForestOption param)
SweepableEstimator\Estimators\FastTree.cs (4)
11
public override IEstimator<
ITransformer
> BuildFromOption(MLContext context, FastTreeOption param)
34
public override IEstimator<
ITransformer
> BuildFromOption(MLContext context, FastTreeOption param)
57
public override IEstimator<
ITransformer
> BuildFromOption(MLContext context, FastTreeOption param)
80
public override IEstimator<
ITransformer
> BuildFromOption(MLContext context, FastTreeOption param)
SweepableEstimator\Estimators\FeaturizeText.cs (1)
9
public override IEstimator<
ITransformer
> BuildFromOption(MLContext context, FeaturizeTextOption param)
SweepableEstimator\Estimators\ForecastBySsa.cs (1)
11
public override IEstimator<
ITransformer
> BuildFromOption(MLContext context, SsaOption param)
SweepableEstimator\Estimators\Images.cs (6)
11
public override IEstimator<
ITransformer
> BuildFromOption(MLContext context, LoadImageOption param)
19
public override IEstimator<
ITransformer
> BuildFromOption(MLContext context, LoadImageOption param)
27
public override IEstimator<
ITransformer
> BuildFromOption(MLContext context, ResizeImageOption param)
35
public override IEstimator<
ITransformer
> BuildFromOption(MLContext context, ExtractPixelsOption param)
43
public override IEstimator<
ITransformer
> BuildFromOption(MLContext context, ImageClassificationOption param)
60
public override IEstimator<
ITransformer
> BuildFromOption(MLContext context, DnnFeaturizerImageOption param)
SweepableEstimator\Estimators\Lbfgs.cs (4)
11
public override IEstimator<
ITransformer
> BuildFromOption(MLContext context, LbfgsOption param)
29
public override IEstimator<
ITransformer
> BuildFromOption(MLContext context, LbfgsOption param)
47
public override IEstimator<
ITransformer
> BuildFromOption(MLContext context, LbfgsOption param)
65
public override IEstimator<
ITransformer
> BuildFromOption(MLContext context, LbfgsOption param)
SweepableEstimator\Estimators\LightGbm.cs (3)
11
public override IEstimator<
ITransformer
> BuildFromOption(MLContext context, LgbmOption param)
39
public override IEstimator<
ITransformer
> BuildFromOption(MLContext context, LgbmOption param)
67
public override IEstimator<
ITransformer
> BuildFromOption(MLContext context, LgbmOption param)
SweepableEstimator\Estimators\MapValueToKey.cs (2)
9
public override IEstimator<
ITransformer
> BuildFromOption(MLContext context, MapValueToKeyOption param)
17
public override IEstimator<
ITransformer
> BuildFromOption(MLContext context, MapKeyToValueOption param)
SweepableEstimator\Estimators\MatrixFactorization.cs (1)
9
public override IEstimator<
ITransformer
> BuildFromOption(MLContext context, MatrixFactorizationOption param)
SweepableEstimator\Estimators\NamedEntityRecognitionMulti.cs (1)
15
public override IEstimator<
ITransformer
> BuildFromOption(MLContext context, NamedEntityRecognitionOption param)
SweepableEstimator\Estimators\NormalizeMinMax.cs (1)
9
public override IEstimator<
ITransformer
> BuildFromOption(MLContext context, NormalizeMinMaxOption param)
SweepableEstimator\Estimators\NormalizeText.cs (1)
13
public override IEstimator<
ITransformer
> BuildFromOption(MLContext context, NormalizeTextOption param)
SweepableEstimator\Estimators\ObjectDetection.cs (1)
15
public override IEstimator<
ITransformer
> BuildFromOption(MLContext context, ObjectDetectionOption param)
SweepableEstimator\Estimators\OneHotEncoding.cs (2)
9
public override IEstimator<
ITransformer
> BuildFromOption(MLContext context, OneHotOption param)
18
public override IEstimator<
ITransformer
> BuildFromOption(MLContext context, OneHotOption param)
SweepableEstimator\Estimators\QuestionAnswering.cs (1)
12
public override IEstimator<
ITransformer
> BuildFromOption(MLContext context, QuestionAnsweringOption param)
SweepableEstimator\Estimators\ReplaceMissingValue.cs (1)
9
public override IEstimator<
ITransformer
> BuildFromOption(MLContext context, ReplaceMissingValueOption param)
SweepableEstimator\Estimators\Sdca.cs (4)
11
public override IEstimator<
ITransformer
> BuildFromOption(MLContext context, SdcaOption param)
29
public override IEstimator<
ITransformer
> BuildFromOption(MLContext context, SdcaOption param)
47
public override IEstimator<
ITransformer
> BuildFromOption(MLContext context, SdcaOption param)
65
public override IEstimator<
ITransformer
> BuildFromOption(MLContext context, SdcaOption param)
SweepableEstimator\Estimators\SentenceSimilarity.cs (1)
15
public override IEstimator<
ITransformer
> BuildFromOption(MLContext context, SentenceSimilarityOption param)
SweepableEstimator\Estimators\TextClassification.cs (1)
15
public override IEstimator<
ITransformer
> BuildFromOption(MLContext context, TextClassificationOption param)
SweepableEstimator\Estimators\TypeConvert.cs (1)
9
public override IEstimator<
ITransformer
> BuildFromOption(MLContext context, ConvertTypeOption param)
SweepableEstimator\ISweepable.cs (1)
18
where T : IEstimator<
ITransformer
>
SweepableEstimator\SweepableEstimator.cs (6)
17
public class SweepableEstimator : Estimator, ISweepable<IEstimator<
ITransformer
>>
19
private readonly Func<MLContext, Parameter, IEstimator<
ITransformer
>> _factory;
21
public SweepableEstimator(Func<MLContext, Parameter, IEstimator<
ITransformer
>> factory, SearchSpace.SearchSpace ss)
43
public virtual IEstimator<
ITransformer
> BuildFromOption(MLContext context, Parameter param)
60
public abstract IEstimator<
ITransformer
> BuildFromOption(MLContext context, TOption param);
71
public override IEstimator<
ITransformer
> BuildFromOption(MLContext context, Parameter param)
SweepableEstimator\SweepableEstimatorPipeline.cs (2)
75
public EstimatorChain<
ITransformer
> BuildTrainingPipeline(MLContext context, Parameter parameter)
78
var pipeline = new EstimatorChain<
ITransformer
>();
SweepableEstimator\SweepablePipeline.cs (4)
17
public class SweepablePipeline : ISweepable<EstimatorChain<
ITransformer
>>
84
public EstimatorChain<
ITransformer
> BuildFromOption(MLContext context, Parameter parameter)
87
var pipeline = new EstimatorChain<
ITransformer
>();
117
public SweepablePipeline Append(params ISweepable<IEstimator<
ITransformer
>>[] sweepables)
TransformInference\TransformInference.cs (2)
15
public readonly IEstimator<
ITransformer
> Estimator;
18
public SuggestedTransform(PipelineNode pipelineNode, IEstimator<
ITransformer
> estimator)
Microsoft.ML.AutoML.Samples (3)
AutoMLExperiment.cs (1)
59
var
bestModel = result.Model;
Sweepable\SweepableLightGBMBinaryExperiment.cs (2)
55
var pipeline = new EstimatorChain<
ITransformer
>().Append(lgbm);
86
var
bestModel = result.Model;
Microsoft.ML.AutoML.Tests (12)
AutoFitTests.cs (8)
145
var
model = result.BestRun.Estimator.Fit(trainData);
250
var
model = result.BestRun.Estimator.Fit(context.Data.TakeRows(dataset, 1000));
293
var
model = result.BestRun.Estimator.Fit(trainData);
324
var
model = result.BestRun.Estimator.Fit(trainData);
600
var
modelFull = context.Auto()
607
var
modelTrainTest = context.Auto()
614
var
modelCV = context.Auto()
623
foreach (
var
model in models)
Utils\TaskAgnosticAutoFit.cs (2)
44
IEstimator<
ITransformer
> preFeaturizers = null,
132
ITransformer
model,
Utils\TaskAgnosticIterationResult.cs (2)
18
internal readonly
ITransformer
Model;
22
internal IEstimator<
ITransformer
> Estimator;
Microsoft.ML.Core (1)
Data\IEstimator.cs (1)
309
where TTransformer :
ITransformer
Microsoft.ML.Core.Tests (3)
UnitTests\TestCustomTypeRegister.cs (2)
190
ITransformer
modelForPrediction = model;
226
var
trainedModel = ML.Model.Load(modelPath, out var dataViewSchema);
UnitTests\TestEntryPoints.cs (1)
6586
ITransformer
loadedModel;
Microsoft.ML.Data (148)
DataLoadSave\CompositeDataLoader.cs (5)
10
[assembly: LoadableClass(CompositeDataLoader<IMultiStreamSource,
ITransformer
>.Summary, typeof(CompositeDataLoader<IMultiStreamSource,
ITransformer
>), null, typeof(SignatureLoadModel),
11
"Composite Loader", CompositeDataLoader<IMultiStreamSource,
ITransformer
>.LoaderSignature)]
20
where TLastTransformer : class,
ITransformer
84
where TNewLast : class,
ITransformer
DataLoadSave\CompositeLoaderEstimator.cs (2)
13
where TLastTransformer : class,
ITransformer
50
where TNewTrans : class,
ITransformer
DataLoadSave\EstimatorChain.cs (8)
14
/// If the chain is empty, <typeparamref name="TLastTransformer"/> is always <see cref="
ITransformer
"/>.
17
where TLastTransformer : class,
ITransformer
23
private readonly IEstimator<
ITransformer
>[] _estimators;
27
private EstimatorChain(IHostEnvironment env, IEstimator<
ITransformer
>[] estimators, TransformerScope[] scopes, bool[] needCacheAfter)
37
_estimators = estimators ?? new IEstimator<
ITransformer
>[0];
52
_estimators = new IEstimator<
ITransformer
>[0];
64
var xfs = new
ITransformer
[_estimators.Length];
92
where TNewTrans : class,
ITransformer
DataLoadSave\EstimatorExtensions.cs (17)
22
where TTrans : class,
ITransformer
27
return new CompositeLoaderEstimator<TSource,
ITransformer
>(start).Append(estimator);
35
where TTrans : class,
ITransformer
47
this IEstimator<
ITransformer
> start, IEstimator<TTrans> estimator,
49
where TTrans : class,
ITransformer
54
if (start is EstimatorChain<
ITransformer
> est)
57
return new EstimatorChain<
ITransformer
>().Append(start).Append(estimator, scope);
68
where TTrans : class,
ITransformer
71
return new EstimatorChain<
ITransformer
>().Append(start).AppendCacheCheckpoint(env);
78
where TTrans : class,
ITransformer
83
return new CompositeDataLoader<TSource,
ITransformer
>(loader).AppendTransformer(transformer);
89
public static TransformerChain<TTrans> Append<TTrans>(this
ITransformer
start, TTrans transformer)
90
where TTrans : class,
ITransformer
99
where TTransformer : class,
ITransformer
127
/// <see cref="
ITransformer
"/>. However, at the same time, <see cref="IEstimator{TTransformer}"/> are often formed into pipelines
132
/// <typeparam name="TTransformer">The type of <see cref="
ITransformer
"/> returned by <paramref name="estimator"/></typeparam>
146
where TTransformer : class,
ITransformer
DataLoadSave\LegacyCompositeDataLoader.cs (4)
403
internal TransformerChain<
ITransformer
> GetTransformer()
405
var result = new TransformerChain<
ITransformer
>();
410
var
transformer = mapper.GetTransformer();
415
ITransformer
transformer = new TransformWrapper(_host, transform.Transform);
DataLoadSave\TransformerChain.cs (34)
16
[assembly: LoadableClass(typeof(TransformerChain<
ITransformer
>), typeof(TransformerChain), null, typeof(SignatureLoadModel),
39
/// Used to determine if <see cref="
ITransformer
"/> object is of type <see cref="TransformerChain"/>
45
ITransformer
[] Transformers { get; }
51
/// For an empty chain, <typeparamref name="TLastTransformer"/> is always <see cref="
ITransformer
"/>.
54
where TLastTransformer : class,
ITransformer
56
private readonly
ITransformer
[] _transformers;
62
bool
ITransformer
.IsRowToRowMapper => _transformers.All(t => t.IsRowToRowMapper);
64
ITransformer
[] ITransformerChainAccessor.Transformers => _transformers;
84
public TransformerChain(IEnumerable<
ITransformer
> transformers, IEnumerable<TransformerScope> scopes)
89
_transformers = transformers?.ToArray() ?? new
ITransformer
[0];
102
public TransformerChain(params
ITransformer
[] transformers)
108
_transformers = new
ITransformer
[0];
134
foreach (
var
xf in chain)
157
foreach (
var
transformer in chain)
165
public TransformerChain<
ITransformer
> GetModelFor(TransformerScope scopeFilter)
167
var xfs = new List<
ITransformer
>();
177
return new TransformerChain<
ITransformer
>(xfs.ToArray(), scopes.ToArray());
181
where TNewLast : class,
ITransformer
208
_transformers = new
ITransformer
[len];
214
ctx.LoadModel<
ITransformer
, SignatureLoadModel>(env, out _transformers[i], dirName);
236
public IEnumerator<
ITransformer
> GetEnumerator() => ((IEnumerable<
ITransformer
>)_transformers).GetEnumerator();
240
IRowToRowMapper
ITransformer
.GetRowToRowMapper(DataViewSchema inputSchema)
243
Contracts.Check(((
ITransformer
)this).IsRowToRowMapper, nameof(
ITransformer
.GetRowToRowMapper) + " method called despite " +
244
nameof(
ITransformer
.IsRowToRowMapper) + " being false.");
264
foreach (
var
transformer in _transformers)
279
private static TransformerChain<
ITransformer
> Create(IHostEnvironment env, ModelLoadContext ctx)
280
=> new TransformerChain<
ITransformer
>(env, ctx);
285
public static void SaveTo(this
ITransformer
transformer, IHostEnvironment env, Stream outputStream)
286
=> new TransformerChain<
ITransformer
>(transformer).SaveTo(env, outputStream);
288
public static
ITransformer
LoadFromLegacy(IHostEnvironment env, Stream stream)
291
TransformerChain<
ITransformer
> transformChain = (chain as LegacyCompositeDataLoader).GetTransformer();
299
ITransformer
pred = null;
DataLoadSave\TransformWrapper.cs (3)
11
/// This is a shim class to present the legacy <see cref="IDataTransform"/> interface as an <see cref="
ITransformer
"/>.
47
bool
ITransformer
.IsRowToRowMapper => _xf is IRowToRowMapper;
49
IRowToRowMapper
ITransformer
.GetRowToRowMapper(DataViewSchema inputSchema)
DataLoadSave\TrivialEstimator.cs (1)
17
where TTransformer : class,
ITransformer
DataView\RowToRowMapperTransform.cs (2)
56
ITransformer
GetTransformer();
423
internal
ITransformer
GetTransformer()
DebuggerExtensions.cs (2)
31
public static DataDebuggerPreview Preview(this
ITransformer
transformer, IDataView data, int maxRows = DataDebuggerPreview.Defaults.MaxRows)
41
public static DataDebuggerPreview Preview(this IEstimator<
ITransformer
> estimator, IDataView data, int maxRows = DataDebuggerPreview.Defaults.MaxRows,
Evaluators\EvaluatorBase.cs (1)
543
public
ITransformer
GetTransformer()
Model\ModelOperationsCatalog.cs (22)
39
public void Save<TSource>(
ITransformer
model, IDataLoader<TSource> loader, Stream stream)
47
var chainedModel = model == null ? null : new TransformerChain<
ITransformer
>(model);
48
var compositeLoader = new CompositeDataLoader<TSource,
ITransformer
>(loader, chainedModel);
65
public void Save<TSource>(
ITransformer
model, IDataLoader<TSource> loader, string filePath)
83
public void Save(
ITransformer
model, DataViewSchema inputSchema, Stream stream)
91
ModelSaveContext.SaveModel(rep, model, CompositeDataLoader<object,
ITransformer
>.TransformerDirectory);
112
public void Save(
ITransformer
model, DataViewSchema inputSchema, string filePath)
152
public
ITransformer
Load(Stream stream, out DataViewSchema inputSchema)
163
ModelLoadContext.LoadModel<
ITransformer
, SignatureLoadModel>(_env, out var transformerChain, rep,
164
CompositeDataLoader<object,
ITransformer
>.TransformerDirectory);
172
if (ModelLoadContext.LoadModelOrNull<
ITransformer
, SignatureLoadModel>(_env, out var transformerChain, rep,
173
CompositeDataLoader<object,
ITransformer
>.TransformerDirectory))
191
var
transformer = DecomposeLoader(ref dataLoader);
211
public
ITransformer
Load(string filePath, out DataViewSchema inputSchema)
224
private
ITransformer
DecomposeLoader(ref IDataLoader<IMultiStreamSource> loader)
228
if (loader is CompositeDataLoader<IMultiStreamSource,
ITransformer
> composite)
247
return new TransformerChain<
ITransformer
>();
258
public
ITransformer
LoadWithDataLoader(Stream stream, out IDataLoader<IMultiStreamSource> loader)
286
public
ITransformer
LoadWithDataLoader(string filePath, out IDataLoader<IMultiStreamSource> loader)
312
public PredictionEngine<TSrc, TDst> CreatePredictionEngine<TSrc, TDst>(
ITransformer
transformer,
329
public PredictionEngine<TSrc, TDst> CreatePredictionEngine<TSrc, TDst>(
ITransformer
transformer, DataViewSchema inputSchema)
346
public PredictionEngine<TSrc, TDst> CreatePredictionEngine<TSrc, TDst>(
ITransformer
transformer, PredictionEngineOptions options)
Model\PredictionEngineExtensions.cs (1)
28
public static PredictionEngine<TSrc, TDst> CreatePredictionEngine<TSrc, TDst>(this
ITransformer
transformer,
Prediction\CalibratorCatalog.cs (4)
210
bool
ITransformer
.IsRowToRowMapper => true;
399
/// The <see cref="
ITransformer
"/> implementation obtained by training a <see cref="FixedPlattCalibratorEstimator"/> or a <see cref="PlattCalibratorEstimator"/>.
450
/// The <see cref="
ITransformer
"/> implementation obtained by training a <see cref="NaiveCalibratorEstimator"/>
500
/// The <see cref="
ITransformer
"/> implementation obtained by training a <see cref="IsotonicCalibratorEstimator"/>
Prediction\IPredictionTransformer.cs (2)
25
/// to score the data of an input <see cref="IDataView"/> through the <see cref="
ITransformer
.Transform(IDataView)"/>
41
/// through the <see cref="
ITransformer
.Transform(IDataView)"/>
Prediction\PredictionEngine.cs (4)
61
internal PredictionEngine(IHostEnvironment env,
ITransformer
transformer, bool ignoreMissingColumns,
105
private protected
ITransformer
Transformer { get; }
108
private protected PredictionEngineBase(IHostEnvironment env,
ITransformer
transformer, bool ignoreMissingColumns,
132
private protected virtual Func<DataViewSchema, IRowToRowMapper> TransformerChecker(IExceptionContext ectx,
ITransformer
transformer)
Scorers\PredictionTransformer.cs (3)
65
/// Whether a call to <see cref="
ITransformer
.GetRowToRowMapper(DataViewSchema)"/> should succeed, on an
68
bool
ITransformer
.IsRowToRowMapper => true;
157
IRowToRowMapper
ITransformer
.GetRowToRowMapper(DataViewSchema inputSchema)
TrainCatalog.cs (13)
35
public readonly
ITransformer
Model;
45
public CrossValidationResult(
ITransformer
model, IDataView scores, int fold)
65
public readonly
ITransformer
Model;
75
internal CrossValidationResult(
ITransformer
model, T metrics, IDataView scores, int fold)
89
private protected CrossValidationResult[] CrossValidateTrain(IDataView data, IEstimator<
ITransformer
> estimator,
105
var
model = estimator.Fit(split.TrainSet);
109
scoredTest = (Unsafe.As<TransformerChain<
ITransformer
>>(model)).Transform(split.TestSet, TransformerScope.Everything);
250
IDataView data, IEstimator<
ITransformer
> estimator, int numberOfFolds = 5, string labelColumnName = DefaultColumnNames.Label,
275
IDataView data, IEstimator<
ITransformer
> estimator, int numberOfFolds = 5, string labelColumnName = DefaultColumnNames.Label,
474
IDataView data, IEstimator<
ITransformer
> estimator, int numberOfFolds = 5, string labelColumnName = null, string featuresColumnName = null,
554
IDataView data, IEstimator<
ITransformer
> estimator, int numberOfFolds = 5, string labelColumnName = DefaultColumnNames.Label,
624
IDataView data, IEstimator<
ITransformer
> estimator, int numberOfFolds = 5, string labelColumnName = DefaultColumnNames.Label,
715
IDataView data, IEstimator<
ITransformer
> estimator, int numberOfFolds = 5, string labelColumnName = DefaultColumnNames.Label,
Training\TrainerEstimatorBase.cs (1)
72
/// <summary> Trains and returns a <see cref="
ITransformer
"/>.</summary>
Transforms\ColumnConcatenatingTransformer.cs (1)
36
/// <see cref="
ITransformer
"/> resulting from fitting an <see cref="ColumnConcatenatingEstimator"/>.
Transforms\ColumnCopying.cs (1)
89
/// <see cref="
ITransformer
"/> resulting from fitting a <see cref="ColumnCopyingEstimator"/>.
Transforms\ColumnSelecting.cs (4)
148
/// <see cref="
ITransformer
"/> resulting from fitting an <see cref="ColumnSelectingEstimator"/>.
165
bool
ITransformer
.IsRowToRowMapper => true;
485
/// Constructs a row-to-row mapper based on an input schema. If <see cref="
ITransformer
.IsRowToRowMapper"/>
491
IRowToRowMapper
ITransformer
.GetRowToRowMapper(DataViewSchema inputSchema)
Transforms\FeatureContributionCalculationTransformer.cs (1)
29
/// <see cref="
ITransformer
"/> resulting from fitting a <see cref="FeatureContributionCalculatingEstimator"/>.
Transforms\Hashing.cs (1)
33
/// <see cref="
ITransformer
"/> resulting from fitting a <see cref="HashingEstimator"/>.
Transforms\KeyToValue.cs (1)
35
/// <see cref="
ITransformer
"/> resulting from fitting a <see cref="KeyToValueMappingEstimator"/>.
Transforms\KeyToVector.cs (1)
34
/// <see cref="
ITransformer
"/> resulting from fitting a <see cref="KeyToVectorMappingEstimator"/>.
Transforms\Normalizer.cs (1)
373
/// <see cref="
ITransformer
"/> resulting from fitting an <see cref="NormalizingEstimator"/>.
Transforms\RowToRowTransformerBase.cs (3)
29
bool
ITransformer
.IsRowToRowMapper => true;
31
IRowToRowMapper
ITransformer
.GetRowToRowMapper(DataViewSchema inputSchema)
119
public
ITransformer
GetTransformer() => _parent;
Transforms\TransformInputBase.cs (1)
20
/// create an <see cref="
ITransformer
"/> is to use the <see cref="IEstimator{TTransformer}.Fit(IDataView)"/> method.
Transforms\TypeConverting.cs (1)
54
/// <see cref="
ITransformer
"/> resulting from fitting a <see cref="TypeConvertingEstimator"/>.
Transforms\ValueMapping.cs (1)
347
/// <see cref="
ITransformer
"/> resulting from fitting a <see cref="ValueMappingEstimator"/>.
Transforms\ValueToKeyMappingTransformer.cs (1)
38
/// <see cref="
ITransformer
"/> resulting from fitting a <see cref="ValueToKeyMappingEstimator"/>.
Utilities\ModelFileUtils.cs (1)
74
ModelLoadContext.LoadModel<
ITransformer
, SignatureLoadModel>(env, out var transformerChain, rep, DirTransformerChain);
Microsoft.ML.Fairlearn.Tests (1)
GridSearchTest.cs (1)
105
var
model = bestResult.Model;
Microsoft.ML.FastTree (2)
TreeEnsembleFeaturizationEstimator.cs (1)
16
/// requires an input feature column name and a suffix for all output columns. The <see cref="
ITransformer
"/> returned by <see cref="Fit(IDataView)"/>
TreeEnsembleFeaturizationTransformer.cs (1)
18
/// <see cref="
ITransformer
"/> resulting from fitting any derived class of <see cref="TreeEnsembleFeaturizationEstimatorBase"/>.
Microsoft.ML.ImageAnalytics (10)
ImageGrayscale.cs (2)
33
/// <see cref="
ITransformer
"/> resulting from fitting an <see cref="ImageGrayscalingTransformer"/>.
79
/// The input and output column pairs passed to this <see cref="
ITransformer
"/>.
ImageLoader.cs (2)
34
/// <see cref="
ITransformer
"/> resulting from fitting a <see cref="ImageLoadingEstimator"/>.
81
/// The columns passed to this <see cref="
ITransformer
"/>.
ImagePixelExtractor.cs (2)
32
/// <see cref="
ITransformer
"/> resulting from fitting an <see cref="ImagePixelExtractingEstimator"/>.
146
/// The columns passed to this <see cref="
ITransformer
"/>.
ImageResizer.cs (2)
33
/// <see cref="
ITransformer
"/> resulting from fitting an <see cref="ImageResizingEstimator"/>.
111
/// The columns passed to this <see cref="
ITransformer
"/>.
VectorToImageTransform.cs (2)
32
/// <see cref="
ITransformer
"/> resulting from fitting a <see cref="VectorToImageConvertingEstimator"/>.
174
/// The columns passed to this <see cref="
ITransformer
"/>.
Microsoft.ML.IntegrationTests (42)
Debugging.cs (1)
62
var
model = pipeline.Fit(data);
Explainability.cs (2)
49
ITransformer
loadedModel;
60
linearPredictor = (loadedModel as TransformerChain<
ITransformer
>).LastTransformer as RegressionPredictionTransformer<FastTreeRegressionModelParameters>;
IntrospectiveTraining.cs (1)
307
foreach (
var
transformer in model)
ModelFiles.cs (33)
107
ITransformer
serializedModel;
162
ITransformer
loadedTransformerModel;
164
ITransformer
loadedTransformerModel1;
171
var
t = mlContext.Model.LoadWithDataLoader(fs, out loadedCompositeLoader);
176
var
t1 = mlContext.Model.Load(fs, out var s);
180
Assert.Empty(Assert.IsType<TransformerChain<
ITransformer
>>(t));
181
Assert.Empty(Assert.IsType<TransformerChain<
ITransformer
>>(t1));
187
var
t = mlContext.Model.Load(fs, out var s);
193
static void AssertIsGam(
ITransformer
trans)
209
var
fromComposite = Assert.Single(Assert.IsType<TransformerChain<
ITransformer
>>(
210
Assert.IsType<CompositeDataLoader<IMultiStreamSource,
ITransformer
>>(loadedCompositeLoader).Transformer));
239
ITransformer
trainedModel;
282
ITransformer
loadedModelWithoutLoader;
283
ITransformer
loadedModelWithLoader;
338
ITransformer
loadedModel;
363
Load(mlContext, modelPath, out
var
loadedWithSchema, out var loadedSchema,
364
out
var
loadedWithLoader, out var loadedLoaderWithTransformer);
365
Assert.True(loadedWithSchema is TransformerChain<
ITransformer
>);
366
Assert.False((loadedWithSchema as TransformerChain<
ITransformer
>).Any());
371
Assert.True(loadedWithLoader is TransformerChain<
ITransformer
>);
372
Assert.False((loadedWithLoader as TransformerChain<
ITransformer
>).Any());
394
Load(mlContext, modelPath, out
var
loadedWithSchema, out var loadedSchema,
395
out
var
loadedWithLoader, out var loadedLoaderWithTransformer);
399
Assert.Empty(Assert.IsType<TransformerChain<
ITransformer
>>(loadedWithSchema));
400
Assert.Empty(Assert.IsType<TransformerChain<
ITransformer
>>(loadedWithLoader));
414
var compositeLoader = Assert.IsType<CompositeDataLoader<IMultiStreamSource,
ITransformer
>>(loadedLoaderWithTransformer);
441
Load(mlContext, modelPath, out
var
loadedWithSchema, out var loadedInputSchema,
442
out
var
loadedWithLoader, out var loadedLoaderWithTransformer);
465
Load(mlContext, modelPath, out
var
loadedWithSchema, out var loadedSchema,
466
out
var
loadedWithLoader, out var loadedLoaderWithTransformer);
476
private void Load(MLContext mlContext, string filename, out
ITransformer
loadedWithSchema, out DataViewSchema loadedSchema,
477
out
ITransformer
loadedWithLoader, out IDataLoader<IMultiStreamSource> loadedLoaderWithTransformer)
Prediction.cs (2)
62
var transformers = new List<
ITransformer
>();
63
foreach (
var
transform in model)
SchemaDefinitionTests.cs (1)
89
model = model.Append(custom.Fit(model.Transform(loader.Load(data))) as
ITransformer
);
Validation.cs (2)
113
.AppendCacheCheckpoint(mlContext) as IEstimator<
ITransformer
>;
116
var
preprocessor = pipeline.Fit(trainData);
Microsoft.ML.OnnxConverter (21)
OnnxExportExtensions.cs (21)
18
private static ModelProto ConvertToOnnxProtobufCore(IHostEnvironment env, OnnxContextImpl ctx,
ITransformer
transform, IDataView inputData, string[] outputColumnNamesToKeep = null)
42
/// Convert the specified <see cref="
ITransformer
"/> to ONNX format. Note that ONNX uses Google's Protobuf so the returned value is a Protobuf object.
44
/// <param name="catalog">The class that <see cref="ConvertToOnnxProtobuf(ModelOperationsCatalog,
ITransformer
, IDataView, string[])"/> attached to.</param>
45
/// <param name="transform">The <see cref="
ITransformer
"/> that will be converted into ONNX format.</param>
50
internal static ModelProto ConvertToOnnxProtobuf(this ModelOperationsCatalog catalog,
ITransformer
transform, IDataView inputData, string[] outputColumns = null)
58
/// Convert the specified <see cref="
ITransformer
"/> to ONNX format. Note that ONNX uses Google's Protobuf so the returned value is a Protobuf object.
60
/// <param name="catalog">The class that <see cref="ConvertToOnnxProtobuf(ModelOperationsCatalog,
ITransformer
, IDataView, int)"/> attached to.</param>
61
/// <param name="transform">The <see cref="
ITransformer
"/> that will be converted into ONNX format.</param>
66
internal static ModelProto ConvertToOnnxProtobuf(this ModelOperationsCatalog catalog,
ITransformer
transform, IDataView inputData, int opSetVersion)
74
/// Convert the specified <see cref="
ITransformer
"/> to ONNX format and writes to a stream.
76
/// <param name="catalog">The class that <see cref="ConvertToOnnx(ModelOperationsCatalog,
ITransformer
, IDataView, Stream)"/> attached to.</param>
77
/// <param name="transform">The <see cref="
ITransformer
"/> that will be converted into ONNX format.</param>
81
public static void ConvertToOnnx(this ModelOperationsCatalog catalog,
ITransformer
transform, IDataView inputData, Stream stream) =>
85
/// Convert the specified <see cref="
ITransformer
"/> to ONNX format and writes to a stream.
87
/// <param name="catalog">The class that <see cref="ConvertToOnnx(ModelOperationsCatalog,
ITransformer
, IDataView, int, Stream)"/> attached to.</param>
88
/// <param name="transform">The <see cref="
ITransformer
"/> that will be converted into ONNX format.</param>
93
public static void ConvertToOnnx(this ModelOperationsCatalog catalog,
ITransformer
transform, IDataView inputData, int opSetVersion, Stream stream) =>
97
/// Convert the specified <see cref="
ITransformer
"/> to ONNX format and writes to a stream.
99
/// <param name="catalog">The class that <see cref="ConvertToOnnx(ModelOperationsCatalog,
ITransformer
, IDataView, Stream)"/> attached to.</param>
100
/// <param name="transform">The <see cref="
ITransformer
"/> that will be converted into ONNX format.</param>
105
public static void ConvertToOnnx(this ModelOperationsCatalog catalog,
ITransformer
transform, IDataView inputData, Stream stream, params string[] outputColumns) =>
Microsoft.ML.OnnxTransformer (1)
OnnxTransform.cs (1)
38
/// <see cref="
ITransformer
"/> resulting from fitting an <see cref="OnnxScoringEstimator"/>.
Microsoft.ML.OnnxTransformerTest (4)
DnnImageFeaturizerTest.cs (1)
238
var
loadedModel = ML.Model.Load(modelPath, out var inputSchema);
OnnxTransformTests.cs (3)
267
var
loadedModel = ML.Model.Load(tempPath, out DataViewSchema modelSchema);
318
var
loadedModel = ML.Model.Load(tempPath, out DataViewSchema modelSchema);
1078
ITransformer
loadedModel = null;
Microsoft.ML.PerformanceTests (10)
FeaturizeTextBench.cs (3)
51
public
ITransformer
TrainFeaturizeText()
74
IEstimator<
ITransformer
> pipeline = featurizers.First();
80
var
model = pipeline.Fit(_dataset);
HashBench.cs (3)
88
var mapper = ((
ITransformer
)xf).GetRowToRowMapper(_inRow.Schema);
104
var
estimator = _env.Model.Load(modelPath, out var schema);
105
var mapper = ((
ITransformer
)estimator).GetRowToRowMapper(_inRow.Schema);
Helpers\EnvironmentFactory.cs (2)
16
where TTransformer :
ITransformer
32
where TTransformer :
ITransformer
TextPredictionEngineCreation.cs (2)
17
private
ITransformer
_trainedModel;
18
private
ITransformer
_trainedModelOldFormat;
Microsoft.ML.Recommender (1)
RecommenderCatalog.cs (1)
136
IDataView data, IEstimator<
ITransformer
> estimator, int numberOfFolds = 5, string labelColumnName = DefaultColumnNames.Label,
Microsoft.ML.Samples (35)
Dynamic\ModelOperations\SaveLoadModel.cs (1)
28
ITransformer
model = mlContext.Transforms.Conversion
Dynamic\ModelOperations\SaveLoadModelFile.cs (1)
28
ITransformer
model = mlContext.Transforms.Conversion
Dynamic\Trainers\BinaryClassification\PermutationFeatureImportanceLoadFromDisk.cs (2)
36
var
model = mlContext.Model.Load(modelPath, out var schema);
41
var linearPredictor = (model as TransformerChain<
ITransformer
>).LastTransformer as BinaryPredictionTransformer<CalibratedModelParametersBase<LinearBinaryModelParameters, PlattCalibrator>>;
Dynamic\Trainers\MulticlassClassification\ImageClassification\ImageClassificationDefault.cs (3)
95
ITransformer
loadedModel;
127
MLContext mlContext,
ITransformer
trainedModel)
153
IDataView testDataset,
ITransformer
trainedModel)
Dynamic\Trainers\MulticlassClassification\ImageClassification\LearningRateSchedulingCifarResnetTransferLearning.cs (3)
130
ITransformer
loadedModel;
153
MLContext mlContext,
ITransformer
trainedModel)
179
IDataView testDataset,
ITransformer
trainedModel)
Dynamic\Trainers\MulticlassClassification\ImageClassification\ResnetV2101TransferLearningEarlyStopping.cs (3)
120
ITransformer
loadedModel;
148
MLContext mlContext,
ITransformer
trainedModel,
177
IDataView testDataset,
ITransformer
trainedModel)
Dynamic\Trainers\MulticlassClassification\ImageClassification\ResnetV2101TransferLearningTrainTestSplit.cs (3)
112
ITransformer
loadedModel;
136
MLContext mlContext,
ITransformer
trainedModel)
162
IDataView testDataset,
ITransformer
trainedModel)
Dynamic\Trainers\MulticlassClassification\PermutationFeatureImportanceLoadFromDisk.cs (2)
44
var
model = mlContext.Model.Load(modelPath, out var schema);
50
var linearPredictor = (model as TransformerChain<
ITransformer
>).LastTransformer as MulticlassPredictionTransformer<MaximumEntropyModelParameters>;
Dynamic\Trainers\Ranking\PermutationFeatureImportanceLoadFromDisk.cs (2)
43
var
model = mlContext.Model.Load(modelPath, out var schema);
49
var linearPredictor = (model as TransformerChain<
ITransformer
>).LastTransformer as RankingPredictionTransformer<FastTreeRankingModelParameters>;
Dynamic\Trainers\Regression\PermutationFeatureImportanceLoadFromDisk.cs (2)
42
var
model = mlContext.Model.Load(modelPath, out var schema);
48
var linearPredictor = (model as TransformerChain<
ITransformer
>).LastTransformer as RegressionPredictionTransformer<OlsModelParameters>;
Dynamic\Transforms\CustomMappingSaveAndLoad.cs (1)
55
var
loadedTransform = mlContext.Model.Load("customTransform.zip", out
Dynamic\Transforms\Text\FeaturizeText.cs (1)
57
var
textTransformer = textPipeline.Fit(dataview);
Dynamic\Transforms\Text\FeaturizeTextWithOptions.cs (1)
75
var
textTransformer = textPipeline.Fit(dataview);
Dynamic\Transforms\Text\ProduceHashedWordBags.cs (1)
55
var
textTransformer = textPipeline.Fit(dataview);
Dynamic\Transforms\Text\ProduceWordBags.cs (1)
61
var
textTransformer = textPipeline.Fit(dataview);
Dynamic\Transforms\TimeSeries\DetectAnomalyBySrCnn.cs (1)
41
ITransformer
model = ml.Transforms.DetectAnomalyBySrCnn(
Dynamic\Transforms\TimeSeries\DetectChangePointBySsa.cs (1)
59
ITransformer
model = ml.Transforms.DetectChangePointBySsa(
Dynamic\Transforms\TimeSeries\DetectChangePointBySsaStream.cs (1)
59
ITransformer
model = ml.Transforms.DetectChangePointBySsa(
Dynamic\Transforms\TimeSeries\DetectIidChangePoint.cs (1)
57
ITransformer
model = ml.Transforms.DetectIidChangePoint(
Dynamic\Transforms\TimeSeries\DetectIidSpike.cs (1)
49
ITransformer
model = ml.Transforms.DetectIidSpike(outputColumnName,
Dynamic\Transforms\TimeSeries\DetectSpikeBySsa.cs (1)
55
ITransformer
model = ml.Transforms.DetectSpikeBySsa(outputColumnName,
Dynamic\Transforms\TimeSeries\Forecasting.cs (1)
77
ITransformer
modelCopy;
Dynamic\Transforms\TimeSeries\ForecastingWithConfidenceInterval.cs (1)
82
ITransformer
modelCopy;
Microsoft.ML.Samples.GPU (12)
docs\samples\Microsoft.ML.Samples\Dynamic\Trainers\MulticlassClassification\ImageClassification\ImageClassificationDefault.cs (3)
95
ITransformer
loadedModel;
127
MLContext mlContext,
ITransformer
trainedModel)
153
IDataView testDataset,
ITransformer
trainedModel)
docs\samples\Microsoft.ML.Samples\Dynamic\Trainers\MulticlassClassification\ImageClassification\LearningRateSchedulingCifarResnetTransferLearning.cs (3)
130
ITransformer
loadedModel;
153
MLContext mlContext,
ITransformer
trainedModel)
179
IDataView testDataset,
ITransformer
trainedModel)
docs\samples\Microsoft.ML.Samples\Dynamic\Trainers\MulticlassClassification\ImageClassification\ResnetV2101TransferLearningEarlyStopping.cs (3)
120
ITransformer
loadedModel;
148
MLContext mlContext,
ITransformer
trainedModel,
177
IDataView testDataset,
ITransformer
trainedModel)
docs\samples\Microsoft.ML.Samples\Dynamic\Trainers\MulticlassClassification\ImageClassification\ResnetV2101TransferLearningTrainTestSplit.cs (3)
112
ITransformer
loadedModel;
136
MLContext mlContext,
ITransformer
trainedModel)
162
IDataView testDataset,
ITransformer
trainedModel)
Microsoft.ML.Samples.OneDal (3)
Program.cs (3)
81
ITransformer
model = trainer.Fit(preprocessedTrainingData);
113
ITransformer
model = trainer.Fit(preprocessedTrainingData);
141
ITransformer
model = trainer.Fit(preprocessedTrainingData);
Microsoft.ML.StandardTrainers (1)
Standard\Online\OnlineLinear.cs (1)
306
/// Continues the training of a <see cref="OnlineLinearTrainer{TTransformer, TModel}"/> using an already trained <paramref name="modelParameters"/> and returns a <see cref="
ITransformer
"/>.
Microsoft.ML.TensorFlow.Tests (6)
TensorflowTests.cs (6)
1191
var
testTransformer = _mlContext.Model.Load(mlModelLocation, out loadedInputschema);
1427
ITransformer
loadedModel;
1530
ITransformer
loadedModel;
1689
ITransformer
loadedModel;
1820
ITransformer
loadedModel;
1891
ITransformer
loadedModel;
Microsoft.ML.TestFramework (3)
DataPipe\TestDataPipeBase.cs (3)
33
protected void TestEstimatorCore(IEstimator<
ITransformer
> estimator,
80
var
transformer = estimator.Fit(validFitInput);
85
ITransformer
loadedTransformer;
Microsoft.ML.Tests (117)
CachingTests.cs (1)
74
new EstimatorChain<
ITransformer
>().AppendCacheCheckpoint(ML)
CalibratedModelParametersTests.cs (3)
33
var
loadedModel = ML.Model.Load(modelAndSchemaPath, out var schema);
55
var
loadedModel = ML.Model.Load(modelAndSchemaPath, out var schema);
78
var
loadedModel = ML.Model.Load(modelAndSchemaPath, out var schema);
DatabaseLoaderTests.cs (8)
67
IEstimator<
ITransformer
> pipeline = mlContext.Transforms.Conversion.MapValueToKey("Label")
73
var
model = pipeline.Fit(trainingData);
103
IEstimator<
ITransformer
> pipeline = mlContext.Transforms.Conversion.MapValueToKey("Label")
109
var
model = pipeline.Fit(trainingData);
139
IEstimator<
ITransformer
> pipeline = mlContext.Transforms.Conversion.MapValueToKey("Label")
145
var
model = pipeline.Fit(trainingData);
171
IEstimator<
ITransformer
> pipeline = mlContext.Transforms.Conversion.MapValueToKey("Label")
177
var
model = pipeline.Fit(trainingData);
FeatureContributionTests.cs (1)
237
private void CheckOutput(IEstimator<
ITransformer
> estimator, IDataView data, string testFile, int precision = 6)
ImagesTests.cs (2)
87
ITransformer
model2;
91
var transformerChain = model2 as TransformerChain<
ITransformer
>;
OnnxConversionTest.cs (28)
185
List<IEstimator<
ITransformer
>> estimators = new List<IEstimator<
ITransformer
>>()
223
List<IEstimator<
ITransformer
>> estimators = new List<IEstimator<
ITransformer
>>()
276
private (IDataView, List<IEstimator<
ITransformer
>>, EstimatorChain<NormalizingTransformer>) GetEstimatorsForOnnxConversionTests()
281
List<IEstimator<
ITransformer
>> estimators = new List<IEstimator<
ITransformer
>>()
305
private void CommonCalibratorOnnxConversionTest(IEstimator<
ITransformer
> calibrator, IEstimator<
ITransformer
> calibratorNonStandard)
1243
List<IEstimator<
ITransformer
>> pipelines = new List<IEstimator<
ITransformer
>>();
1367
foreach (IEstimator<
ITransformer
> pipeline in pipelines)
1408
IEstimator<
ITransformer
>[] pipelines =
1476
IEstimator<
ITransformer
>[] pipelines =
1503
var
model = pipe.Fit(dataView);
1649
List<IEstimator<
ITransformer
>> estimators = new List<IEstimator<
ITransformer
>>()
1853
IEstimator<
ITransformer
>[] pipelines =
1934
List<IEstimator<
ITransformer
>> estimators = new List<IEstimator<
ITransformer
>>()
1976
List<IEstimator<
ITransformer
>> estimators = new List<IEstimator<
ITransformer
>>()
2090
IEstimator<
ITransformer
> pipe;
2183
private void TestPipeline<TRow>(IEstimator<
ITransformer
> pipeline, IEnumerable<TRow> data, string onnxFileName, ColumnComparison[] columnsToCompare, SchemaDefinition schemaDefinition = null, string onnxTxtName = null, string onnxTxtSubDir = null)
2200
private void TestPipeline(IEstimator<
ITransformer
> pipeline, IDataView dataView, string onnxFileName, ColumnComparison[] columnsToCompare, string onnxTxtName = null, string onnxTxtSubDir = null)
2202
var chain = new EstimatorChain<
ITransformer
>().Append(pipeline);
2220
where TLastTransformer : class,
ITransformer
2239
where TLastTransformer : class,
ITransformer
PermutationFeatureImportanceTests.cs (20)
48
var
loadedModel = ML.Model.Load(modelAndSchemaPath, out var schema);
65
pfiDict = ml2.Regression.PermutationFeatureImportance((
ITransformer
)model, data);
116
var
loadedModel = ML.Model.Load(modelAndSchemaPath, out var schema);
118
ITransformer
lastTransformer = null;
190
var
loadedModel = ML.Model.Load(modelAndSchemaPath, out var schema);
207
pfiDict = ml2.Regression.PermutationFeatureImportance((
ITransformer
)model, data, permutationCount: 20);
278
var
loadedModel = ML.Model.Load(modelAndSchemaPath, out var schema);
295
pfiDict = ml2.Regression.PermutationFeatureImportance((
ITransformer
)model, data);
353
var
loadedModel = ML.Model.Load(modelAndSchemaPath, out var schema);
370
pfiDict = ml2.BinaryClassification.PermutationFeatureImportanceNonCalibrated((
ITransformer
)model, data);
427
var
loadedModel = ML.Model.Load(modelAndSchemaPath, out var schema);
444
pfiDict = ml2.BinaryClassification.PermutationFeatureImportanceNonCalibrated((
ITransformer
)model, data);
535
var
loadedModel = ML.Model.Load(modelAndSchemaPath, out var schema);
552
pfiDict = ml2.MulticlassClassification.PermutationFeatureImportance((
ITransformer
)model, data);
608
var
loadedModel = ML.Model.Load(modelAndSchemaPath, out var schema);
625
pfiDict = ml2.MulticlassClassification.PermutationFeatureImportance((
ITransformer
)model, data);
686
var
loadedModel = ML.Model.Load(modelAndSchemaPath, out var schema);
704
pfiDict = ml2.Ranking.PermutationFeatureImportance((
ITransformer
)model, data);
755
var
loadedModel = ML.Model.Load(modelAndSchemaPath, out var schema);
772
pfiDict = ml2.Ranking.PermutationFeatureImportance((
ITransformer
)model, data);
Scenarios\Api\CookbookSamples\CookbookSamplesDynamicApi.cs (5)
203
ITransformer
loadedModel = mlContext.Model.Load(modelPath, out var schema);
211
private
ITransformer
TrainOnIris(string irisDataPath)
270
private void PredictOnIris(
ITransformer
model)
762
ITransformer
loadedModel = newContext.Model.Load(modelPath, out var schema);
774
public static
ITransformer
TrainModel(MLContext mlContext, IDataView trainData)
TrainerEstimators\CalibratorEstimators.cs (4)
104
var
transformer = pipeline.Fit(data);
122
public IEstimator<
ITransformer
> Pipeline { get; set; }
128
private void CheckValidCalibratedData(IDataView scoredData,
ITransformer
transformer)
257
ITransformer
oldPlattCalibratorTransformer;
TrainerEstimators\LbfgsTests.cs (10)
21
(IEstimator<
ITransformer
> pipe, IDataView dataView) = GetBinaryClassificationPipeline();
35
(IEstimator<
ITransformer
> pipe, IDataView dataView) = GetMulticlassPipeline();
61
(IEstimator<
ITransformer
> pipe, IDataView dataView) = GetBinaryClassificationPipeline();
81
(IEstimator<
ITransformer
> pipe, IDataView dataView) = GetBinaryClassificationPipeline();
124
ITransformer
transformerChain;
128
var lastTransformer = ((TransformerChain<
ITransformer
>)transformerChain).LastTransformer as BinaryPredictionTransformer<CalibratedModelParametersBase<LinearBinaryModelParameters, PlattCalibrator>>;
165
(IEstimator<
ITransformer
> pipe, IDataView dataView) = GetMulticlassPipeline();
183
(IEstimator<
ITransformer
> pipe, IDataView dataView) = GetMulticlassPipeline();
219
ITransformer
transformerChain;
223
var lastTransformer = ((TransformerChain<
ITransformer
>)transformerChain).LastTransformer as MulticlassPredictionTransformer<MaximumEntropyModelParameters>;
TrainerEstimators\MatrixFactorizationTests.cs (1)
538
ITransformer
model;
TrainerEstimators\TrainerEstimators.cs (8)
97
(IEstimator<
ITransformer
> pipe, IDataView dataView) = GetBinaryClassificationPipeline();
129
(IEstimator<
ITransformer
> pipe, IDataView dataView) = GetBinaryClassificationPipeline();
154
(IEstimator<
ITransformer
> pipe, IDataView dataView) = GetMulticlassPipeline();
171
(IEstimator<
ITransformer
> pipe, IDataView dataView) = GetBinaryClassificationPipeline();
189
private (IEstimator<
ITransformer
>, IDataView) GetBinaryClassificationPipeline()
215
private (IEstimator<
ITransformer
>, IDataView) GetOneHotBinaryClassificationPipeline()
225
private (IEstimator<
ITransformer
>, IDataView) GetRankingPipeline()
276
private (IEstimator<
ITransformer
>, IDataView) GetMulticlassPipeline()
TrainerEstimators\TreeEnsembleFeaturizerTest.cs (2)
617
ITransformer
loadedModel = null;
674
ITransformer
loadedModel = null;
Transformers\ConvertTests.cs (1)
392
ITransformer
modelOld;
Transformers\CopyColumnEstimatorTests.cs (1)
105
var
loadedTransformer = env.Model.Load(ms, out var schema);
Transformers\HashTests.cs (3)
141
var mapper = ((
ITransformer
)xf).GetRowToRowMapper(inRow.Schema);
338
var
model = ML.Model.Load(modelPath, out var _);
363
var
model = ML.Model.Load(modelPath, out _);
Transformers\NormalizerTests.cs (2)
1006
var
normalizer = ML.Model.Load(modelPath, out var schema);
1060
var
loadedModel = ML.Model.Load(modelAndSchemaPath, out var schema);
Transformers\SelectColumnsTests.cs (2)
185
var
loadedTransformer = ML.Model.Load(ms, out var schema);
205
var
loadedTransformer = ML.Model.Load(ms, out var schema);
Transformers\TextFeaturizerTests.cs (10)
53
var
model = pipeline.Fit(dataView);
77
var
model = pipeline.Fit(dataView);
190
var
model = pipeline.Fit(dataView);
218
var
model = pipeline.Fit(dataView);
252
var
model = pipeline.Fit(dataView);
269
var
model = pipeline.Fit(dataView);
318
var
model = pipeline.Fit(dataView);
355
var
model = pipeline.Fit(dataView);
393
var
model = pipeline.Fit(dataView);
751
var
model = ML.Model.Load(modelPath, out var inputSchema);
Transformers\ValueMappingTests.cs (1)
700
var
loadedTransformer = ML.Model.Load(ms, out var schema);
Transformers\WordBagTransformerTests.cs (4)
43
var
textTransformer = textPipeline.Fit(dataview);
72
var
textTransformer = textPipeline.Fit(dataview);
111
var
textTransformerDefault = textPipelineDefault.Fit(dataviewDefault);
112
var
textTransformerNonDefault = textPipelineNonDefault.Fit(dataviewNonDefault);
Microsoft.ML.TimeSeries (54)
IidAnomalyDetectionBase.cs (7)
20
/// Whether a call to <see cref="
ITransformer
.GetRowToRowMapper(DataViewSchema)"/> should succeed, on an
23
bool
ITransformer
.IsRowToRowMapper => ((
ITransformer
)InternalTransform).IsRowToRowMapper;
38
/// Constructs a row-to-row mapper based on an input schema. If <see cref="
ITransformer
.IsRowToRowMapper"/>
44
IRowToRowMapper
ITransformer
.GetRowToRowMapper(DataViewSchema inputSchema)
45
=> ((
ITransformer
)InternalTransform).GetRowToRowMapper(inputSchema);
48
/// Same as <see cref="
ITransformer
.GetRowToRowMapper(DataViewSchema)"/> but also supports mechanism to save the state.
IidChangePointDetector.cs (1)
29
/// <see cref="
ITransformer
"/> resulting from fitting a <see cref="IidChangePointEstimator"/>.
IidSpikeDetector.cs (1)
28
/// <see cref="
ITransformer
"/> resulting from fitting a <see cref="IidSpikeEstimator"/>.
PredictionEngine.cs (16)
21
/// Same as <see cref="
ITransformer
.GetRowToRowMapper(DataViewSchema)"/> but also supports mechanism to save the state.
69
private
ITransformer
InputTransformer { get; set; }
116
new TransformerChain<
ITransformer
>(transformerChainAccessor.Transformers, transformerChainAccessor.Scopes).SaveTo(env, stream);
122
private static
ITransformer
CloneTransformers(
ITransformer
transformer)
124
ITransformer
[] transformersClone = null;
132
foreach (
var
xf in transformersClone)
135
return new TransformerChain<
ITransformer
>(transformersClone, scopeClone);
145
public TimeSeriesPredictionEngine(IHostEnvironment env,
ITransformer
transformer, bool ignoreMissingColumns,
155
internal TimeSeriesPredictionEngine(IHostEnvironment env,
ITransformer
transformer, PredictionEngineOptions options) :
228
private bool IsRowToRowMapper(
ITransformer
transformer)
265
private protected override Func<DataViewSchema, IRowToRowMapper> TransformerChecker(IExceptionContext ectx,
ITransformer
transformer)
385
/// <param name="transformer">The time series pipeline in the form of a <see cref="
ITransformer
"/>.</param>
399
public static TimeSeriesPredictionEngine<TSrc, TDst> CreateTimeSeriesEngine<TSrc, TDst>(this
ITransformer
transformer, IHostEnvironment env,
417
/// <param name="transformer">The time series pipeline in the form of a <see cref="
ITransformer
"/>.</param>
429
public static TimeSeriesPredictionEngine<TSrc, TDst> CreateTimeSeriesEngine<TSrc, TDst>(this
ITransformer
transformer, IHostEnvironment env,
SequentialAnomalyDetectionTransformBase.cs (1)
414
public
ITransformer
GetTransformer()
SequentialForecastingTransformBase.cs (1)
263
public
ITransformer
GetTransformer()
SequentialTransformerBase.cs (1)
342
bool
ITransformer
.IsRowToRowMapper => false;
SrCnnAnomalyDetectionBase.cs (7)
18
/// Whether a call to <see cref="
ITransformer
.GetRowToRowMapper(DataViewSchema)"/> should succeed, on an
21
bool
ITransformer
.IsRowToRowMapper => ((
ITransformer
)InternalTransform).IsRowToRowMapper;
35
/// Constructs a row-to-row mapper based on an input schema. If <see cref="
ITransformer
.IsRowToRowMapper"/>
41
IRowToRowMapper
ITransformer
.GetRowToRowMapper(DataViewSchema inputSchema)
42
=> ((
ITransformer
)InternalTransform).GetRowToRowMapper(inputSchema);
45
/// Same as <see cref="
ITransformer
.GetRowToRowMapper(DataViewSchema)"/> but also supports mechanism to save the state.
SRCNNAnomalyDetector.cs (1)
28
/// <see cref="
ITransformer
"/> resulting from fitting a <see cref="SrCnnAnomalyEstimator"/>.
SrCnnTransformBase.cs (1)
257
public
ITransformer
GetTransformer()
SsaAnomalyDetectionBase.cs (7)
89
/// Whether a call to <see cref="
ITransformer
.GetRowToRowMapper(DataViewSchema)"/> should succeed, on an
92
bool
ITransformer
.IsRowToRowMapper => ((
ITransformer
)InternalTransform).IsRowToRowMapper;
107
/// Constructs a row-to-row mapper based on an input schema. If <see cref="
ITransformer
.IsRowToRowMapper"/>
113
IRowToRowMapper
ITransformer
.GetRowToRowMapper(DataViewSchema inputSchema)
114
=> ((
ITransformer
)InternalTransform).GetRowToRowMapper(inputSchema);
117
/// Same as <see cref="
ITransformer
.GetRowToRowMapper(DataViewSchema)"/> but also supports mechanism to save the state.
SsaChangePointDetector.cs (1)
29
/// <see cref="
ITransformer
"/> resulting from fitting a <see cref="SsaChangePointEstimator"/>.
SSaForecasting.cs (1)
27
/// <see cref="
ITransformer
"/> resulting from fitting a <see cref="SsaForecastingEstimator"/>.
SsaForecastingBase.cs (7)
22
/// Whether a call to <see cref="
ITransformer
.GetRowToRowMapper(DataViewSchema)"/> should succeed, on an
25
bool
ITransformer
.IsRowToRowMapper => ((
ITransformer
)InternalTransform).IsRowToRowMapper;
40
/// Constructs a row-to-row mapper based on an input schema. If <see cref="
ITransformer
.IsRowToRowMapper"/>
46
IRowToRowMapper
ITransformer
.GetRowToRowMapper(DataViewSchema inputSchema)
47
=> ((
ITransformer
)InternalTransform).GetRowToRowMapper(inputSchema);
50
/// Same as <see cref="
ITransformer
.GetRowToRowMapper(DataViewSchema)"/> but also supports mechanism to save the state.
SsaSpikeDetector.cs (1)
28
/// <see cref="
ITransformer
"/> resulting from fitting a <see cref="SsaSpikeEstimator"/>.
Microsoft.ML.TimeSeries.Tests (4)
TimeSeriesDirectApi.cs (4)
250
ITransformer
model2 = null;
270
ITransformer
model3 = null;
338
ITransformer
model2 = null;
493
ITransformer
modelCopy;
Microsoft.ML.TorchSharp.Tests (6)
NerTests.cs (3)
69
var chain = new EstimatorChain<
ITransformer
>();
148
var chain = new EstimatorChain<
ITransformer
>();
222
var chain = new EstimatorChain<
ITransformer
>();
ObjectDetectionTests.cs (1)
44
var chain = new EstimatorChain<
ITransformer
>();
QATests.cs (1)
42
var chain = new EstimatorChain<
ITransformer
>();
TextClassificationTests.cs (1)
97
var chain = new EstimatorChain<
ITransformer
>();
Microsoft.ML.Transforms (134)
CountFeatureSelection.cs (4)
67
public sealed class CountFeatureSelectingEstimator : IEstimator<
ITransformer
>
189
/// Trains and returns a <see cref="
ITransformer
"/>.
191
public
ITransformer
Fit(IDataView input)
216
new
ITransformer
[] {
CustomMappingFactory.cs (3)
23
ITransformer
CreateTransformer(IHostEnvironment env, string contractName);
40
ITransformer
ICustomMappingFactory.CreateTransformer(IHostEnvironment env, string contractName)
69
ITransformer
ICustomMappingFactory.CreateTransformer(IHostEnvironment env, string contractName)
CustomMappingTransformer.cs (6)
14
/// <see cref="
ITransformer
"/> resulting from fitting an <see cref="CustomMappingEstimator{TSrc, TDst}"/>.
31
/// Whether a call to <see cref="
ITransformer
.GetRowToRowMapper(DataViewSchema)"/> should succeed, on an
34
bool
ITransformer
.IsRowToRowMapper => true;
97
/// Constructs a row-to-row mapper based on an input schema. If <see cref="
ITransformer
.IsRowToRowMapper"/>
101
IRowToRowMapper
ITransformer
.GetRowToRowMapper(DataViewSchema inputSchema)
198
public
ITransformer
GetTransformer()
Dracula\CountTargetEncodingTransformer.cs (9)
223
var
transformer = catalog.Load(initialCountsModel, out _);
229
else if (transformer is TransformerChain<
ITransformer
> chain)
303
/// <see cref="
ITransformer
"/> resulting from fitting a <see cref="LpNormNormalizingEstimator"/> or <see cref="CountTargetEncodingEstimator"/>.
317
bool
ITransformer
.IsRowToRowMapper => true;
380
var chain = new TransformerChain<
ITransformer
>(HashingTransformer, CountTable);
384
IRowToRowMapper
ITransformer
.GetRowToRowMapper(DataViewSchema inputSchema)
387
ITransformer
chain = new TransformerChain<
ITransformer
>(HashingTransformer, CountTable);
394
var chain = new TransformerChain<
ITransformer
>(HashingTransformer, CountTable);
GcnTransform.cs (1)
39
/// <see cref="
ITransformer
"/> resulting from fitting a <see cref="LpNormNormalizingEstimator"/> or <see cref="GlobalContrastNormalizingEstimator"/>.
KeyToVectorMapping.cs (1)
31
/// <see cref="
ITransformer
"/> resulting from fitting a <see cref="KeyToBinaryVectorMappingEstimator"/>.
LambdaTransform.cs (2)
15
[assembly: LoadableClass(typeof(
ITransformer
), typeof(LambdaTransform), null, typeof(SignatureLoadModel), "", LambdaTransform.LoaderSignature)]
56
private static
ITransformer
Create(IHostEnvironment env, ModelLoadContext ctx)
MissingValueIndicatorTransformer.cs (1)
32
/// <see cref="
ITransformer
"/> resulting from fitting a <see cref="MissingValueIndicatorEstimator"/>.
MissingValueReplacing.cs (1)
36
/// <see cref="
ITransformer
"/> resulting from fitting a <see cref="MissingValueReplacingEstimator"/>.
MutualInformationFeatureSelection.cs (4)
72
public sealed class MutualInformationFeatureSelectingEstimator : IEstimator<
ITransformer
>
167
/// Trains and returns a <see cref="
ITransformer
"/>.
169
public
ITransformer
Fit(IDataView input)
207
new
ITransformer
[] {
OneHotEncoding.cs (11)
26
/// <see cref="
ITransformer
"/> resulting from fitting a <see cref="OneHotEncodingEstimator"/>.
125
private readonly TransformerChain<
ITransformer
> _transformer;
127
internal OneHotEncodingTransformer(ValueToKeyMappingEstimator term, IEstimator<
ITransformer
> toVector, IDataView input)
132
_transformer = new TransformerChain<
ITransformer
>(term.Fit(input));
141
bool
ITransformer
.IsRowToRowMapper => ((
ITransformer
)_transformer).IsRowToRowMapper;
143
IRowToRowMapper
ITransformer
.GetRowToRowMapper(DataViewSchema inputSchema) => ((
ITransformer
)_transformer).GetRowToRowMapper(inputSchema);
264
private readonly IEstimator<
ITransformer
> _toSomething;
306
IEstimator<
ITransformer
> toBinVector = null;
307
IEstimator<
ITransformer
> toVector = null;
OneHotHashEncoding.cs (12)
21
/// <see cref="
ITransformer
"/> resulting from fitting a <see cref="OneHotHashEncodingEstimator"/>.
167
private readonly TransformerChain<
ITransformer
> _transformer;
169
internal OneHotHashEncodingTransformer(HashingEstimator hash, IEstimator<
ITransformer
> keyToVector, IDataView input)
174
_transformer = new TransformerChain<
ITransformer
>(hash.Fit(input));
191
/// Whether a call to <see cref="
ITransformer
.GetRowToRowMapper"/> should succeed, on an appropriate schema.
193
bool
ITransformer
.IsRowToRowMapper => ((
ITransformer
)_transformer).IsRowToRowMapper;
198
IRowToRowMapper
ITransformer
.GetRowToRowMapper(DataViewSchema inputSchema) => ((
ITransformer
)_transformer).GetRowToRowMapper(inputSchema);
298
private readonly IEstimator<
ITransformer
> _toSomething;
356
IEstimator<
ITransformer
> toBinVector = null;
357
IEstimator<
ITransformer
> toVector = null;
PermutationFeatureImportanceExtensions.cs (5)
130
ITransformer
model,
280
ITransformer
model,
434
ITransformer
model,
596
ITransformer
model,
654
ITransformer
model,
RandomFourierFeaturizing.cs (1)
32
/// <see cref="
ITransformer
"/> resulting from fitting an <see cref="ApproximatedKernelMappingEstimator"/>.
StatefulCustomMappingTransformer.cs (5)
16
/// <see cref="
ITransformer
"/> resulting from fitting an <see cref="StatefulCustomMappingEstimator{TSrc, TState, TDst}"/>.
35
/// Whether a call to <see cref="
ITransformer
.GetRowToRowMapper(DataViewSchema)"/> should succeed, on an
38
bool
ITransformer
.IsRowToRowMapper => true;
95
/// Constructs a row-to-row mapper based on an input schema. If <see cref="
ITransformer
.IsRowToRowMapper"/>
99
IRowToRowMapper
ITransformer
.GetRowToRowMapper(DataViewSchema inputSchema)
SvmLight\SvmLightLoader.cs (6)
532
private readonly
ITransformer
_keyVectorsToIndexVectors;
607
ctx.LoadModelOrNull<
ITransformer
, SignatureLoadModel>(_host, out _keyVectorsToIndexVectors, "KeysToIndices");
645
var
keyVectorsToIndexVectors = _keyVectorsToIndexVectors ??
713
private static
ITransformer
CreateOutputTransformer(IHostEnvironment env, int keyCount, bool keyIndices, DataViewSchema inputSchema)
724
ITransformer
outputTransformer;
756
var
keyVectorsToIndexVectors = _keyVectorsToIndexVectors ??
Text\LdaTransform.cs (1)
50
/// <see cref="
ITransformer
"/> resulting from fitting a <see cref="LatentDirichletAllocationEstimator"/>.
Text\NgramHashingTransformer.cs (1)
32
/// <see cref="
ITransformer
"/> resulting from fitting a <see cref="NgramHashingEstimator"/>.
Text\NgramTransform.cs (1)
34
/// <see cref="
ITransformer
"/> resulting from fitting an <see cref="NgramExtractingEstimator"/>.
Text\StopWordsRemovingTransformer.cs (5)
52
internal interface IStopWordsRemoverFactory : IComponentFactory<IDataView, OneToOneColumn[],
ITransformer
> { }
58
public
ITransformer
CreateComponent(IHostEnvironment env, IDataView input, OneToOneColumn[] columns)
65
/// <see cref="
ITransformer
"/> resulting from fitting a <see cref="StopWordsRemovingEstimator"/>.
686
/// <see cref="
ITransformer
"/> resulting from fitting a <see cref="CustomStopWordsRemovingEstimator"/>.
735
public
ITransformer
CreateComponent(IHostEnvironment env, IDataView input, OneToOneColumn[] column)
Text\TextFeaturizingEstimator.cs (20)
21
[assembly: LoadableClass(TextFeaturizingEstimator.Summary, typeof(
ITransformer
), typeof(TextFeaturizingEstimator), null, typeof(SignatureLoadModel),
67
public sealed class TextFeaturizingEstimator : IEstimator<
ITransformer
>
433
/// Trains and returns a <see cref="
ITransformer
"/>.
435
public
ITransformer
Fit(IDataView input)
448
TransformerChain<
ITransformer
> chain = new TransformerChain<
ITransformer
>();
609
private static TransformerChain<
ITransformer
> AddToChainAndTransform(TransformerChain<
ITransformer
> chain,
ITransformer
transformer, ref IDataView view)
619
private static
ITransformer
Create(IHostEnvironment env, ModelLoadContext ctx)
678
private readonly TransformerChain<
ITransformer
> _chain;
680
internal Transformer(IHostEnvironment env, TransformerChain<
ITransformer
> chain)
700
bool
ITransformer
.IsRowToRowMapper => true;
702
IRowToRowMapper
ITransformer
.GetRowToRowMapper(DataViewSchema inputSchema)
705
return (_chain as
ITransformer
).GetRowToRowMapper(inputSchema);
728
_chain = new TransformerChain<
ITransformer
>();
734
ITransformer
transformer;
738
ctx.LoadModelOrNull<
ITransformer
, SignatureLoadModel>(env, out transformer, dirName);
748
ctx.LoadModelOrNull<
ITransformer
, SignatureLoadModel>(env, out transformer, mapperDirName);
762
ctx.LoadModel<TransformerChain<
ITransformer
>, SignatureLoadModel>(env, out _chain, "Chain");
Text\TextNormalizing.cs (1)
33
/// <see cref="
ITransformer
"/> resulting from fitting a <see cref="TextNormalizingEstimator"/>.
Text\TokenizingByCharacters.cs (1)
33
/// <see cref="
ITransformer
"/> resulting from fitting a <see cref="TokenizingByCharactersEstimator"/>.
Text\WordBagTransform.cs (13)
110
internal static IEstimator<
ITransformer
> CreateEstimator(IHostEnvironment env, Options options, SchemaShape inputSchema)
163
IEstimator<
ITransformer
> estimator = NgramExtractionUtils.GetConcatEstimator(h, options.Columns);
457
internal static IEstimator<
ITransformer
> CreateEstimator(IHostEnvironment env, Options options, SchemaShape inputSchema, TermLoaderArguments termLoaderArgs = null)
464
var chain = new EstimatorChain<
ITransformer
>();
520
chain = chain.Append<
ITransformer
>(new ValueToKeyMappingEstimator(h, columnOptions.ToArray(), keyData));
522
chain = chain.Append<
ITransformer
>(new MissingValueDroppingEstimator(h, missingDropColumns.Select(x => (x, x)).ToArray()));
538
return chain.Append<
ITransformer
>(new NgramExtractingEstimator(env, ngramColumns));
622
ITransformer
Create(IHostEnvironment env, IDataView input, ExtractorColumn[] cols);
647
public
ITransformer
Create(IHostEnvironment env, IDataView input, ExtractorColumn[] cols)
669
public
ITransformer
Create(IHostEnvironment env, IDataView input, ExtractorColumn[] cols)
677
public static IEstimator<
ITransformer
> GetConcatEstimator(IHostEnvironment env, ManyToOneColumn[] columns)
682
var estimator = new EstimatorChain<
ITransformer
>();
690
estimator = estimator.Append<
ITransformer
>(new ColumnConcatenatingEstimator(env, col.Name, col.Source));
Text\WordEmbeddingsExtractor.cs (1)
36
/// <see cref="
ITransformer
"/> resulting from fitting an <see cref="WordEmbeddingEstimator"/>.
Text\WordHashBagProducingTransform.cs (8)
86
internal static
ITransformer
CreateTransformer(IHostEnvironment env, Options options, IDataView input)
135
ITransformer
t1 = new WordTokenizingEstimator(env, tokenizeColumns.ToArray()).Fit(view);
151
ITransformer
t2 = NgramHashExtractingTransformer.Create(h, featurizeArgs, view);
154
ITransformer
t3 = new ColumnSelectingTransformer(env, null, tmpColNames.ToArray());
156
return new TransformerChain<
ITransformer
>(new[] { t1, t2, t3 });
322
internal static
ITransformer
Create(IHostEnvironment env, Options options, IDataView input)
330
var chain = new TransformerChain<
ITransformer
>();
378
internal static
ITransformer
Create(NgramHashExtractorArguments extractorArgs, IHostEnvironment env, IDataView input,
Text\WordTokenizing.cs (1)
36
/// <see cref="
ITransformer
"/> resulting from fitting an <see cref="WordTokenizingEstimator"/>.
Text\WrappedTextTransformers.cs (9)
14
/// <see cref="IEstimator{TTransformer}"/> for the <see cref="
ITransformer
"/>.
39
public sealed class WordBagEstimator : IEstimator<
ITransformer
>
190
/// <summary> Trains and returns a <see cref="
ITransformer
"/>.</summary>
191
public
ITransformer
Fit(IDataView input)
226
/// <see cref="IEstimator{TTransformer}"/> for the <see cref="
ITransformer
"/>.
251
public sealed class WordHashBagEstimator : IEstimator<
ITransformer
>
374
/// <summary> Trains and returns a <see cref="
ITransformer
"/>.</summary>
375
public
ITransformer
Fit(IDataView input)
402
var
transformer = Fit(new EmptyDataView(_host, fakeSchema));
Microsoft.ML.Vision (1)
DnnRetrainTransform.cs (1)
39
/// <see cref="
ITransformer
" /> for the <see cref="DnnRetrainEstimator"/>.