Skip to content

Fix grammatical typos #4853

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Feb 19, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public static void Example()

{
// Note that it is best to get the getters and values *before*
// iteration, so as to faciliate buffer sharing (if applicable),
// iteration, so as to facilitate buffer sharing (if applicable),
// and column-type validation once, rather than many times.
ReadOnlyMemory<char> textValue = default;
VBuffer<ReadOnlyMemory<char>> tokensValue = default;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public static void Example()
);

// Load the TensorFlow model once.
// - Use it for quering the schema for input and output in the
// - Use it for querying the schema for input and output in the
// model
// - Use it for prediction in the pipeline.
// Unfrozen (SavedModel format) models are loaded by providing the
Expand All @@ -78,7 +78,7 @@ public static void Example()
// In this sample, CustomMappingEstimator is used to resize variable
// length vector to fixed length vector.
// The following ML.NET pipeline
// 1. tokenzies the string into words,
// 1. tokenizes the string into words,
// 2. maps each word to an integer which is an index in the
// dictionary ('lookupMap'),
// 3. Resizes the integer vector to a fixed length vector using
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public static void Example()
new DataPoint(){ Features = new float[3] {2, 0, 0} }
};

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public static void Example()
new DataPoint(){ Features = new float[3] {1, 0, 0} }
};

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

Expand Down Expand Up @@ -76,14 +76,14 @@ public static void Example()
i, featuresInText, result.Score);
}
// Lines printed out should be
// The 0 - th example with features[0, 2, 1] isan inlier with a score of being outlier 0.2264826
// The 1 - th example with features[0, 2, 3] isan inlier with a score of being outlier 0.1739471
// The 2 - th example with features[0, 2, 4] isan inlier with a score of being outlier 0.05711612
// The 3 - th example with features[0, 2, 1] isan inlier with a score of being outlier 0.2264826
// The 4 - th example with features[0, 2, 2] isan inlier with a score of being outlier 0.3868995
// The 5 - th example with features[0, 2, 3] isan inlier with a score of being outlier 0.1739471
// The 6 - th example with features[0, 2, 4] isan inlier with a score of being outlier 0.05711612
// The 7 - th example with features[1, 0, 0] isan outlier with a score of being outlier 0.6260795
// The 0 - th example with features[0, 2, 1] is an inlier with a score of being outlier 0.2264826
// The 1 - th example with features[0, 2, 3] is an inlier with a score of being outlier 0.1739471
// The 2 - th example with features[0, 2, 4] is an inlier with a score of being outlier 0.05711612
// The 3 - th example with features[0, 2, 1] is an inlier with a score of being outlier 0.2264826
// The 4 - th example with features[0, 2, 2] is an inlier with a score of being outlier 0.3868995
// The 5 - th example with features[0, 2, 3] is an inlier with a score of being outlier 0.1739471
// The 6 - th example with features[0, 2, 4] is an inlier with a score of being outlier 0.05711612
// The 7 - th example with features[1, 0, 0] is an outlier with a score of being outlier 0.6260795
}

// Example with 3 feature values. A training data set is a collection of
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public static void Example()

var calibratorTransformer = calibratorEstimator.Fit(scoredData);

// Transform the scored data with a calibrator transfomer by adding a
// Transform the scored data with a calibrator transformer by adding a
// new column names "Probability". This column is a calibrated version
// of the "Score" column, meaning its values are a valid probability
// value in the [0, 1] interval representing the chance that the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,11 @@ public static void Example()
}

