Skip to content

Commit 140cb70

Browse files
authored
Fix grammatical typos (#4853)
* Update BenchmarksTest.cs * More typo fixes * Update TextClassification.cs
1 parent 051ff17 commit 140cb70

File tree

57 files changed

+96
-96
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+96
-96
lines changed

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

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

4545
{
4646
// Note that it is best to get the getters and values *before*
47-
// iteration, so as to faciliate buffer sharing (if applicable),
47+
// iteration, so as to facilitate buffer sharing (if applicable),
4848
// and column-type validation once, rather than many times.
4949
ReadOnlyMemory<char> textValue = default;
5050
VBuffer<ReadOnlyMemory<char>> tokensValue = default;

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public static void Example()
5454
);
5555

5656
// Load the TensorFlow model once.
57-
// - Use it for quering the schema for input and output in the
57+
// - Use it for querying the schema for input and output in the
5858
// model
5959
// - Use it for prediction in the pipeline.
6060
// Unfrozen (SavedModel format) models are loaded by providing the
@@ -78,7 +78,7 @@ public static void Example()
7878
// In this sample, CustomMappingEstimator is used to resize variable
7979
// length vector to fixed length vector.
8080
// The following ML.NET pipeline
81-
// 1. tokenzies the string into words,
81+
// 1. tokenizes the string into words,
8282
// 2. maps each word to an integer which is an index in the
8383
// dictionary ('lookupMap'),
8484
// 3. Resizes the integer vector to a fixed length vector using

docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/AnomalyDetection/RandomizedPcaSample.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public static void Example()
2727
new DataPoint(){ Features = new float[3] {2, 0, 0} }
2828
};
2929

30-
// Convert the List<DataPoint> to IDataView, a consumble format to
30+
// Convert the List<DataPoint> to IDataView, a consumable format to
3131
// ML.NET functions.
3232
var data = mlContext.Data.LoadFromEnumerable(samples);
3333

docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/AnomalyDetection/RandomizedPcaSampleWithOptions.cs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public static void Example()
2929
new DataPoint(){ Features = new float[3] {1, 0, 0} }
3030
};
3131

32-
// Convert the List<DataPoint> to IDataView, a consumble format to
32+
// Convert the List<DataPoint> to IDataView, a consumable format to
3333
// ML.NET functions.
3434
var data = mlContext.Data.LoadFromEnumerable(samples);
3535

@@ -76,14 +76,14 @@ public static void Example()
7676
i, featuresInText, result.Score);
7777
}
7878
// Lines printed out should be
79-
// The 0 - th example with features[0, 2, 1] isan inlier with a score of being outlier 0.2264826
80-
// The 1 - th example with features[0, 2, 3] isan inlier with a score of being outlier 0.1739471
81-
// The 2 - th example with features[0, 2, 4] isan inlier with a score of being outlier 0.05711612
82-
// The 3 - th example with features[0, 2, 1] isan inlier with a score of being outlier 0.2264826
83-
// The 4 - th example with features[0, 2, 2] isan inlier with a score of being outlier 0.3868995
84-
// The 5 - th example with features[0, 2, 3] isan inlier with a score of being outlier 0.1739471
85-
// The 6 - th example with features[0, 2, 4] isan inlier with a score of being outlier 0.05711612
86-
// The 7 - th example with features[1, 0, 0] isan outlier with a score of being outlier 0.6260795
79+
// The 0 - th example with features[0, 2, 1] is an inlier with a score of being outlier 0.2264826
80+
// The 1 - th example with features[0, 2, 3] is an inlier with a score of being outlier 0.1739471
81+
// The 2 - th example with features[0, 2, 4] is an inlier with a score of being outlier 0.05711612
82+
// The 3 - th example with features[0, 2, 1] is an inlier with a score of being outlier 0.2264826
83+
// The 4 - th example with features[0, 2, 2] is an inlier with a score of being outlier 0.3868995
84+
// The 5 - th example with features[0, 2, 3] is an inlier with a score of being outlier 0.1739471
85+
// The 6 - th example with features[0, 2, 4] is an inlier with a score of being outlier 0.05711612
86+
// The 7 - th example with features[1, 0, 0] is an outlier with a score of being outlier 0.6260795
8787
}
8888

