1 write to Conversion
Microsoft.ML.Data (1)
Transforms\TransformsCatalog.cs (1)
43
Conversion
= new ConversionTransforms(this);
325 references to Conversion
Microsoft.ML.AutoML (9)
API\MulticlassClassificationExperiment.cs (2)
332
pipeline = pipeline.Append(Context.Transforms.
Conversion
.MapValueToKey(label, label));
334
pipeline = pipeline.Append(Context.Transforms.
Conversion
.MapKeyToValue(DefaultColumnNames.PredictedLabel, DefaultColumnNames.PredictedLabel));
EstimatorExtensions\EstimatorExtensions.cs (4)
68
return context.Transforms.
Conversion
.MapKeyToValue(outColumn, inColumn);
89
return context.Transforms.
Conversion
.Hash(outColumn, inColumn);
268
return context.Transforms.
Conversion
.ConvertType(cols);
290
return context.Transforms.
Conversion
.MapValueToKey(outColumn, inColumn);
SweepableEstimator\Estimators\MapValueToKey.cs (2)
11
return context.Transforms.
Conversion
.MapValueToKey(param.OutputColumnName, param.InputColumnName, addKeyValueAnnotationsAsText: param.AddKeyValueAnnotationsAsText, keyData: param.KeyData);
19
return context.Transforms.
Conversion
.MapKeyToValue(param.OutputColumnName, param.InputColumnName);
SweepableEstimator\Estimators\TypeConvert.cs (1)
12
return context.Transforms.
Conversion
.ConvertType(inputOutputPairs, param.TargetType);
Microsoft.ML.AutoML.Tests (3)
AutoMLExperimentTests.cs (2)
299
.Append(context.Transforms.
Conversion
.MapValueToKey(label, label))
326
.Append(context.Transforms.
Conversion
.MapValueToKey(label, label))
UserInputValidationTests.cs (1)
358
var convertLabelToBoolEstimator = mlContext.Transforms.
Conversion
.MapValue(DefaultColumnNames.Label,
Microsoft.ML.Fairlearn (1)
Metrics\FairlearnMetricCatalog.cs (1)
68
var convertToString = _context.Transforms.
Conversion
.ConvertType(sensitiveCol.Name, sensitiveCol.Name, DataKind.String);
Microsoft.ML.IntegrationTests (11)
Datasets\Iris.cs (1)
56
.Append(mlContext.Transforms.
Conversion
.MapValueToKey("GroupId"));
Datasets\TrivialMatrixFactorization.cs (2)
30
var pipeline = mlContext.Transforms.
Conversion
.MapValueToKey("MatrixColumnIndex")
31
.Append(mlContext.Transforms.
Conversion
.MapValueToKey("MatrixRowIndex"));
DataTransformation.cs (1)
203
.Append(mlContext.Transforms.
Conversion
.Hash(new[] {
Evaluation.cs (1)
152
.Append(mlContext.Transforms.
Conversion
.MapValueToKey("Label"))
IntrospectiveTraining.cs (1)
432
return mlContext.Transforms.
Conversion
.MapValueToKey("Label")
Training.cs (4)
267
.Append(mlContext.Transforms.
Conversion
.MapValueToKey("Label"))
457
.Append(mlContext.Transforms.
Conversion
.MapValueToKey("Label"))
488
.Append(mlContext.Transforms.
Conversion
.MapValueToKey("Label"))
490
.Append(mlContext.Transforms.
Conversion
.MapKeyToValue("PredictedLabel"));
Validation.cs (1)
69
mlContext.Transforms.
Conversion
.Hash("GroupId", "GroupId"));
Microsoft.ML.OnnxTransformerTest (2)
DnnImageFeaturizerTest.cs (2)
221
var dataProcessPipeline = ML.Transforms.
Conversion
.MapValueToKey("Label", "Label")
231
.Append(ML.Transforms.
Conversion
.MapKeyToValue("PredictedLabel", "PredictedLabel"));
Microsoft.ML.PerformanceTests (5)
ImageClassificationBench.cs (2)
60
shuffledFullImagesDataset = _mlContext.Transforms.
Conversion
92
.Append(_mlContext.Transforms.
Conversion
.MapKeyToValue(
PredictionEngineBench.cs (1)
58
.Append(env.Transforms.
Conversion
.MapValueToKey("Label"))
StochasticDualCoordinateAscentClassifierBench.cs (2)
79
.Append(_mlContext.Transforms.
Conversion
.MapValueToKey("Label"))
114
.Append(_mlContext.Transforms.
Conversion
.MapValueToKey("Label"))
Microsoft.ML.Samples (59)
Dynamic\DataOperations\FilterRowsByKeyColumnFraction.cs (1)
36
var pipeline = mlContext.Transforms.
Conversion
.MapValueToKey("Age");
Dynamic\ModelOperations\SaveLoadModel.cs (1)
28
ITransformer model = mlContext.Transforms.
Conversion
Dynamic\ModelOperations\SaveLoadModelFile.cs (1)
28
ITransformer model = mlContext.Transforms.
Conversion
Dynamic\TensorFlow\TextClassification.cs (1)
103
.Append(mlContext.Transforms.
Conversion
.MapValue(
Dynamic\Trainers\MulticlassClassification\ImageClassification\ImageClassificationDefault.cs (2)
49
shuffledFullImagesDataset = mlContext.Transforms.
Conversion
68
.Append(mlContext.Transforms.
Conversion
.MapKeyToValue(
Dynamic\Trainers\MulticlassClassification\ImageClassification\LearningRateSchedulingCifarResnetTransferLearning.cs (3)
53
trainDataset = mlContext.Transforms.
Conversion
69
testDataset = mlContext.Transforms.
Conversion
104
.Append(mlContext.Transforms.
Conversion
.MapKeyToValue(
Dynamic\Trainers\MulticlassClassification\ImageClassification\ResnetV2101TransferLearningEarlyStopping.cs (1)
48
shuffledFullImagesDataset = mlContext.Transforms.
Conversion
Dynamic\Trainers\MulticlassClassification\ImageClassification\ResnetV2101TransferLearningTrainTestSplit.cs (2)
48
shuffledFullImagesDataset = mlContext.Transforms.
Conversion
84
.Append(mlContext.Transforms.
Conversion
.MapKeyToValue(
Dynamic\Trainers\MulticlassClassification\LbfgsMaximumEntropy.cs (1)
29
mlContext.Transforms.
Conversion
Dynamic\Trainers\MulticlassClassification\LbfgsMaximumEntropyWithOptions.cs (1)
38
mlContext.Transforms.
Conversion
.MapValueToKey("Label")
Dynamic\Trainers\MulticlassClassification\LightGbm.cs (1)
32
mlContext.Transforms.
Conversion
Dynamic\Trainers\MulticlassClassification\LightGbmWithOptions.cs (1)
43
mlContext.Transforms.
Conversion
.MapValueToKey("Label")
Dynamic\Trainers\MulticlassClassification\LogLossPerClass.cs (1)
29
mlContext.Transforms.
Conversion
Dynamic\Trainers\MulticlassClassification\NaiveBayes.cs (1)
35
mlContext.Transforms.
Conversion
Dynamic\Trainers\MulticlassClassification\OneVersusAll.cs (1)
29
mlContext.Transforms.
Conversion
.MapValueToKey("Label")
Dynamic\Trainers\MulticlassClassification\PairwiseCoupling.cs (1)
29
mlContext.Transforms.
Conversion
.MapValueToKey("Label")
Dynamic\Trainers\MulticlassClassification\PermutationFeatureImportance.cs (1)
30
.Append(mlContext.Transforms.
Conversion
.MapValueToKey("Label"))
Dynamic\Trainers\MulticlassClassification\PermutationFeatureImportanceLoadFromDisk.cs (1)
33
.Append(mlContext.Transforms.
Conversion
.MapValueToKey("Label"))
Dynamic\Trainers\MulticlassClassification\SdcaMaximumEntropy.cs (1)
37
mlContext.Transforms.
Conversion
Dynamic\Trainers\MulticlassClassification\SdcaMaximumEntropyWithOptions.cs (1)
47
mlContext.Transforms.
Conversion
.MapValueToKey("Label")
Dynamic\Trainers\MulticlassClassification\SdcaNonCalibrated.cs (1)
37
mlContext.Transforms.
Conversion
Dynamic\Trainers\MulticlassClassification\SdcaNonCalibratedWithOptions.cs (1)
47
mlContext.Transforms.
Conversion
.MapValueToKey("Label")
Dynamic\Trainers\Ranking\PermutationFeatureImportance.cs (2)
29
.Append(mlContext.Transforms.
Conversion
.MapValueToKey("Label"))
30
.Append(mlContext.Transforms.
Conversion
.MapValueToKey(
Dynamic\Trainers\Ranking\PermutationFeatureImportanceLoadFromDisk.cs (2)
31
.Append(mlContext.Transforms.
Conversion
.MapValueToKey("Label"))
32
.Append(mlContext.Transforms.
Conversion
.MapValueToKey(
Dynamic\Transforms\Concatenate.cs (1)
49
var pipeline = mlContext.Transforms.
Conversion
.ConvertType("Feature3",
Dynamic\Transforms\Conversion\ConvertType.cs (1)
23
var pipeline = mlContext.Transforms.
Conversion
.ConvertType(
Dynamic\Transforms\Conversion\ConvertTypeMultiColumn.cs (1)
40
var pipeline = mlContext.Transforms.
Conversion
.ConvertType(new[]
Dynamic\Transforms\Conversion\Hash.cs (2)
43
var pipeline = mlContext.Transforms.
Conversion
.Hash("CategoryHashed",
45
.Append(mlContext.Transforms.
Conversion
.Hash("AgeHashed", "Age",
Dynamic\Transforms\Conversion\HashWithOptions.cs (1)
45
var pipeline = mlContext.Transforms.
Conversion
.Hash(
Dynamic\Transforms\Conversion\KeyToValueToKey.cs (3)
32
.Transforms.
Conversion
.MapValueToKey(nameof(TransformedData.Keys),
43
.Transforms.
Conversion
.MapValueToKey(nameof(TransformedData.Keys),
85
var pipeline = defaultPipeline.Append(mlContext.Transforms.
Conversion
Dynamic\Transforms\Conversion\MapKeyToBinaryVector.cs (1)
35
var pipeline = mlContext.Transforms.
Conversion
.MapKeyToBinaryVector(
Dynamic\Transforms\Conversion\MapKeyToValueMultiColumn.cs (2)
32
mlContext.Transforms.
Conversion
.MapValueToKey("Label")
46
var newPipeline = mlContext.Transforms.
Conversion
.MapKeyToValue(new[]
Dynamic\Transforms\Conversion\MapKeyToVector.cs (4)
42
var pipeline = mlContext.Transforms.
Conversion
.MapKeyToVector(
45
.Append(mlContext.Transforms.
Conversion
.MapValueToKey("Parts"))
46
.Append(mlContext.Transforms.
Conversion
.MapKeyToVector(
48
.Append(mlContext.Transforms.
Conversion
.MapKeyToVector(
Dynamic\Transforms\Conversion\MapKeyToVectorMultiColumn.cs (1)
34
var pipeline = mlContext.Transforms.
Conversion
.MapKeyToVector(new[]{
Dynamic\Transforms\Conversion\MapValue.cs (3)
56
var pipeline = mlContext.Transforms.
Conversion
.MapValue(
58
Transforms.
Conversion
.MapValue("ScoreCategory", scoreMap, "Score"))
63
.Append(mlContext.Transforms.
Conversion
.MapValue("Label",
Dynamic\Transforms\Conversion\MapValueIdvLookup.cs (1)
45
var pipeline = mlContext.Transforms.
Conversion
.MapValue("PriceCategory",
Dynamic\Transforms\Conversion\MapValueToArray.cs (1)
43
var pipeline = mlContext.Transforms.
Conversion
.MapValue("Features",
Dynamic\Transforms\Conversion\MapValueToKeyMultiColumn.cs (2)
30
var pipeline = mlContext.Transforms.
Conversion
.MapValueToKey(new[] {
81
var pipelineWithLookupMap = mlContext.Transforms.
Conversion
Dynamic\Transforms\NormalizeSupervisedBinning.cs (1)
39
data = mlContext.Transforms.
Conversion
.MapValueToKey("Bin").Fit(data)
Dynamic\Transforms\Text\LatentDirichletAllocation.cs (1)
45
.Append(mlContext.Transforms.
Conversion
.MapValueToKey("Tokens"))
Dynamic\Transforms\Text\ProduceHashedNgrams.cs (1)
47
.Append(mlContext.Transforms.
Conversion
.MapValueToKey("Tokens"))
Dynamic\Transforms\Text\ProduceNgrams.cs (1)
56
.Append(mlContext.Transforms.
Conversion
.MapValueToKey("Tokens"))
Dynamic\Transforms\Text\TokenizeIntoCharactersAsKeys.cs (1)
31
.Append(mlContext.Transforms.
Conversion
.MapKeyToValue(
Microsoft.ML.Samples.GPU (9)
docs\samples\Microsoft.ML.Samples\Dynamic\TensorFlow\TextClassification.cs (1)
103
.Append(mlContext.Transforms.
Conversion
.MapValue(
docs\samples\Microsoft.ML.Samples\Dynamic\Trainers\MulticlassClassification\ImageClassification\ImageClassificationDefault.cs (2)
49
shuffledFullImagesDataset = mlContext.Transforms.
Conversion
68
.Append(mlContext.Transforms.
Conversion
.MapKeyToValue(
docs\samples\Microsoft.ML.Samples\Dynamic\Trainers\MulticlassClassification\ImageClassification\LearningRateSchedulingCifarResnetTransferLearning.cs (3)
53
trainDataset = mlContext.Transforms.
Conversion
69
testDataset = mlContext.Transforms.
Conversion
104
.Append(mlContext.Transforms.
Conversion
.MapKeyToValue(
docs\samples\Microsoft.ML.Samples\Dynamic\Trainers\MulticlassClassification\ImageClassification\ResnetV2101TransferLearningEarlyStopping.cs (1)
48
shuffledFullImagesDataset = mlContext.Transforms.
Conversion
docs\samples\Microsoft.ML.Samples\Dynamic\Trainers\MulticlassClassification\ImageClassification\ResnetV2101TransferLearningTrainTestSplit.cs (2)
48
shuffledFullImagesDataset = mlContext.Transforms.
Conversion
84
.Append(mlContext.Transforms.
Conversion
.MapKeyToValue(
Microsoft.ML.TensorFlow.Tests (11)
TensorflowTests.cs (11)
724
.Append(_mlContext.Transforms.
Conversion
.MapValueToKey("KeyLabel", "Label", maximumNumberOfKeys: 10))
1119
.Append(_mlContext.Transforms.
Conversion
.MapValueToKey("Label"))
1281
.Append(_mlContext.Transforms.
Conversion
.MapValue(lookupMap, lookupMap.Schema["Words"], lookupMap.Schema["Ids"],
1406
shuffledFullImagesDataset = _mlContext.Transforms.
Conversion
1420
.Append(_mlContext.Transforms.
Conversion
.MapKeyToValue(outputColumnName: "PredictedLabel", inputColumnName: "PredictedLabel"))); ;
1481
shuffledFullImagesDataset = _mlContext.Transforms.
Conversion
1523
.Append(_mlContext.Transforms.
Conversion
.MapKeyToValue(outputColumnName: "PredictedLabel", inputColumnName: "PredictedLabel")));
1613
shuffledFullImagesDataset = _mlContext.Transforms.
Conversion
1681
.Append(_mlContext.Transforms.
Conversion
.MapKeyToValue(
1768
shuffledFullImagesDataset = _mlContext.Transforms.
Conversion
1857
shuffledFullImagesDataset = _mlContext.Transforms.
Conversion
Microsoft.ML.Tests (193)
CalibratedModelParametersTests.cs (1)
136
return pipeline.Append(ML.Transforms.
Conversion
.ConvertType("Label", outputKind: DataKind.Boolean))
DatabaseLoaderTests.cs (10)
67
IEstimator<ITransformer> pipeline = mlContext.Transforms.
Conversion
.MapValueToKey("Label")
71
.Append(mlContext.Transforms.
Conversion
.MapKeyToValue("PredictedLabel"));
103
IEstimator<ITransformer> pipeline = mlContext.Transforms.
Conversion
.MapValueToKey("Label")
107
.Append(mlContext.Transforms.
Conversion
.MapKeyToValue("PredictedLabel"));
139
IEstimator<ITransformer> pipeline = mlContext.Transforms.
Conversion
.MapValueToKey("Label")
143
.Append(mlContext.Transforms.
Conversion
.MapKeyToValue("PredictedLabel"));
171
IEstimator<ITransformer> pipeline = mlContext.Transforms.
Conversion
.MapValueToKey("Label")
175
.Append(mlContext.Transforms.
Conversion
.MapKeyToValue("PredictedLabel"));
203
var pipeline = mlContext.Transforms.
Conversion
.MapValueToKey("Label")
207
.Append(mlContext.Transforms.
Conversion
.MapKeyToValue("PredictedLabel"));
FeatureContributionTests.cs (3)
318
return pipeline.Append(ML.Transforms.
Conversion
.ConvertType("Label", outputKind: DataKind.Boolean))
321
return pipeline.Append(ML.Transforms.
Conversion
.MapValueToKey("Label"))
324
return pipeline.Append(ML.Transforms.
Conversion
.MapValueToKey("GroupId"))
OnnxConversionTest.cs (105)
630
Append(mlContext.Transforms.
Conversion
.MapValueToKey("Label")).
949
var pipeline = mlContext.Transforms.
Conversion
.ConvertType("ValueConverted", "Value", outputKind: toKind);
1042
var pipeline = ML.Transforms.
Conversion
.Hash("ValueHashed", "Value");
1168
.Append(mlContext.Transforms.
Conversion
.ConvertType("MissingIndicator", outputKind: DataKind.Int32));
1208
var pipeline = mlContext.Transforms.
Conversion
.MapValueToKey("Key", "Value",
1247
pipelines.Add(mlContext.Transforms.
Conversion
.MapValue("Value", new Dictionary<float, int> { { 3, 6 }, { 23, 46 } }, "Keys", treatValuesAsKeyType));
1248
pipelines.Add(mlContext.Transforms.
Conversion
.MapValue("Value", new Dictionary<float, long> { { 3, 6 }, { 23, 46 } }, "Keys", treatValuesAsKeyType));
1249
pipelines.Add(mlContext.Transforms.
Conversion
.MapValue("Value", new Dictionary<float, short> { { 3, 6 }, { 23, 46 } }, "Keys", treatValuesAsKeyType));
1250
pipelines.Add(mlContext.Transforms.
Conversion
.MapValue("Value", new Dictionary<float, uint> { { 3, 6 }, { 23, 46 } }, "Keys", treatValuesAsKeyType));
1251
pipelines.Add(mlContext.Transforms.
Conversion
.MapValue("Value", new Dictionary<float, ushort> { { 3, 6 }, { 23, 46 } }, "Keys", treatValuesAsKeyType));
1252
pipelines.Add(mlContext.Transforms.
Conversion
.MapValue("Value", new Dictionary<float, ulong> { { 3, 6 }, { 23, 46 } }, "Keys", treatValuesAsKeyType));
1253
pipelines.Add(mlContext.Transforms.
Conversion
.MapValue("Value", new Dictionary<float, string> { { 3, "True" }, { 23, "False" } }, "Keys", treatValuesAsKeyType));
1254
pipelines.Add(mlContext.Transforms.
Conversion
.MapValue("Value", new Dictionary<float, float> { { 3, 6 }, { 23, 46 } }, "Keys", treatValuesAsKeyType));
1255
pipelines.Add(mlContext.Transforms.
Conversion
.MapValue("Value", new Dictionary<float, double> { { 3, 698 }, { 23, 7908 } }, "Keys", treatValuesAsKeyType));
1256
pipelines.Add(mlContext.Transforms.
Conversion
.MapValue("Value", new Dictionary<float, bool> { { 3, false }, { 23, true } }, "Keys", treatValuesAsKeyType));
1260
pipelines.Add(mlContext.Transforms.
Conversion
.MapValue("Value", new Dictionary<double, int> { { 3, 6 }, { 23, 46 } }, "Keys"));
1261
pipelines.Add(mlContext.Transforms.
Conversion
.MapValue("Value", new Dictionary<double, uint> { { 3, 6 }, { 23, 46 } }, "Keys"));
1262
pipelines.Add(mlContext.Transforms.
Conversion
.MapValue("Value", new Dictionary<double, ushort> { { 3, 6 }, { 23, 46 } }, "Keys"));
1263
pipelines.Add(mlContext.Transforms.
Conversion
.MapValue("Value", new Dictionary<double, ulong> { { 3, 6 }, { 23, 46 } }, "Keys"));
1264
pipelines.Add(mlContext.Transforms.
Conversion
.MapValue("Value", new Dictionary<double, string> { { 3, "True" }, { 23, "False" } }, "Keys"));
1265
pipelines.Add(mlContext.Transforms.
Conversion
.MapValue("Value", new Dictionary<double, float> { { 3, 6 }, { 23, 46 } }, "Keys"));
1266
pipelines.Add(mlContext.Transforms.
Conversion
.MapValue("Value", new Dictionary<double, long> { { 3, 698 }, { 23, 7908 } }, "Keys"));
1267
pipelines.Add(mlContext.Transforms.
Conversion
.MapValue("Value", new Dictionary<double, double> { { 3, 698 }, { 23, 7908 } }, "Keys"));
1268
pipelines.Add(mlContext.Transforms.
Conversion
.MapValue("Value", new Dictionary<double, bool> { { 3, true }, { 23, false } }, "Keys"));
1272
pipelines.Add(mlContext.Transforms.
Conversion
.MapValue("Value", new Dictionary<bool, int> { { true, 6 }, { false, 46 } }, "Keys"));
1273
pipelines.Add(mlContext.Transforms.
Conversion
.MapValue("Value", new Dictionary<bool, short> { { true, 6 }, { false, 46 } }, "Keys"));
1274
pipelines.Add(mlContext.Transforms.
Conversion
.MapValue("Value", new Dictionary<bool, uint> { { true, 6 }, { false, 46 } }, "Keys"));
1275
pipelines.Add(mlContext.Transforms.
Conversion
.MapValue("Value", new Dictionary<bool, ushort> { { true, 6 }, { false, 46 } }, "Keys"));
1276
pipelines.Add(mlContext.Transforms.
Conversion
.MapValue("Value", new Dictionary<bool, ulong> { { true, 6 }, { false, 46 } }, "Keys"));
1277
pipelines.Add(mlContext.Transforms.
Conversion
.MapValue("Value", new Dictionary<bool, string> { { true, "True" }, { false, "False" } }, "Keys"));
1278
pipelines.Add(mlContext.Transforms.
Conversion
.MapValue("Value", new Dictionary<bool, float> { { true, 6 }, { false, 46 } }, "Keys"));
1279
pipelines.Add(mlContext.Transforms.
Conversion
.MapValue("Value", new Dictionary<bool, long> { { true, 698 }, { false, 7908 } }, "Keys"));
1280
pipelines.Add(mlContext.Transforms.
Conversion
.MapValue("Value", new Dictionary<bool, double> { { true, 698 }, { false, 7908 } }, "Keys"));
1281
pipelines.Add(mlContext.Transforms.
Conversion
.MapValue("Value", new Dictionary<bool, bool> { { false, true }, { true, false } }, "Keys"));
1285
pipelines.Add(mlContext.Transforms.
Conversion
.MapValue("Value", new Dictionary<string, int> { { "3", 3 }, { "23", 23 } }, "Keys"));
1286
pipelines.Add(mlContext.Transforms.
Conversion
.MapValue("Value", new Dictionary<string, short> { { "3", 3 }, { "23", 23 } }, "Keys"));
1287
pipelines.Add(mlContext.Transforms.
Conversion
.MapValue("Value", new Dictionary<string, uint> { { "3", 6 }, { "23", 46 } }, "Keys"));
1288
pipelines.Add(mlContext.Transforms.
Conversion
.MapValue("Value", new Dictionary<string, ushort> { { "3", 6 }, { "23", 46 } }, "Keys"));
1289
pipelines.Add(mlContext.Transforms.
Conversion
.MapValue("Value", new Dictionary<string, ulong> { { "3", 6 }, { "23", 46 } }, "Keys"));
1290
pipelines.Add(mlContext.Transforms.
Conversion
.MapValue("Value", new Dictionary<string, float> { { "3", 6 }, { "23", 23 } }, "Keys"));
1291
pipelines.Add(mlContext.Transforms.
Conversion
.MapValue("Value", new Dictionary<string, double> { { "3", 6 }, { "23", 23 } }, "Keys"));
1292
pipelines.Add(mlContext.Transforms.
Conversion
.MapValue("Value", new Dictionary<string, long> { { "3", 3 }, { "23", 23 } }, "Keys"));
1293
pipelines.Add(mlContext.Transforms.
Conversion
.MapValue("Value", new Dictionary<string, bool> { { "3", true }, { "23", false } }, "Keys"));
1297
pipelines.Add(mlContext.Transforms.
Conversion
.MapValue("Value", new Dictionary<int, short> { { 3, 6 }, { 23, 46 } }, "Keys"));
1298
pipelines.Add(mlContext.Transforms.
Conversion
.MapValue("Value", new Dictionary<int, int> { { 3, 6 }, { 23, 46 } }, "Keys"));
1299
pipelines.Add(mlContext.Transforms.
Conversion
.MapValue("Value", new Dictionary<int, long> { { 3, 6 }, { 23, 46 } }, "Keys"));
1300
pipelines.Add(mlContext.Transforms.
Conversion
.MapValue("Value", new Dictionary<int, ushort> { { 3, 6 }, { 23, 46 } }, "Keys"));
1301
pipelines.Add(mlContext.Transforms.
Conversion
.MapValue("Value", new Dictionary<int, uint> { { 3, 6 }, { 23, 46 } }, "Keys"));
1302
pipelines.Add(mlContext.Transforms.
Conversion
.MapValue("Value", new Dictionary<int, ulong> { { 3, 6 }, { 23, 46 } }, "Keys"));
1303
pipelines.Add(mlContext.Transforms.
Conversion
.MapValue("Value", new Dictionary<int, string> { { 3, "True" }, { 23, "False" } }, "Keys"));
1304
pipelines.Add(mlContext.Transforms.
Conversion
.MapValue("Value", new Dictionary<int, float> { { 3, 6.435f }, { 23, 23.534f } }, "Keys"));
1305
pipelines.Add(mlContext.Transforms.
Conversion
.MapValue("Value", new Dictionary<int, double> { { 3, 6.435f }, { 23, 23.534f } }, "Keys"));
1309
pipelines.Add(mlContext.Transforms.
Conversion
.MapValue("Value", new Dictionary<short, short> { { 3, 6 }, { 23, 46 } }, "Keys"));
1310
pipelines.Add(mlContext.Transforms.
Conversion
.MapValue("Value", new Dictionary<short, int> { { 3, 6 }, { 23, 46 } }, "Keys"));
1311
pipelines.Add(mlContext.Transforms.
Conversion
.MapValue("Value", new Dictionary<short, long> { { 3, 6 }, { 23, 46 } }, "Keys"));
1312
pipelines.Add(mlContext.Transforms.
Conversion
.MapValue("Value", new Dictionary<short, ushort> { { 3, 6 }, { 23, 46 } }, "Keys"));
1313
pipelines.Add(mlContext.Transforms.
Conversion
.MapValue("Value", new Dictionary<short, uint> { { 3, 6 }, { 23, 46 } }, "Keys"));
1314
pipelines.Add(mlContext.Transforms.
Conversion
.MapValue("Value", new Dictionary<short, ulong> { { 3, 6 }, { 23, 46 } }, "Keys"));
1315
pipelines.Add(mlContext.Transforms.
Conversion
.MapValue("Value", new Dictionary<short, string> { { 3, "True" }, { 23, "False" } }, "Keys"));
1316
pipelines.Add(mlContext.Transforms.
Conversion
.MapValue("Value", new Dictionary<short, float> { { 3, 6.435f }, { 23, 23.534f } }, "Keys"));
1317
pipelines.Add(mlContext.Transforms.
Conversion
.MapValue("Value", new Dictionary<short, double> { { 3, 6.435f }, { 23, 23.534f } }, "Keys"));
1321
pipelines.Add(mlContext.Transforms.
Conversion
.MapValue("Value", new Dictionary<long, short> { { 3, 6 }, { 23, 46 } }, "Keys"));
1322
pipelines.Add(mlContext.Transforms.
Conversion
.MapValue("Value", new Dictionary<long, int> { { 3, 6 }, { 23, 46 } }, "Keys"));
1323
pipelines.Add(mlContext.Transforms.
Conversion
.MapValue("Value", new Dictionary<long, long> { { 3, 6 }, { 23, 46 } }, "Keys"));
1324
pipelines.Add(mlContext.Transforms.
Conversion
.MapValue("Value", new Dictionary<long, ushort> { { 3, 6 }, { 23, 46 } }, "Keys"));
1325
pipelines.Add(mlContext.Transforms.
Conversion
.MapValue("Value", new Dictionary<long, uint> { { 3, 6 }, { 23, 46 } }, "Keys"));
1326
pipelines.Add(mlContext.Transforms.
Conversion
.MapValue("Value", new Dictionary<long, ulong> { { 3, 6 }, { 23, 46 } }, "Keys"));
1327
pipelines.Add(mlContext.Transforms.
Conversion
.MapValue("Value", new Dictionary<long, string> { { 3, "True" }, { 23, "False" } }, "Keys"));
1328
pipelines.Add(mlContext.Transforms.
Conversion
.MapValue("Value", new Dictionary<long, float> { { 3, 6.435f }, { 23, 23.534f } }, "Keys"));
1329
pipelines.Add(mlContext.Transforms.
Conversion
.MapValue("Value", new Dictionary<long, double> { { 3, 6.435f }, { 23, 23.534f } }, "Keys"));
1333
pipelines.Add(mlContext.Transforms.
Conversion
.MapValue("Value", new Dictionary<uint, short> { { 3, 6 }, { 23, 46 } }, "Keys"));
1334
pipelines.Add(mlContext.Transforms.
Conversion
.MapValue("Value", new Dictionary<uint, int> { { 3, 6 }, { 23, 46 } }, "Keys"));
1335
pipelines.Add(mlContext.Transforms.
Conversion
.MapValue("Value", new Dictionary<uint, long> { { 3, 6 }, { 23, 46 } }, "Keys"));
1336
pipelines.Add(mlContext.Transforms.
Conversion
.MapValue("Value", new Dictionary<uint, ushort> { { 3, 6 }, { 23, 46 } }, "Keys"));
1337
pipelines.Add(mlContext.Transforms.
Conversion
.MapValue("Value", new Dictionary<uint, uint> { { 3, 6 }, { 23, 46 } }, "Keys"));
1338
pipelines.Add(mlContext.Transforms.
Conversion
.MapValue("Value", new Dictionary<uint, ulong> { { 3, 6 }, { 23, 46 } }, "Keys"));
1339
pipelines.Add(mlContext.Transforms.
Conversion
.MapValue("Value", new Dictionary<uint, string> { { 3, "True" }, { 23, "False" } }, "Keys"));
1340
pipelines.Add(mlContext.Transforms.
Conversion
.MapValue("Value", new Dictionary<uint, float> { { 3, 6.435f }, { 23, 23.534f } }, "Keys"));
1341
pipelines.Add(mlContext.Transforms.
Conversion
.MapValue("Value", new Dictionary<uint, double> { { 3, 6.435f }, { 23, 23.534f } }, "Keys"));
1345
pipelines.Add(mlContext.Transforms.
Conversion
.MapValue("Value", new Dictionary<ushort, short> { { 3, 6 }, { 23, 46 } }, "Keys"));
1346
pipelines.Add(mlContext.Transforms.
Conversion
.MapValue("Value", new Dictionary<ushort, int> { { 3, 6 }, { 23, 46 } }, "Keys"));
1347
pipelines.Add(mlContext.Transforms.
Conversion
.MapValue("Value", new Dictionary<ushort, long> { { 3, 6 }, { 23, 46 } }, "Keys"));
1348
pipelines.Add(mlContext.Transforms.
Conversion
.MapValue("Value", new Dictionary<ushort, ushort> { { 3, 6 }, { 23, 46 } }, "Keys"));
1349
pipelines.Add(mlContext.Transforms.
Conversion
.MapValue("Value", new Dictionary<ushort, uint> { { 3, 6 }, { 23, 46 } }, "Keys"));
1350
pipelines.Add(mlContext.Transforms.
Conversion
.MapValue("Value", new Dictionary<ushort, ulong> { { 3, 6 }, { 23, 46 } }, "Keys"));
1351
pipelines.Add(mlContext.Transforms.
Conversion
.MapValue("Value", new Dictionary<ushort, string> { { 3, "True" }, { 23, "False" } }, "Keys"));
1352
pipelines.Add(mlContext.Transforms.
Conversion
.MapValue("Value", new Dictionary<ushort, float> { { 3, 6.435f }, { 23, 23.534f } }, "Keys"));
1353
pipelines.Add(mlContext.Transforms.
Conversion
.MapValue("Value", new Dictionary<ushort, double> { { 3, 6.435f }, { 23, 23.534f } }, "Keys"));
1357
pipelines.Add(mlContext.Transforms.
Conversion
.MapValue("Value", new Dictionary<ulong, short> { { 3, 6 }, { 23, 46 } }, "Keys"));
1358
pipelines.Add(mlContext.Transforms.
Conversion
.MapValue("Value", new Dictionary<ulong, int> { { 3, 6 }, { 23, 46 } }, "Keys"));
1359
pipelines.Add(mlContext.Transforms.
Conversion
.MapValue("Value", new Dictionary<ulong, long> { { 3, 6 }, { 23, 46 } }, "Keys"));
1360
pipelines.Add(mlContext.Transforms.
Conversion
.MapValue("Value", new Dictionary<ulong, ushort> { { 3, 6 }, { 23, 46 } }, "Keys"));
1361
pipelines.Add(mlContext.Transforms.
Conversion
.MapValue("Value", new Dictionary<ulong, uint> { { 3, 6 }, { 23, 46 } }, "Keys"));
1362
pipelines.Add(mlContext.Transforms.
Conversion
.MapValue("Value", new Dictionary<ulong, ulong> { { 3, 6 }, { 23, 46 } }, "Keys"));
1363
pipelines.Add(mlContext.Transforms.
Conversion
.MapValue("Value", new Dictionary<ulong, string> { { 3, "True" }, { 23, "False" } }, "Keys"));
1364
pipelines.Add(mlContext.Transforms.
Conversion
.MapValue("Value", new Dictionary<ulong, float> { { 3, 6.435f }, { 23, 23.534f } }, "Keys"));
1365
pipelines.Add(mlContext.Transforms.
Conversion
.MapValue("Value", new Dictionary<ulong, double> { { 3, 6.435f }, { 23, 23.534f } }, "Keys"));
1410
mlContext.Transforms.
Conversion
.MapValueToKey("Key", "Value").
1411
Append(mlContext.Transforms.
Conversion
.MapKeyToValue("Value", "Key")),
1413
mlContext.Transforms.
Conversion
.MapValueToKey("Value").
1414
Append(mlContext.Transforms.
Conversion
.MapKeyToValue("Value"))
1479
.Append(mlContext.Transforms.
Conversion
.MapValueToKey("Tokens"))
1682
.Append(mlContext.Transforms.
Conversion
.MapValueToKey("Label"));
1776
var pipeline1 = mlContext.Transforms.
Conversion
.MapValueToKey("Label");
2007
.Append(mlContext.Transforms.
Conversion
.MapValueToKey("Label"));
PermutationFeatureImportanceTests.cs (6)
861
return pipeline.Append(ML.Transforms.
Conversion
.ConvertType("Label", outputKind: DataKind.Boolean))
864
return pipeline.Append(ML.Transforms.
Conversion
.MapValueToKey("Label"))
867
return pipeline.Append(ML.Transforms.
Conversion
.MapValueToKey("GroupId"))
942
return pipeline.Append(ML.Transforms.
Conversion
.ConvertType("Label", outputKind: DataKind.Boolean))
947
return pipeline.Append(ML.Transforms.
Conversion
.MapValueToKey("Label"))
951
return pipeline.Append(ML.Transforms.
Conversion
.MapValueToKey("GroupId"))
RangeFilterTests.cs (1)
31
data = ML.Transforms.
Conversion
.Hash("Key", "Strings", numberOfBits: 20).Fit(data).Transform(data);
Scenarios\Api\CookbookSamples\CookbookSamplesDynamicApi.cs (3)
232
.Append(mlContext.Transforms.
Conversion
.MapValueToKey("Label"), TransformerScope.TrainTest)
264
var finalPipeline = pipeline.Append(mlContext.Transforms.
Conversion
.MapKeyToValue("Data", "PredictedLabel"));
646
.Append(mlContext.Transforms.
Conversion
.MapValueToKey("Label"), TransformerScope.TrainTest)
Scenarios\Api\Estimators\PredictAndMetadata.cs (3)
32
.Append(ml.Transforms.
Conversion
.MapValueToKey("Label"), TransformerScope.TrainTest)
81
.Append(mlContext.Transforms.
Conversion
.MapValueToKey("Label"))
115
var pipelineUnamed = mlContext.Transforms.
Conversion
.MapValueToKey("Label")
Scenarios\Api\TestApi.cs (2)
180
xf = mlContext.Transforms.
Conversion
.ConvertType("Label", outputKind: DataKind.Boolean).Fit(xf).Transform(xf);
481
var inputWithKey = mlContext.Transforms.
Conversion
.MapValueToKey("KeyStrat", "TextStrat").Fit(input).Transform(input);
Scenarios\IrisPlantClassificationTests.cs (1)
34
.Append(mlContext.Transforms.
Conversion
.MapValueToKey("Label"))
Scenarios\IrisPlantClassificationWithStringLabelTests.cs (2)
38
.Append(mlContext.Transforms.
Conversion
.MapValueToKey("Label", "IrisPlantType"), TransformerScope.TrainTest)
42
.Append(mlContext.Transforms.
Conversion
.MapKeyToValue("Plant", "PredictedLabel"));
Scenarios\OvaTest.cs (4)
32
var data = mlContext.Data.Cache(mlContext.Transforms.
Conversion
.MapValueToKey("Label")
66
var data = mlContext.Data.Cache(mlContext.Transforms.
Conversion
.MapValueToKey("Label")
102
var data = mlContext.Data.Cache(mlContext.Transforms.
Conversion
.MapValueToKey("Label")
136
var data = mlContext.Data.Cache(mlContext.Transforms.
Conversion
.MapValueToKey("Label")
ScenariosWithDirectInstantiation\IrisPlantClassificationTests.cs (1)
32
.Append(mlContext.Transforms.
Conversion
.MapValueToKey("Label"))
TrainerEstimators\MetalinearEstimators.cs (1)
68
.Append(ML.Transforms.
Conversion
.MapKeyToValue("PredictedLabelValue", "PredictedLabel"));
TrainerEstimators\SdcaTests.cs (6)
28
var binaryData = ML.Transforms.
Conversion
.ConvertType("Label", outputKind: DataKind.Boolean)
43
var mcData = ML.Transforms.
Conversion
.MapValueToKey("Label").Fit(data).Transform(data);
174
var sdcaWithoutWeightMulticlass = mlContext.Transforms.
Conversion
.MapValueToKey("LabelIndex", "Label").
178
var sdcaWithWeightMulticlass = mlContext.Transforms.
Conversion
.MapValueToKey("LabelIndex", "Label").
277
var pipeline = mlContext.Transforms.
Conversion
.MapValueToKey("LabelIndex", "Label").
311
var pipeline = mlContext.Transforms.
Conversion
.MapValueToKey("LabelIndex", "Label").
TrainerEstimators\TreeEnsembleFeaturizerTest.cs (1)
803
var pipeline = ML.Transforms.
Conversion
.MapValueToKey("KeyLabel", "Label")
TrainerEstimators\TreeEstimators.cs (2)
745
mlContext.Transforms.
Conversion
782
.Append(ML.Transforms.
Conversion
.MapKeyToValue("PredictedLabel"));
Transformers\CategoricalTests.cs (3)
109
var pipe = mlContext.Transforms.
Conversion
.ConvertType("A", outputKind: DataKind.Single)
110
.Append(mlContext.Transforms.
Conversion
.ConvertType("B", outputKind: DataKind.Single))
112
.Append(mlContext.Transforms.
Conversion
.MapValueToKey("Label"))
Transformers\ConvertTests.cs (7)
130
var pipe = ML.Transforms.
Conversion
.ConvertType(columns: new[] {new TypeConvertingEstimator.ColumnOptions("ConvA", DataKind.Single, "A"),
169
var allTypesPipe = ML.Transforms.
Conversion
.ConvertType(columns: new[] {
254
var allInputTypesDataPipe = ML.Transforms.
Conversion
.ConvertType(columns: new[] {new TypeConvertingEstimator.ColumnOptions("A1", DataKind.String, "A"),
292
var pipe = mlContext.Transforms.
Conversion
.MapValueToKey(new[] { ci }, sideData);
320
var pipe = ML.Transforms.
Conversion
.ConvertType(columns: new[] {new TypeConvertingEstimator.ColumnOptions("ConvA", typeof(double), "A"),
341
}).Append(ML.Transforms.
Conversion
.ConvertType(new[] {
400
var modelNew = ML.Transforms.
Conversion
.ConvertType(new[] { new TypeConvertingEstimator.ColumnOptions("convertedKey",
Transformers\HashTests.cs (4)
51
var pipe = ML.Transforms.
Conversion
.Hash(new[]{
73
var pipe = ML.Transforms.
Conversion
.Hash(new[] {
113
var pipe = ML.Transforms.
Conversion
.Hash(new[]{
384
.Append(ML.Transforms.
Conversion
.Hash(
Transformers\KeyToBinaryVectorEstimatorTest.cs (5)
54
var pipe = ML.Transforms.
Conversion
.MapKeyToBinaryVector(new[] { new InputOutputColumnPair("CatA", "TermA"), new InputOutputColumnPair("CatC", "TermC") });
74
var est = ML.Transforms.
Conversion
.MapKeyToBinaryVector("ScalarString", "A")
75
.Append(ML.Transforms.
Conversion
.MapKeyToBinaryVector("VectorString", "B"));
100
var pipe = ML.Transforms.
Conversion
.MapKeyToBinaryVector(new[] {
155
var pipe = ML.Transforms.
Conversion
.MapKeyToBinaryVector(new[] { new InputOutputColumnPair("CatA", "TermA"), new InputOutputColumnPair("CatB", "TermB"), new InputOutputColumnPair("CatC", "TermC") });
Transformers\KeyToValueTests.cs (2)
78
var est = ML.Transforms.
Conversion
.MapKeyToValue("ScalarString", "A")
79
.Append(ML.Transforms.
Conversion
.MapKeyToValue("VectorString", "B"));
Transformers\KeyToVectorEstimatorTests.cs (7)
61
var pipe = ML.Transforms.
Conversion
.MapKeyToVector(new KeyToVectorMappingEstimator.ColumnOptions("CatA", "TermA", false),
83
var est = ML.Transforms.
Conversion
.MapKeyToVector("ScalarString", "A")
84
.Append(ML.Transforms.
Conversion
.MapKeyToVector("VectorString", "B"))
85
.Append(ML.Transforms.
Conversion
.MapKeyToVector("VectorBaggedString", "B", true));
114
var pipe = ML.Transforms.
Conversion
.MapKeyToVector(
214
var pipe = ML.Transforms.
Conversion
.MapKeyToVector(
256
var pipeline = mlContext.Transforms.
Conversion
.MapValueToKey("Label")
Transformers\ValueMappingTests.cs (13)
146
Append(ML.Transforms.
Conversion
.MapValue(keyValuePairs, true, new[] { new InputOutputColumnPair("VecD", "TokenizeA"), new InputOutputColumnPair("E", "B"), new InputOutputColumnPair("F", "C") }));
370
var est = ML.Transforms.
Conversion
.MapValue(keyValuePairs,
402
var estimator = ML.Transforms.
Conversion
.MapValue(keyValuePairs, true,
437
var estimator = ML.Transforms.
Conversion
.MapValue(keyValuePairs, true, new[] { new InputOutputColumnPair("D", "A"), new InputOutputColumnPair("E", "B"), new InputOutputColumnPair("F", "C") });
478
var estimator = ML.Transforms.
Conversion
.MapValue(keyValuePairs, true, new[] { new InputOutputColumnPair("D", "A"), new InputOutputColumnPair("E", "B"), new InputOutputColumnPair("F", "C") });
519
var estimator = ML.Transforms.
Conversion
.MapValue(keyValuePairs, true, new[] { new InputOutputColumnPair("D", "A"), new InputOutputColumnPair("E", "B"), new InputOutputColumnPair("F", "C") });
558
var estimator = ML.Transforms.
Conversion
.MapValue("D", keyValuePairs, "A", true).
559
Append(ML.Transforms.
Conversion
.MapKeyToValue("DOutput", "D"));
601
var est = ML.Transforms.
Conversion
.MapValue(keyValuePairs, new[] { new InputOutputColumnPair("D", "A"), new InputOutputColumnPair("E", "B"), new InputOutputColumnPair("F", "C") });
620
var est = ML.Transforms.
Conversion
.MapValue(keyValuePairs, new[] { new InputOutputColumnPair("D", "A"), new InputOutputColumnPair("E", "B"), new InputOutputColumnPair("F", "C") });
641
.Append(ML.Transforms.
Conversion
.MapValue("VecB", keyValuePairs, "TokenizeB"));
692
var est = ML.Transforms.
Conversion
.MapValue(keyValuePairs,
778
var pipeline = ML.Transforms.
Conversion
.MapValue("PriceCategory", lookupIdvMap, lookupIdvMap.Schema["Value"], lookupIdvMap.Schema["Category"], "Price");
Microsoft.ML.TimeSeries.Tests (2)
TimeSeriesDirectApi.cs (2)
304
.Append(ml.Transforms.
Conversion
.ConvertType("Value", "Value", DataKind.Single))
450
.Append(ml.Transforms.
Conversion
.ConvertType("Value", "Value", DataKind.Single))
Microsoft.ML.TorchSharp.Tests (20)
NerTests.cs (6)
70
var estimator = chain.Append(ML.Transforms.
Conversion
.MapValueToKey("Label", keyData: labels))
72
.Append(ML.Transforms.
Conversion
.MapKeyToValue("outputColumn"));
149
var estimator = chain.Append(ML.Transforms.
Conversion
.MapValueToKey("Label", keyData: labels))
151
.Append(ML.Transforms.
Conversion
.MapKeyToValue("outputColumn"));
223
var estimator = chain.Append(ML.Transforms.
Conversion
.MapValueToKey("Label", keyData: labels))
225
.Append(ML.Transforms.
Conversion
.MapKeyToValue("outputColumn"));
ObjectDetectionTests.cs (6)
47
.Append(ML.Transforms.
Conversion
.MapValueToKey("Labels"), TransformerScope.Training)
49
.Append(ML.Transforms.
Conversion
.ConvertType("Box"), TransformerScope.Training)
52
.Append(ML.Transforms.
Conversion
.MapKeyToValue("PredictedLabel"));
64
.Append(ML.Transforms.
Conversion
.MapValueToKey("Labels"))
66
.Append(ML.Transforms.
Conversion
.ConvertType("Box"))
69
.Append(ML.Transforms.
Conversion
.MapKeyToValue("PredictedLabel"));
TextClassificationTests.cs (8)
98
var estimator = chain.Append(ML.Transforms.
Conversion
.MapValueToKey("Label", "Sentiment"), TransformerScope.TrainTest)
100
.Append(ML.Transforms.
Conversion
.MapKeyToValue("outputColumn"));
177
mlContext.Transforms.
Conversion
.MapValueToKey("Label")
179
.Append(mlContext.Transforms.
Conversion
.MapKeyToValue("PredictedLabel"));
235
var estimator = ML.Transforms.
Conversion
.MapValueToKey("Label", "Sentiment")
237
.Append(ML.Transforms.
Conversion
.MapKeyToValue("outputColumn"));
316
var dataPrep = ML.Transforms.
Conversion
.MapValueToKey("Label");
321
.Append(ML.Transforms.
Conversion
.MapKeyToValue("outputColumn"));