// Expected output:
// Actual label: True, predicted label: True, score of being positive class: 1.115094, and probability of beling positive class: 0.7530775.
// Actual label: False, predicted label: False, score of being positive class: -3.478797, and probability of beling positive class: 0.02992158.
// Actual label: True, predicted label: True, score of being positive class: 3.191896, and probability of beling positive class: 0.9605282.
// Actual label: False, predicted label: False, score of being positive class: -3.400863, and probability of beling positive class: 0.03226851.
// Actual label: True, predicted label: True, score of being positive class: 4.06056, and probability of beling positive class: 0.9830528.
// Actual label: True, predicted label: True, score of being positive class: 1.115094, and probability of being positive class: 0.7530775.
// Actual label: False, predicted label: False, score of being positive class: -3.478797, and probability of being positive class: 0.02992158.
// Actual label: True, predicted label: True, score of being positive class: 3.191896, and probability of being positive class: 0.9605282.
// Actual label: False, predicted label: False, score of being positive class: -3.400863, and probability of being positive class: 0.03226851.
// Actual label: True, predicted label: True, score of being positive class: 4.06056, and probability of being positive class: 0.9830528.
}

// Number of features per field.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ string TrainerDescription = @"// This trainer trains field-aware factorization (
string TrainerOptions = null;

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

string ExpectedOutput = @"// Expected output:
// Accuracy: 0.99
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,11 @@ public static void Example()
}

// Expected output:
// Actual label: True, predicted label: True, score of being positive class: 1.115094, and probability of beling positive class: 0.7530775.
// Actual label: False, predicted label: False, score of being positive class: -3.478797, and probability of beling positive class: 0.02992158.
// Actual label: True, predicted label: True, score of being positive class: 3.191896, and probability of beling positive class: 0.9605282.
// Actual label: False, predicted label: False, score of being positive class: -3.400863, and probability of beling positive class: 0.03226851.
// Actual label: True, predicted label: True, score of being positive class: 4.06056, and probability of beling positive class: 0.9830528.
// Actual label: True, predicted label: True, score of being positive class: 1.115094, and probability of being positive class: 0.7530775.
// Actual label: False, predicted label: False, score of being positive class: -3.478797, and probability of being positive class: 0.02992158.
// Actual label: True, predicted label: True, score of being positive class: 3.191896, and probability of being positive class: 0.9605282.
// Actual label: False, predicted label: False, score of being positive class: -3.400863, and probability of being positive class: 0.03226851.
// Actual label: True, predicted label: True, score of being positive class: 4.06056, and probability of being positive class: 0.9830528.
}

// Number of features per field.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ string TrainerOptions = @"FieldAwareFactorizationMachineTrainer.Options
}";

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

string ExpectedOutput = @"// Expected output:
// Accuracy: 0.99
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ namespace Samples.Dynamic.Trainers.BinaryClassification
[VectorType(featureLength)]
public float[] Field1 { get; set; }

// Features from the thrid field.
// Features from the third field.
[VectorType(featureLength)]
public float[] Field2 { get; set; }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ public class InMemoryImageData
public string Label;
}