8989
// Example with 3 feature values. A training data set is a collection of

docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/BinaryClassification/Calibrators/Isotonic.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
var calibratorTransformer = calibratorEstimator.Fit(scoredData);
5757

58-
// Transform the scored data with a calibrator transfomer by adding a
58+
// Transform the scored data with a calibrator transformer by adding a
5959
// new column names "Probability". This column is a calibrated version
6060
// of the "Score" column, meaning its values are a valid probability
6161
// value in the [0, 1] interval representing the chance that the

docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/BinaryClassification/FieldAwareFactorizationMachine.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,11 @@ public static void Example()
9393
}
9494

9595
// Expected output:
96-
// Actual label: True, predicted label: True, score of being positive class: 1.115094, and probability of beling positive class: 0.7530775.
97-
// Actual label: False, predicted label: False, score of being positive class: -3.478797, and probability of beling positive class: 0.02992158.
98-
// Actual label: True, predicted label: True, score of being positive class: 3.191896, and probability of beling positive class: 0.9605282.
99-
// Actual label: False, predicted label: False, score of being positive class: -3.400863, and probability of beling positive class: 0.03226851.
100-
// Actual label: True, predicted label: True, score of being positive class: 4.06056, and probability of beling positive class: 0.9830528.
96+
// Actual label: True, predicted label: True, score of being positive class: 1.115094, and probability of being positive class: 0.7530775.
97+
// Actual label: False, predicted label: False, score of being positive class: -3.478797, and probability of being positive class: 0.02992158.
98+
// Actual label: True, predicted label: True, score of being positive class: 3.191896, and probability of being positive class: 0.9605282.
99+
// Actual label: False, predicted label: False, score of being positive class: -3.400863, and probability of being positive class: 0.03226851.
100+
// Actual label: True, predicted label: True, score of being positive class: 4.06056, and probability of being positive class: 0.9830528.
101101
}
102102

103103
// Number of features per field.

docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/BinaryClassification/FieldAwareFactorizationMachine.tt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ string TrainerDescription = @"// This trainer trains field-aware factorization (
2525
string TrainerOptions = null;
2626

2727
string ExpectedOutputPerInstance= @"// Expected output:
28-
// Actual label: True, predicted label: True, score of being positive class: 1.115094, and probability of beling positive class: 0.7530775.
29-
// Actual label: False, predicted label: False, score of being positive class: -3.478797, and probability of beling positive class: 0.02992158.
30-
// Actual label: True, predicted label: True, score of being positive class: 3.191896, and probability of beling positive class: 0.9605282.
31-
// Actual label: False, predicted label: False, score of being positive class: -3.400863, and probability of beling positive class: 0.03226851.
32-
// Actual label: True, predicted label: True, score of being positive class: 4.06056, and probability of beling positive class: 0.9830528.";
28+
// Actual label: True, predicted label: True, score of being positive class: 1.115094, and probability of being positive class: 0.7530775.
29+
// Actual label: False, predicted label: False, score of being positive class: -3.478797, and probability of being positive class: 0.02992158.
30+
// Actual label: True, predicted label: True, score of being positive class: 3.191896, and probability of being positive class: 0.9605282.
31+
// Actual label: False, predicted label: False, score of being positive class: -3.400863, and probability of being positive class: 0.03226851.
32+
// Actual label: True, predicted label: True, score of being positive class: 4.06056, and probability of being positive class: 0.9830528.";
3333

3434
string ExpectedOutput = @"// Expected output:
3535
// Accuracy: 0.99

docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/BinaryClassification/FieldAwareFactorizationMachineWithOptions.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -104,11 +104,11 @@ public static void Example()
104104
}
105105

106106
// Expected output:
107-
// Actual label: True, predicted label: True, score of being positive class: 1.115094, and probability of beling positive class: 0.7530775.
108-
// Actual label: False, predicted label: False, score of being positive class: -3.478797, and probability of beling positive class: 0.02992158.
109-
// Actual label: True, predicted label: True, score of being positive class: 3.191896, and probability of beling positive class: 0.9605282.
110-
// Actual label: False, predicted label: False, score of being positive class: -3.400863, and probability of beling positive class: 0.03226851.
111-
// Actual label: True, predicted label: True, score of being positive class: 4.06056, and probability of beling positive class: 0.9830528.
107+
// Actual label: True, predicted label: True, score of being positive class: 1.115094, and probability of being positive class: 0.7530775.
108+
// Actual label: False, predicted label: False, score of being positive class: -3.478797, and probability of being positive class: 0.02992158.
109+
// Actual label: True, predicted label: True, score of being positive class: 3.191896, and probability of being positive class: 0.9605282.
110+
// Actual label: False, predicted label: False, score of being positive class: -3.400863, and probability of being positive class: 0.03226851.
111+
// Actual label: True, predicted label: True, score of being positive class: 4.06056, and probability of being positive class: 0.9830528.
112112
}
113113

114114
// Number of features per field.

docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/BinaryClassification/FieldAwareFactorizationMachineWithOptions.tt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ string TrainerOptions = @"FieldAwareFactorizationMachineTrainer.Options
3232
}";
3333

3434
string ExpectedOutputPerInstance= @"// Expected output:
35-
// Actual label: True, predicted label: True, score of being positive class: 1.115094, and probability of beling positive class: 0.7530775.
36-
// Actual label: False, predicted label: False, score of being positive class: -3.478797, and probability of beling positive class: 0.02992158.
37-
// Actual label: True, predicted label: True, score of being positive class: 3.191896, and probability of beling positive class: 0.9605282.
38-
// Actual label: False, predicted label: False, score of being positive class: -3.400863, and probability of beling positive class: 0.03226851.
39-
// Actual label: True, predicted label: True, score of being positive class: 4.06056, and probability of beling positive class: 0.9830528.";
35+
// Actual label: True, predicted label: True, score of being positive class: 1.115094, and probability of being positive class: 0.7530775.
36+
// Actual label: False, predicted label: False, score of being positive class: -3.478797, and probability of being positive class: 0.02992158.
37+
// Actual label: True, predicted label: True, score of being positive class: 3.191896, and probability of being positive class: 0.9605282.
38+
// Actual label: False, predicted label: False, score of being positive class: -3.400863, and probability of being positive class: 0.03226851.
39+
// Actual label: True, predicted label: True, score of being positive class: 4.06056, and probability of being positive class: 0.9830528.";
4040

4141
string ExpectedOutput = @"// Expected output:
4242
// Accuracy: 0.99

docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/BinaryClassification/MultipleFeatureColumnsBinaryClassification.ttinclude

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ namespace Samples.Dynamic.Trainers.BinaryClassification
9393
[VectorType(featureLength)]
9494
public float[] Field1 { get; set; }
9595

96-
// Features from the thrid field.
96+
// Features from the third field.
9797
[VectorType(featureLength)]
9898
public float[] Field2 { get; set; }
9999
}

docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/MulticlassClassification/ImageClassification/ResnetV2101TransferLearningTrainTestSplit.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ public class InMemoryImageData
339339
public string Label;
340340
}
341341

