Skip to content

Commit 2e27634

Browse files
committed
updated samples or moved to test folder to work with changes
1 parent e63ad50 commit 2e27634

File tree

12 files changed

+15
-14
lines changed

12 files changed

+15
-14
lines changed

docs/samples/Microsoft.ML.Samples/Dynamic/Normalizer.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ public static void Example()
5858

5959
// Composing a different pipeline if we wanted to normalize more than one column at a time.
6060
// Using log scale as the normalization mode.
61-
var multiColPipeline = ml.Transforms.Normalize(NormalizingEstimator.NormalizationMode.LogMeanVariance, new ColumnOptions[] { ("LogInduced", "Induced"), ("LogSpontaneous", "Spontaneous") });
61+
var multiColPipeline = ml.Transforms.Normalize("LogInduced", "Induced", NormalizingEstimator.NormalizationMode.LogMeanVariance)
62+
.Append(ml.Transforms.Normalize("LogSpontaneous", "Spontaneous", NormalizingEstimator.NormalizationMode.LogMeanVariance));
6263
// The transformed data.
6364
var multiColtransformer = multiColPipeline.Fit(trainData);
6465
var multiColtransformedData = multiColtransformer.Transform(trainData);

docs/samples/Microsoft.ML.Samples/Dynamic/TensorFlow/TextClassification.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,10 @@ public static void Example()
6969
};
7070

7171
var engine = mlContext.Transforms.Text.TokenizeIntoWords("TokenizedWords", "Sentiment_Text")
72-
.Append(mlContext.Transforms.Conversion.MapValue(lookupMap, "Words", "Ids", new ColumnOptions[] { ("VariableLenghtFeatures", "TokenizedWords") }))
72+
.Append(mlContext.Transforms.Conversion.MapValue(lookupMap, "Words", "Ids", "VariableLenghtFeatures", "TokenizedWords"))
7373
.Append(mlContext.Transforms.CustomMapping(ResizeFeaturesAction, "Resize"))
7474
.Append(tensorFlowModel.ScoreTensorFlowModel(new[] { "Prediction/Softmax" }, new[] { "Features" }))
75-
.Append(mlContext.Transforms.CopyColumns(("Prediction", "Prediction/Softmax")))
75+
.Append(mlContext.Transforms.CopyColumns("Prediction", "Prediction/Softmax"))
7676
.Fit(dataView)
7777
.CreatePredictionEngine<IMDBSentiment, OutputScores>(mlContext);
7878

docs/samples/Microsoft.ML.Samples/Dynamic/Transforms/ImageAnalytics/ConvertToGrayScale.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ public static void Example()
3636

3737
var imagesFolder = Path.GetDirectoryName(imagesDataFile);
3838
// Image loading pipeline.
39-
var pipeline = mlContext.Transforms.LoadImages(imagesFolder, ("ImageObject", "ImagePath"))
40-
.Append(mlContext.Transforms.ConvertToGrayscale(("Grayscale", "ImageObject")));
39+
var pipeline = mlContext.Transforms.LoadImages(imagesFolder, "ImageObject", "ImagePath")
40+
.Append(mlContext.Transforms.ConvertToGrayscale("Grayscale", "ImageObject"));
4141

4242
var transformedData = pipeline.Fit(data).Transform(data);
4343

docs/samples/Microsoft.ML.Samples/Dynamic/Transforms/ImageAnalytics/DnnFeaturizeImage.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public static void Example()
4040
// Installing the Microsoft.ML.DNNImageFeaturizer packages copies the models in the
4141
// `DnnImageModels` folder.
4242
// Image loading pipeline.
43-
var pipeline = mlContext.Transforms.LoadImages(imagesFolder, ("ImageObject", "ImagePath"))
43+
var pipeline = mlContext.Transforms.LoadImages(imagesFolder, "ImageObject", "ImagePath")
4444
.Append(mlContext.Transforms.ResizeImages("ImageObject", imageWidth: 224, imageHeight: 224))
4545
.Append(mlContext.Transforms.ExtractPixels("Pixels", "ImageObject"))
4646
.Append(mlContext.Transforms.DnnFeaturizeImage("FeaturizedImage", m => m.ModelSelector.ResNet18(mlContext, m.OutputColumn, m.InputColumn), "Pixels"));

