48 references to TransformerScope
Microsoft.ML.Data (28)
DataLoadSave\EstimatorChain.cs (6)
22private readonly TransformerScope[] _scopes; 27private EstimatorChain(IHostEnvironment env, IEstimator<ITransformer>[] estimators, TransformerScope[] scopes, bool[] needCacheAfter) 38_scopes = scopes ?? new TransformerScope[0]; 53_scopes = new TransformerScope[0]; 91public EstimatorChain<TNewTrans> Append<TNewTrans>(IEstimator<TNewTrans> estimator, TransformerScope scope = TransformerScope.Everything)
DataLoadSave\EstimatorExtensions.cs (2)
48TransformerScope scope = TransformerScope.Everything)
DataLoadSave\TransformerChain.cs (19)
46TransformerScope[] Scopes { get; } 57private readonly TransformerScope[] _scopes; 66TransformerScope[] ITransformerChainAccessor.Scopes => _scopes; 84public TransformerChain(IEnumerable<ITransformer> transformers, IEnumerable<TransformerScope> scopes) 90_scopes = scopes?.ToArray() ?? new TransformerScope[0]; 99/// <see cref="TransformerScope.Everything"/>. 109_scopes = new TransformerScope[0]; 115_scopes = transformers.Select(x => TransformerScope.Everything).ToArray(); 124return GetOutputSchema(inputSchema, TransformerScope.Scoring); 127public DataViewSchema GetOutputSchema(DataViewSchema inputSchema, TransformerScope scope) 142return Transform(input, TransformerScope.Scoring); 145public IDataView Transform(IDataView input, TransformerScope scope) 165public TransformerChain<ITransformer> GetModelFor(TransformerScope scopeFilter) 168var scopes = new List<TransformerScope>(); 171if ((_scopes[i] & scopeFilter) != TransformerScope.None) 180public TransformerChain<TNewLast> Append<TNewLast>(TNewLast transformer, TransformerScope scope = TransformerScope.Everything) 209_scopes = new TransformerScope[len]; 212_scopes[i] = (TransformerScope)(ctx.Reader.ReadInt32());
TrainCatalog.cs (1)
109scoredTest = (Unsafe.As<TransformerChain<ITransformer>>(model)).Transform(split.TestSet, TransformerScope.Everything);
Microsoft.ML.Tests (12)
Scenarios\Api\CookbookSamples\CookbookSamplesDynamicApi.cs (3)
232.Append(mlContext.Transforms.Conversion.MapValueToKey("Label"), TransformerScope.TrainTest) 646.Append(mlContext.Transforms.Conversion.MapValueToKey("Label"), TransformerScope.TrainTest) 660var metrics = mlContext.MulticlassClassification.Evaluate(model.Transform(split.TestSet, TransformerScope.Everything));
Scenarios\Api\Estimators\DecomposableTrainAndPredict.cs (2)
34.Append(new ValueToKeyMappingEstimator(ml, "Label"), TransformerScope.TrainTest) 39var model = pipeline.Fit(data).GetModelFor(TransformerScope.Scoring);
Scenarios\Api\Estimators\Extensibility.cs (3)
42.Append(new CustomMappingEstimator<IrisData, IrisData>(ml, action, null), TransformerScope.TrainTest) 43.Append(new ValueToKeyMappingEstimator(ml, "Label"), TransformerScope.TrainTest) 48var model = pipeline.Fit(data).GetModelFor(TransformerScope.Scoring);
Scenarios\Api\Estimators\PredictAndMetadata.cs (2)
32.Append(ml.Transforms.Conversion.MapValueToKey("Label"), TransformerScope.TrainTest) 36var model = pipeline.Fit(data).GetModelFor(TransformerScope.Scoring);
Scenarios\IrisPlantClassificationWithStringLabelTests.cs (2)
38.Append(mlContext.Transforms.Conversion.MapValueToKey("Label", "IrisPlantType"), TransformerScope.TrainTest) 89var predicted = trainedModel.Transform(testData, TransformerScope.Everything);
Microsoft.ML.TimeSeries (1)
PredictionEngine.cs (1)
125TransformerScope[] scopeClone = null;
Microsoft.ML.TorchSharp.Tests (7)
ObjectDetectionTests.cs (4)
46var filteredPipeline = chain.Append(ML.Transforms.Text.TokenizeIntoWords("Labels", separators: new char[] { ',' }), TransformerScope.Training) 47.Append(ML.Transforms.Conversion.MapValueToKey("Labels"), TransformerScope.Training) 48.Append(ML.Transforms.Text.TokenizeIntoWords("Box", separators: new char[] { ',' }), TransformerScope.Training) 49.Append(ML.Transforms.Conversion.ConvertType("Box"), TransformerScope.Training)
TextClassificationTests.cs (3)
98var estimator = chain.Append(ML.Transforms.Conversion.MapValueToKey("Label", "Sentiment"), TransformerScope.TrainTest) 111var filteredModel = transformer.GetModelFor(TransformerScope.Scoring); 156var metrics = ML.MulticlassClassification.Evaluate(transformer.Transform(dataView, TransformerScope.Everything), predictedLabelColumnName: "outputColumn");