342-
// ImageData class holding the imagepath and label.
342+
// ImageData class holding the image path and label.
343343
public class ImageData
344344
{
345345
[LoadColumn(0)]

docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/MulticlassClassification/PermutationFeatureImportanceLoadFromDisk.cs

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

5858
// Now let's look at which features are most important to the model
5959
// overall. Get the feature indices sorted by their impact on
60-
// microaccuracy.
60+
// micro-accuracy.
6161
var sortedIndices = permutationMetrics
6262
.Select((metrics, index) => new { index, metrics.MicroAccuracy })
6363
.OrderByDescending(feature => Math.Abs(feature.MicroAccuracy.Mean))

docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/Recommendation/MatrixFactorization.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public static void Example()
7171
// Mean Absolute Error: 0.67:
7272
// Mean Squared Error: 0.79
7373
// Root Mean Squared Error: 0.89
74-
// RSquared: 0.61 (closer to 1 is better. The worest case is 0)
74+
// RSquared: 0.61 (closer to 1 is better. The worst case is 0)
7575
}
7676

7777
// The following variables are used to define the shape of the example

docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/Recommendation/MatrixFactorization.tt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,5 @@ string ExpectedOutput = @"// Expected output:
2727
// Mean Absolute Error: 0.67:
2828
// Mean Squared Error: 0.79
2929
// Root Mean Squared Error: 0.89
30-
// RSquared: 0.61 (closer to 1 is better. The worest case is 0)";
30+
// RSquared: 0.61 (closer to 1 is better. The worst case is 0)";
3131
#>

docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/Recommendation/MatrixFactorizationWithOptions.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,13 @@ public static void Example()
3434
// Define trainer options.
3535
var options = new MatrixFactorizationTrainer.Options
3636
{
37-
// Specify IDataView colum which stores matrix column indexes.
37+
// Specify IDataView column which stores matrix column indexes.
3838
MatrixColumnIndexColumnName = nameof(MatrixElement.MatrixColumnIndex
3939
),
4040

41-
// Specify IDataView colum which stores matrix row indexes.
41+
// Specify IDataView column which stores matrix row indexes.
4242
MatrixRowIndexColumnName = nameof(MatrixElement.MatrixRowIndex),
43-
// Specify IDataView colum which stores matrix elements' values.
43+
// Specify IDataView column which stores matrix elements' values.
4444
LabelColumnName = nameof(MatrixElement.Value),
4545
// Time of going through the entire data set once.
4646
NumberOfIterations = 10,
@@ -95,7 +95,7 @@ public static void Example()
9595
// Mean Absolute Error: 0.18
9696
// Mean Squared Error: 0.05
9797
// Root Mean Squared Error: 0.23
98-
// RSquared: 0.97 (closer to 1 is better. The worest case is 0)
98+
// RSquared: 0.97 (closer to 1 is better. The worst case is 0)
9999
}
100100

101101
// The following variables are used to define the shape of the example

docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/Recommendation/MatrixFactorizationWithOptions.tt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ string ExtraUsing = "using Microsoft.ML.Trainers;";
1313
string Trainer = "MatrixFactorization";
1414
string TrainerOptions = @"MatrixFactorizationTrainer.Options
1515
{
16-
// Specify IDataView colum which stores matrix column indexes.
16+
// Specify IDataView column which stores matrix column indexes.
1717
MatrixColumnIndexColumnName = nameof(MatrixElement.MatrixColumnIndex
1818
),
1919

20-
// Specify IDataView colum which stores matrix row indexes.
20+
// Specify IDataView column which stores matrix row indexes.
2121
MatrixRowIndexColumnName = nameof(MatrixElement.MatrixRowIndex),
22-
// Specify IDataView colum which stores matrix elements' values.
22+
// Specify IDataView column which stores matrix elements' values.
2323
LabelColumnName = nameof(MatrixElement.Value),
2424
// Time of going through the entire data set once.
2525
NumberOfIterations = 10,
@@ -46,5 +46,5 @@ string ExpectedOutput = @"// Expected output:
4646
// Mean Absolute Error: 0.18
4747
// Mean Squared Error: 0.05
4848
// Root Mean Squared Error: 0.23
49-
// RSquared: 0.97 (closer to 1 is better. The worest case is 0)";
49+
// RSquared: 0.97 (closer to 1 is better. The worst case is 0)";
5050
#>

docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/Regression/FastForest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public static void Example()
6666
// Mean Absolute Error: 0.06
6767
// Mean Squared Error: 0.00
6868
// Root Mean Squared Error: 0.07
69-
// RSquared: 0.96 (closer to 1 is better. The worest case is 0)
69+
// RSquared: 0.96 (closer to 1 is better. The worst case is 0)
7070
}
7171