docs/samples/Microsoft.ML.Samples/Dynamic/Transforms/ImageAnalytics/ExtractPixels.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public static void Example()
3737

3838
var imagesFolder = Path.GetDirectoryName(imagesDataFile);
3939
// Image loading pipeline.
40-
var pipeline = mlContext.Transforms.LoadImages(imagesFolder, ("ImageObject", "ImagePath"))
40+
var pipeline = mlContext.Transforms.LoadImages(imagesFolder, "ImageObject", "ImagePath")
4141
.Append(mlContext.Transforms.ResizeImages("ImageObject", imageWidth: 100, imageHeight: 100 ))
4242
.Append(mlContext.Transforms.ExtractPixels("Pixels", "ImageObject"));
4343

docs/samples/Microsoft.ML.Samples/Dynamic/Transforms/ImageAnalytics/LoadImages.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public static void Example()
3636

3737
var imagesFolder = Path.GetDirectoryName(imagesDataFile);
3838
// Image loading pipeline.
39-
var pipeline = mlContext.Transforms.LoadImages(imagesFolder, ("ImageReal", "ImagePath"));
39+
var pipeline = mlContext.Transforms.LoadImages(imagesFolder, "ImageReal", "ImagePath");
4040
var transformedData = pipeline.Fit(data).Transform(data);
4141

4242
// The transformedData IDataView contains the loaded images now

docs/samples/Microsoft.ML.Samples/Dynamic/Transforms/ImageAnalytics/ResizeImages.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public static void Example()
3636

3737
var imagesFolder = Path.GetDirectoryName(imagesDataFile);
3838
// Image loading pipeline.
39-
var pipeline = mlContext.Transforms.LoadImages(imagesFolder, ("ImageReal", "ImagePath"))
39+
var pipeline = mlContext.Transforms.LoadImages(imagesFolder, "ImageReal", "ImagePath")
4040
.Append(mlContext.Transforms.ResizeImages("ImageReal", imageWidth: 100, imageHeight: 100));
4141

4242

docs/samples/Microsoft.ML.Samples/Dynamic/ValueMapping.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public static void Example()
5555
};
5656

5757
// Constructs the ValueMappingEstimator making the ML.net pipeline
58-
var pipeline = mlContext.Transforms.Conversion.MapValue(educationKeys, educationValues, ("EducationCategory", "Education"));
58+
var pipeline = mlContext.Transforms.Conversion.MapValue(educationKeys, educationValues, "EducationCategory", "Education");
5959

6060
// Fits the ValueMappingEstimator and transforms the data converting the Education to EducationCategory.
6161
IDataView transformedData = pipeline.Fit(trainData).Transform(trainData);

docs/samples/Microsoft.ML.Samples/Dynamic/ValueMappingFloatToString.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public static void Example()
4646
};
4747

4848
// Constructs the ValueMappingEstimator making the ML.net pipeline
49-
var pipeline = mlContext.Transforms.Conversion.MapValue(temperatureKeys, classificationValues, ("TemperatureCategory", "Temperature"));
49+
var pipeline = mlContext.Transforms.Conversion.MapValue(temperatureKeys, classificationValues, "TemperatureCategory", "Temperature");
5050

5151
// Fits the ValueMappingEstimator and transforms the data adding the TemperatureCategory column.
5252
IDataView transformedData = pipeline.Fit(trainData).Transform(trainData);

docs/samples/Microsoft.ML.Samples/Dynamic/ValueMappingStringToArray.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public static void Example()
4949
};
5050

5151
// Constructs the ValueMappingEstimator making the ML.net pipeline
52-
var pipeline = mlContext.Transforms.Conversion.MapValue<string, int>(educationKeys, educationValues, ("EducationFeature", "Education"));
52+
var pipeline = mlContext.Transforms.Conversion.MapValue<string, int>(educationKeys, educationValues, "EducationFeature", "Education");
5353

5454
// Fits the ValueMappingEstimator and transforms the data adding the EducationFeature column.
5555
IDataView transformedData = pipeline.Fit(trainData).Transform(trainData);

0 commit comments

Comments
 (0)