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