7272
private static IEnumerable<DataPoint> GenerateRandomDataPoints(int count,

docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/Regression/FastForest.tt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,5 @@ string ExpectedOutput = @"// Expected output:
2424
// Mean Absolute Error: 0.06
2525
// Mean Squared Error: 0.00
2626
// Root Mean Squared Error: 0.07
27-
// RSquared: 0.96 (closer to 1 is better. The worest case is 0)";
27+
// RSquared: 0.96 (closer to 1 is better. The worst case is 0)";
2828
#>

docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/Regression/FastForestWithOptions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public static void Example()
7979
// Mean Absolute Error: 0.06
8080
// Mean Squared Error: 0.01
8181
// Root Mean Squared Error: 0.07
82-
// RSquared: 0.95 (closer to 1 is better. The worest case is 0)
82+
// RSquared: 0.95 (closer to 1 is better. The worst case is 0)
8383
}
8484

8585
private static IEnumerable<DataPoint> GenerateRandomDataPoints(int count,

docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/Regression/FastForestWithOptions.tt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,5 @@ string ExpectedOutput = @"// Expected output:
3131
// Mean Absolute Error: 0.06
3232
// Mean Squared Error: 0.01
3333
// Root Mean Squared Error: 0.07
34-
// RSquared: 0.95 (closer to 1 is better. The worest case is 0)";
34+
// RSquared: 0.95 (closer to 1 is better. The worst case is 0)";
3535
#>

docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/Regression/FastTree.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public static void Example()
6666
// Mean Absolute Error: 0.03
6767
// Mean Squared Error: 0.00
6868
// Root Mean Squared Error: 0.03
69-
// RSquared: 0.99 (closer to 1 is better. The worest case is 0)
69+
// RSquared: 0.99 (closer to 1 is better. The worst case is 0)
7070
}
7171

7272
private static IEnumerable<DataPoint> GenerateRandomDataPoints(int count,

docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/Regression/FastTree.tt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@ string ExpectedOutput = @"// Expected output:
2323
// Mean Absolute Error: 0.03
2424
// Mean Squared Error: 0.00
2525
// Root Mean Squared Error: 0.03
26-
// RSquared: 0.99 (closer to 1 is better. The worest case is 0)";
26+
// RSquared: 0.99 (closer to 1 is better. The worst case is 0)";
2727

2828
#>

docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/Regression/FastTreeTweedie.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public static void Example()
6666
// Mean Absolute Error: 0.04
6767
// Mean Squared Error: 0.00
6868
// Root Mean Squared Error: 0.06
69-
// RSquared: 0.96 (closer to 1 is better. The worest case is 0)
69+
// RSquared: 0.96 (closer to 1 is better. The worst case is 0)
7070
}
7171

7272
private static IEnumerable<DataPoint> GenerateRandomDataPoints(int count,

docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/Regression/FastTreeTweedie.tt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@ string ExpectedOutput = @"// Expected output:
2323
// Mean Absolute Error: 0.04
2424
// Mean Squared Error: 0.00
2525
// Root Mean Squared Error: 0.06
26-
// RSquared: 0.96 (closer to 1 is better. The worest case is 0)";
26+
// RSquared: 0.96 (closer to 1 is better. The worst case is 0)";
2727

2828
#>

0 commit comments

Comments
 (0)