// ImageData class holding the imagepath and label.
// ImageData class holding the image path and label.
public class ImageData
{
[LoadColumn(0)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public static void Example()

// Now let's look at which features are most important to the model
// overall. Get the feature indices sorted by their impact on
// microaccuracy.
// micro-accuracy.
var sortedIndices = permutationMetrics
.Select((metrics, index) => new { index, metrics.MicroAccuracy })
.OrderByDescending(feature => Math.Abs(feature.MicroAccuracy.Mean))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public static void Example()
// Mean Absolute Error: 0.67:
// Mean Squared Error: 0.79
// Root Mean Squared Error: 0.89
// RSquared: 0.61 (closer to 1 is better. The worest case is 0)
// RSquared: 0.61 (closer to 1 is better. The worst case is 0)
}

// The following variables are used to define the shape of the example
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ string ExpectedOutput = @"// Expected output:
// Mean Absolute Error: 0.67:
// Mean Squared Error: 0.79
// Root Mean Squared Error: 0.89
// RSquared: 0.61 (closer to 1 is better. The worest case is 0)";
// RSquared: 0.61 (closer to 1 is better. The worst case is 0)";
#>
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ public static void Example()
// Define trainer options.
var options = new MatrixFactorizationTrainer.Options
{
// Specify IDataView colum which stores matrix column indexes.
// Specify IDataView column which stores matrix column indexes.
MatrixColumnIndexColumnName = nameof(MatrixElement.MatrixColumnIndex
),

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

// The following variables are used to define the shape of the example
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ string ExtraUsing = "using Microsoft.ML.Trainers;";
string Trainer = "MatrixFactorization";
string TrainerOptions = @"MatrixFactorizationTrainer.Options
{
// Specify IDataView colum which stores matrix column indexes.
// Specify IDataView column which stores matrix column indexes.
MatrixColumnIndexColumnName = nameof(MatrixElement.MatrixColumnIndex
),

// Specify IDataView colum which stores matrix row indexes.
// Specify IDataView column which stores matrix row indexes.
MatrixRowIndexColumnName = nameof(MatrixElement.MatrixRowIndex),
// Specify IDataView colum which stores matrix elements' values.
// Specify IDataView column which stores matrix elements' values.
LabelColumnName = nameof(MatrixElement.Value),
// Time of going through the entire data set once.
NumberOfIterations = 10,
Expand All @@ -46,5 +46,5 @@ string ExpectedOutput = @"// Expected output:
// Mean Absolute Error: 0.18
// Mean Squared Error: 0.05
// Root Mean Squared Error: 0.23
// RSquared: 0.97 (closer to 1 is better. The worest case is 0)";
// RSquared: 0.97 (closer to 1 is better. The worst case is 0)";
#>
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public static void Example()
// Mean Absolute Error: 0.06
// Mean Squared Error: 0.00
// Root Mean Squared Error: 0.07
// RSquared: 0.96 (closer to 1 is better. The worest case is 0)
// RSquared: 0.96 (closer to 1 is better. The worst case is 0)
}

private static IEnumerable<DataPoint> GenerateRandomDataPoints(int count,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ string ExpectedOutput = @"// Expected output:
// Mean Absolute Error: 0.06
// Mean Squared Error: 0.00
// Root Mean Squared Error: 0.07
// RSquared: 0.96 (closer to 1 is better. The worest case is 0)";
// RSquared: 0.96 (closer to 1 is better. The worst case is 0)";
#>
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public static void Example()
// Mean Absolute Error: 0.06
// Mean Squared Error: 0.01
// Root Mean Squared Error: 0.07
// RSquared: 0.95 (closer to 1 is better. The worest case is 0)
// RSquared: 0.95 (closer to 1 is better. The worst case is 0)
}

private static IEnumerable<DataPoint> GenerateRandomDataPoints(int count,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@ string ExpectedOutput = @"// Expected output:
// Mean Absolute Error: 0.06
// Mean Squared Error: 0.01
// Root Mean Squared Error: 0.07
// RSquared: 0.95 (closer to 1 is better. The worest case is 0)";
// RSquared: 0.95 (closer to 1 is better. The worst case is 0)";
#>
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public static void Example()
// Mean Absolute Error: 0.03
// Mean Squared Error: 0.00
// Root Mean Squared Error: 0.03
// RSquared: 0.99 (closer to 1 is better. The worest case is 0)
// RSquared: 0.99 (closer to 1 is better. The worst case is 0)
}

private static IEnumerable<DataPoint> GenerateRandomDataPoints(int count,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ string ExpectedOutput = @"// Expected output:
// Mean Absolute Error: 0.03
// Mean Squared Error: 0.00
// Root Mean Squared Error: 0.03
// RSquared: 0.99 (closer to 1 is better. The worest case is 0)";
// RSquared: 0.99 (closer to 1 is better. The worst case is 0)";

#>
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public static void Example()
// Mean Absolute Error: 0.04
// Mean Squared Error: 0.00
// Root Mean Squared Error: 0.06
// RSquared: 0.96 (closer to 1 is better. The worest case is 0)
// RSquared: 0.96 (closer to 1 is better. The worst case is 0)
}

private static IEnumerable<DataPoint> GenerateRandomDataPoints(int count,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ string ExpectedOutput = @"// Expected output:
// Mean Absolute Error: 0.04
// Mean Squared Error: 0.00
// Root Mean Squared Error: 0.06
// RSquared: 0.96 (closer to 1 is better. The worest case is 0)";
// RSquared: 0.96 (closer to 1 is better. The worst case is 0)";

#>
Loading