Skip to content

Commit 65c3c7c

Browse files
mairawjustinormont
authored andcommitted
replace "e.g." with "for example" (#1016)
* replace e.g. with for example * feedback * feedback * undo release notes changes
1 parent 41982ff commit 65c3c7c

File tree

102 files changed

+163
-163
lines changed

Some content is hidden

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

102 files changed

+163
-163
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ ML.NET allows .NET developers to develop their own models and infuse custom ML i
88

99
ML.NET was originally developed in Microsoft Research and evolved into a significant framework over the last decade and is used across many product groups in Microsoft like Windows, Bing, PowerPoint, Excel and more.
1010

11-
With this first preview release, ML.NET enables ML tasks like classification (e.g. support text classification, sentiment analysis) and regression (e.g. price-prediction).
11+
With this first preview release, ML.NET enables ML tasks like classification (for example, support text classification, sentiment analysis) and regression (for example, price-prediction).
1212

1313
Along with these ML capabilities, this first release of ML.NET also brings the first draft of .NET APIs for training models, using models for predictions, as well as the core components of this framework such as learning algorithms, transforms, and ML data structures.
1414

docs/building/unix-instructions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ The following components are needed:
2828
* curl
2929
* All the requirements necessary to run .NET Core 2.0 applications: libssl1.0.0 (1.0.2 for Debian 9) and libicu5x (libicu52 for ubuntu 14.x, libicu55 for ubuntu 16.x, and libicu57 for ubuntu 17.x). For more information on prerequisites in different linux distributions click [here](https://docs.microsoft.com/en-us/dotnet/core/linux-prerequisites?tabs=netcore2x).
3030

31-
e.g. for Ubuntu 16.x:
31+
For example, for Ubuntu 16.x:
3232

3333
```sh
3434
sudo apt-get update

docs/code/IDataViewDesignPrinciples.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@ the random number generator. Serving rows from disk in a random order is quite
415415
difficult to do efficiently (without seeking for each row). The binary .idv
416416
loader has some shuffling support, favoring performance over attempting to
417417
provide a uniform distribution over the permutation space. This level of
418-
support has been validated to be sufficient for machine learning goals (e.g.,
418+
support has been validated to be sufficient for machine learning goals (for example,
419419
in recent work on SA-SDCA algorithm). When the data is all in memory, as it is
420420
when cached, randomizing is trivial.
421421

docs/code/IDataViewImplementation.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ ultimately limited by hardware and other runtime environment factors: the
327327
truth is, certain machines will, with identical programs with seemingly
328328
identical flows of execution result, *sometimes*, in subtly different answers
329329
where floating point values are concerned. Even on the same machine there are
330-
runtime considerations, e.g., when .NET's RyuJIT was introduced in VS2015, we
330+
runtime considerations, for example, when .NET's RyuJIT was introduced in VS2015, we
331331
had lots of test failures around our model consistency tests because the JIT
332332
was compiling the CLI just *slightly* differently. But, this sort of thing
333333
aside (which we can hardly help), we expect the models to be the same.
@@ -337,13 +337,13 @@ aside (which we can hardly help), we expect the models to be the same.
337337
When you create a loader you have the option of specifying not only *one* data
338338
input, but any number of data input files, including zero. But there's also a
339339
more general principle at work here with zero files: when deserializing a data
340-
loader from a data model with an `IMultiStreamSource` with `Count == 0` (e.g.,
340+
loader from a data model with an `IMultiStreamSource` with `Count == 0` (for example,
341341
as would be constructed with `new MultiFileSource(null)`), we have a protocol
342342
that *every* `IDataLoader` should work in that circumstance, and merely be a
343343
data view with no rows, but the same schema as it had when it was serialized.
344344
The purpose of this is that we often have circumstances where we need to
345345
understand the schema of the data (what columns were produced, what the
346-
feature names are, etc.) when all we have is the data model. (E.g., the
346+
feature names are, etc.) when all we have is the data model. (For example, the
347347
`savemodel` command, and other things.)
348348

349349
# Getters Must Fail for Invalid Types
@@ -403,7 +403,7 @@ over an `IDataView`: while cursoring, you should almost certainly not throw
403403
exceptions.
404404

405405
Imagine you have a `TextLoader`. You might expect that if you have a parse
406-
error, e.g., you have a column of floats, and one of the rows has a value
406+
error, for example, you have a column of floats, and one of the rows has a value
407407
like, `"hi!"` or something otherwise uninterpretable, you would throw. Yet,
408408
consider the implications of lazy evaluation. If that column were not
409409
selected, the cursoring would *succeed*, because it would not look at that
@@ -425,7 +425,7 @@ could throw the exception requires that a certain column be made active, then
425425
you should not throw. Of course, there are extreme circumstances: for example,
426426
one cannot help but throw on a cursoring if, say, there is some weird system
427427
event, and if one somehow detects in a subsequent iteration that something is
428-
fundamentally broken then you can throw: e.g., the binary loader will throw if
428+
fundamentally broken then you can throw: for example, the binary loader will throw if
429429
it detects the file it is reading is corrupted, even if that corruption may
430430
not have been obvious immediately.
431431

docs/code/IDataViewTypeSystem.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,8 +242,8 @@ For example:
242242

243243
* A column produced by a scorer may have several pieces of associated
244244
metadata, indicating the "scoring column group id" that it belongs to, what
245-
kind of scorer produced the column (e.g., binary classification), and the
246-
precise semantics of the column (e.g., predicted label, raw score,
245+
kind of scorer produced the column (for example, binary classification), and the
246+
precise semantics of the column (for example, predicted label, raw score,
247247
probability).
248248

249249
The `ISchema` interface, including the metadata API, is fully specified in

docs/code/IdvFileFormat.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ to a particular within a block.)
2121

2222
Before we discuss the format itself we will establish some conventions on how
2323
individual scalar values, strings, and other data is serialized. All basic
24-
pieces of data (e.g., a single number, or a single string) are encoded in ways
24+
pieces of data (for example, a single number, or a single string) are encoded in ways
2525
reflecting the semantics of the .NET `BinaryWriter` class, those semantics
2626
being:
2727

docs/code/VBufferCareFeeding.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ inclusive and `Length` exclusive.
4444
Regarding the generic type parameter `T`, the only real assumption made about
4545
this type is that assignment (that is, using `=`) is sufficient to create an
4646
*independent* copy of that item. All representation types of the [primitive
47-
types](IDataViewTypeSystem.md#standard-column-types) have this property (e.g.,
47+
types](IDataViewTypeSystem.md#standard-column-types) have this property (for example,
4848
`DvText`, `DvInt4`, `Single`, `Double`, etc.), but for example, `VBuffer<>`
4949
itself does not have this property. So, no `VBuffer` of `VBuffer`s for you.
5050

@@ -257,7 +257,7 @@ In terms of accessing anything in `Values` or `Indices`, remember, treat
257257
arrays.
258258

259259
If you write code that results in two distinct `VBuffer`s sharing references
260-
to their internal arrays, (e.g., there are two `VBuffer`s `a` and `b`, with
260+
to their internal arrays, (for example, there are two `VBuffer`s `a` and `b`, with
261261
`a.Indices == b.Indices` with `a.Indices != null`, or `a.Values == b.Values`
262262
with `a.Values != null`) then you've almost certainly done something wrong.
263263

docs/project-docs/contributing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Pull Requests
1616
-------------
1717

1818
* **DO** submit all code changes via pull requests (PRs) rather than through a direct commit. PRs will be reviewed and potentially merged by the repo maintainers after a peer review that includes at least one maintainer.
19-
* **DO** give PRs short-but-descriptive names (e.g. "Improve code coverage for System.Console by 10%", not "Fix #1234")
19+
* **DO** give PRs short-but-descriptive names (for example, "Improve code coverage for System.Console by 10%", not "Fix #1234")
2020
* **DO** refer to any relevant issues, and include [keywords](https://help.github.com/articles/closing-issues-via-commit-messages/) that automatically close issues when the PR is merged.
2121
* **DO** tag any users that should know about and/or review the change.
2222
* **DO** ensure each commit successfully builds. The entire PR must pass all tests in the Continuous Integration (CI) system before it'll be merged.

docs/specs/mvp.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ public partial class HousePricePrediction
118118
that decision.
119119

120120
* The model should be immutable. We'll offer a conversion API to go from the
121-
model to the building block for training, e.g. `ToPipeline()`.
121+
model to the building block for training, for example, `ToPipeline()`.
122122

123123
* The persisted `model.zip` has no notion of .NET types. It only has schema
124124
information. Strong typing requires the developer to specify the types when

src/Microsoft.ML.Analyzer/TypeIsSchemaShapeAnalyzer.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ internal static class ShapeDiagnostic
2323
private const string Format = "Type{0} is neither a PipelineColumn nor a ValueTuple, nor a class of an allowed form.";
2424
internal const string Description =
2525
"Within statically typed pipeline elements of ML.NET, the shape of the schema is determined by a 'shape' type. " +
26-
"A valid 'shape' type is either an instance of one of the PipelineColumn subclasses (e.g., Scalar<bool> " +
26+
"A valid 'shape' type is either an instance of one of the PipelineColumn subclasses (for example, Scalar<bool> " +
2727
"or something like that), or a ValueTuple containing only valid 'shape' types, or a class whose only publicly " +
2828
"accessible members are methods, a single constructor, and properties that are valid 'shape' types themselves, " +
2929
"and that have either get and set accessors and the single constructor takes no parameters, or that has get only " +
@@ -44,7 +44,7 @@ internal static class ShapeParameterDiagnostic
4444
internal const string Description = ShapeDiagnostic.Description + " " +
4545
"If using type parameters when interacting with the statically typed pipelines, the type parameter ought to be " +
4646
"constrained in such a way that it, either by applying the [IsShape] attribute or by having type constraints to " +
47-
"indicate that it is valid, e.g., constraining the type to descend from PipelineColumn.";
47+
"indicate that it is valid, for example, constraining the type to descend from PipelineColumn.";
4848

4949
internal static DiagnosticDescriptor Rule =
5050
new DiagnosticDescriptor(Id, Title, Format, Category,

src/Microsoft.ML.Api/ComponentCreation.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ public static IDataTransform CreateTransform(this IHostEnvironment env, string s
317317
/// <param name="data">The data to score.</param>
318318
/// <param name="predictor">The predictor to score.</param>
319319
/// <param name="trainSchema">The training data schema from which the scorer can optionally extract
320-
/// additional information, e.g., label names. If this is <c>null</c>, no information will be
320+
/// additional information, for example, label names. If this is <c>null</c>, no information will be
321321
/// extracted.</param>
322322
/// <returns>The scored data.</returns>
323323
public static IDataScorerTransform CreateScorer(this IHostEnvironment env, string settings,
@@ -348,7 +348,7 @@ public static IDataScorerTransform CreateScorer(this IHostEnvironment env, strin
348348
/// <param name="data">The data to score.</param>
349349
/// <param name="predictor">The predictor to score.</param>
350350
/// <param name="trainSchema">The training data schema from which the scorer can optionally extract
351-
/// additional information, e.g., label names. If this is <c>null</c>, no information will be
351+
/// additional information, for example, label names. If this is <c>null</c>, no information will be
352352
/// extracted.</param>
353353
/// <returns>The scored data.</returns>
354354
public static IDataScorerTransform CreateDefaultScorer(this IHostEnvironment env, RoleMappedData data,

src/Microsoft.ML.Core/Data/ICursor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public interface ICounted
4040

4141
/// <summary>
4242
/// A getter for a 128-bit ID value. It is common for objects to serve multiple <see cref="ICounted"/>
43-
/// instances to iterate over what is supposed to be the same data, e.g., in a <see cref="IDataView"/>
43+
/// instances to iterate over what is supposed to be the same data, for example, in a <see cref="IDataView"/>
4444
/// a cursor set will produce the same data as a serial cursor, just partitioned, and a shuffled cursor
4545
/// will produce the same data as a serial cursor or any other shuffled cursor, only shuffled. The ID
4646
/// exists for applications that need to reconcile which entry is actually which. Ideally this ID should

src/Microsoft.ML.Core/Data/ICursor.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ they not throw, return `true`, or have any other behavior.
6565
This treats on the requirements of a proper `GetIdGetter` implementation.
6666

6767
It is common for objects to serve multiple `ICounted` instances to iterate
68-
over what is supposed to be the same data, e.g., in an `IDataView` a cursor
68+
over what is supposed to be the same data, for example, in an `IDataView` a cursor
6969
set will produce the same data as a serial cursor, just partitioned, and a
7070
shuffled cursor will produce the same data as a serial cursor or any other
7171
shuffled cursor, only shuffled. The ID exists for applications that need to
@@ -92,7 +92,7 @@ transformed, cached, saved, or whatever), that the IDs between the two
9292
different data views would have any discernable relationship.
9393

9494
Since this ID is practically often derived from the IDs of some other
95-
`ICounted` (e.g., for a transform, the IDs of the output are usually derived
95+
`ICounted` (for example, for a transform, the IDs of the output are usually derived
9696
from the IDs of the input), it is not only necessary to claim that the ID
9797
generated here is probabilistically unique, but also describe a procedure or
9898
set of guidelines implementors of this method should attempt to follow, in
@@ -163,10 +163,10 @@ never arise that the same ID is hashed against the same data, and are
163163
introduced as if we expect them to be two separate IDs.
164164

165165
Of course, with a malicious actor upstream, collisions are possible and can be
166-
engineered quite trivially (e.g., just by returning a constant ID for all
166+
engineered quite trivially (for example, just by returning a constant ID for all
167167
rows), but we're not supposing that the input `IDataView` is maliciously
168168
engineering hash states, or applying the operations above in any strange way
169-
to attempt to induce collisions. E.g., you could take, operation 1, define it
169+
to attempt to induce collisions. For example, you could take, operation 1, define it
170170
to be the enumeration of all `UInt128` values, then take operation 2 to select
171171
out specifically those that are hash states that will result in collisions.
172172
But I'm supposing this is not happening. If you are running an implementation

src/Microsoft.ML.Core/Data/IHostEnvironment.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ public interface IChannel : IPipe<ChannelMessage>
219219
/// <summary>
220220
/// General utility extension methods for objects in the "host" universe, i.e.,
221221
/// <see cref="IHostEnvironment"/>, <see cref="IHost"/>, and <see cref="IChannel"/>
222-
/// that do not belong in more specific areas, e.g., <see cref="Contracts"/> or
222+
/// that do not belong in more specific areas, for example, <see cref="Contracts"/> or
223223
/// component creation.
224224
/// </summary>
225225
public static class HostExtensions

src/Microsoft.ML.Core/Data/IProgressChannel.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ public sealed class ProgressHeader
9797
/// <param name="unitNames">The names of the progress units, listed from least granular to most granular.
9898
/// The idea is that the progress should be lexicographically increasing (like [0,0], [0,10], [1,0], [1,15], [2,5] etc.).
9999
/// As naming convention, <paramref name="unitNames"/> should be lower-cased and typically plural
100-
/// (e.g. iterations, clusters, examples). </param>
100+
/// (for example, iterations, clusters, examples). </param>
101101
public ProgressHeader(string[] metricNames, string[] unitNames)
102102
{
103103
Contracts.CheckValueOrNull(unitNames);
@@ -109,7 +109,7 @@ public ProgressHeader(string[] metricNames, string[] unitNames)
109109

110110
/// <summary>
111111
/// A constructor for no metrics, just progress units. As naming convention, <paramref name="unitNames"/> should be lower-cased
112-
/// and typically plural (e.g. iterations, clusters, examples).
112+
/// and typically plural (for example, iterations, clusters, examples).
113113
/// </summary>
114114
public ProgressHeader(params string[] unitNames)
115115
: this(null, unitNames)

src/Microsoft.ML.Core/Data/ISchemaBindableMapper.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ public interface IRowToRowMapper : ISchematized
9393
/// The optional <paramref name="disposer"/> should be invoked by any user of this row mapping, once it no
9494
/// longer needs the <see cref="IRow"/>. If no action is needed when the cursor is Disposed, the implementation
9595
/// should set <paramref name="disposer"/> to <c>null</c>, otherwise it should be set to a delegate to be
96-
/// invoked by the code calling this object. (E.g., a wrapping cursor's <see cref="IDisposable.Dispose"/>
96+
/// invoked by the code calling this object. (For example, a wrapping cursor's <see cref="IDisposable.Dispose"/>
9797
/// method. It's best for this action to be idempotent - calling it multiple times should be equivalent to
9898
/// calling it once.
9999
/// </summary>

src/Microsoft.ML.Core/Data/MetadataUtils.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,13 @@ public static class Kinds
4242
public const string ScoreColumnSetId = "ScoreColumnSetId";
4343

4444
/// <summary>
45-
/// Metadata kind that indicates the prediction kind as a string. E.g. "BinaryClassification".
45+
/// Metadata kind that indicates the prediction kind as a string. For example, "BinaryClassification".
4646
/// The value is typically a ReadOnlyMemory&lt;char&gt;.
4747
/// </summary>
4848
public const string ScoreColumnKind = "ScoreColumnKind";
4949

5050
/// <summary>
51-
/// Metadata kind that indicates the value kind of the score column as a string. E.g. "Score", "PredictedLabel", "Probability". The value is typically a ReadOnlyMemory.
51+
/// Metadata kind that indicates the value kind of the score column as a string. For example, "Score", "PredictedLabel", "Probability". The value is typically a ReadOnlyMemory.
5252
/// </summary>
5353
public const string ScoreValueKind = "ScoreValueKind";
5454

src/Microsoft.ML.Core/Data/RoleMappedSchema.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public static ColumnInfo CreateFromIndex(ISchema schema, int index)
7979
/// individually configured). Also, by being a one-to-many mapping, it is a way for learners that can consume
8080
/// multiple features columns to consume that information.
8181
///
82-
/// This class has convenience fields for several common column roles (se.g., <see cref="Feature"/>, <see
82+
/// This class has convenience fields for several common column roles (for example, <see cref="Feature"/>, <see
8383
/// cref="Label"/>), but can hold an arbitrary set of column infos. The convenience fields are non-null if and only
8484
/// if there is a unique column with the corresponding role. When there are no such columns or more than one such
8585
/// column, the field is <c>null</c>. The <see cref="Has"/>, <see cref="HasUnique"/>, and <see cref="HasMultiple"/>
@@ -110,7 +110,7 @@ public sealed class RoleMappedSchema
110110

111111
/// <summary>
112112
/// Instances of this are the keys of a <see cref="RoleMappedSchema"/>. This class also holds some important
113-
/// commonly used pre-defined instances available (e.g., <see cref="Label"/>, <see cref="Feature"/>) that should
113+
/// commonly used pre-defined instances available (for example, <see cref="Label"/>, <see cref="Feature"/>) that should
114114
/// be used when possible for consistency reasons. However, practitioners should not be afraid to declare custom
115115
/// roles if approppriate for their task.
116116
/// </summary>

0 commit comments

Comments
 (0)