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