48 references to TransformerScope
Microsoft.ML.Data (28)
DataLoadSave\EstimatorChain.cs (6)
22
private readonly
TransformerScope
[] _scopes;
27
private EstimatorChain(IHostEnvironment env, IEstimator<ITransformer>[] estimators,
TransformerScope
[] scopes, bool[] needCacheAfter)
38
_scopes = scopes ?? new
TransformerScope
[0];
53
_scopes = new
TransformerScope
[0];
91
public EstimatorChain<TNewTrans> Append<TNewTrans>(IEstimator<TNewTrans> estimator,
TransformerScope
scope =
TransformerScope
.Everything)
DataLoadSave\EstimatorExtensions.cs (2)
48
TransformerScope
scope =
TransformerScope
.Everything)
DataLoadSave\TransformerChain.cs (19)
46
TransformerScope
[] Scopes { get; }
57
private readonly
TransformerScope
[] _scopes;
66
TransformerScope
[] ITransformerChainAccessor.Scopes => _scopes;
84
public 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();
124
return GetOutputSchema(inputSchema,
TransformerScope
.Scoring);
127
public DataViewSchema GetOutputSchema(DataViewSchema inputSchema,
TransformerScope
scope)
142
return Transform(input,
TransformerScope
.Scoring);
145
public IDataView Transform(IDataView input,
TransformerScope
scope)
165
public TransformerChain<ITransformer> GetModelFor(
TransformerScope
scopeFilter)
168
var scopes = new List<
TransformerScope
>();
171
if ((_scopes[i] & scopeFilter) !=
TransformerScope
.None)
180
public 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)
109
scoredTest = (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)
660
var metrics = mlContext.MulticlassClassification.Evaluate(model.Transform(split.TestSet,
TransformerScope
.Everything));
Scenarios\Api\Estimators\DecomposableTrainAndPredict.cs (2)
34
.Append(new ValueToKeyMappingEstimator(ml, "Label"),
TransformerScope
.TrainTest)
39
var 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)
48
var model = pipeline.Fit(data).GetModelFor(
TransformerScope
.Scoring);
Scenarios\Api\Estimators\PredictAndMetadata.cs (2)
32
.Append(ml.Transforms.Conversion.MapValueToKey("Label"),
TransformerScope
.TrainTest)
36
var model = pipeline.Fit(data).GetModelFor(
TransformerScope
.Scoring);
Scenarios\IrisPlantClassificationWithStringLabelTests.cs (2)
38
.Append(mlContext.Transforms.Conversion.MapValueToKey("Label", "IrisPlantType"),
TransformerScope
.TrainTest)
89
var predicted = trainedModel.Transform(testData,
TransformerScope
.Everything);
Microsoft.ML.TimeSeries (1)
PredictionEngine.cs (1)
125
TransformerScope
[] scopeClone = null;
Microsoft.ML.TorchSharp.Tests (7)
ObjectDetectionTests.cs (4)
46
var 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)
98
var estimator = chain.Append(ML.Transforms.Conversion.MapValueToKey("Label", "Sentiment"),
TransformerScope
.TrainTest)
111
var filteredModel = transformer.GetModelFor(
TransformerScope
.Scoring);
156
var metrics = ML.MulticlassClassification.Evaluate(transformer.Transform(dataView,
TransformerScope
.Everything), predictedLabelColumnName: "outputColumn");