Skip to content

Commit

Permalink
Typo corrections (#4885)
Browse files Browse the repository at this point in the history
* Typo corrections

* Correct misspelled variable 'supressScoresAndLabels` and updated test as a result of spelling corrections

* Update core_manifest.json

* Update Utils.cs
  • Loading branch information
mstfbl authored Feb 26, 2020
1 parent f379b07 commit d849ba4
Show file tree
Hide file tree
Showing 149 changed files with 282 additions and 282 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public sealed class TrainResult<TMetrics>
/// <see langword="null"/> if no exception was encountered.
/// </summary>
/// <remarks>
/// If an exception occurred, it's possible some properties in ths object
/// If an exception occurred, it's possible some properties in this object
/// (like <see cref="Model"/>) could be <see langword="null"/>.
/// </remarks>
public Exception Exception { get; private set; }
Expand Down
2 changes: 1 addition & 1 deletion src/Microsoft.ML.AutoML/API/RunDetails/RunDetail.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public sealed class RunDetail<TMetrics> : RunDetail
/// no exception was encountered.
/// </summary>
/// <remarks>
/// If an exception occurred, it's possible some properties in ths object
/// If an exception occurred, it's possible some properties in this object
/// (like <see cref="Model"/>) could be <see langword="null"/>.
/// </remarks>
public Exception Exception { get; private set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
namespace Microsoft.ML.AutoML
{
/// <summary>
/// This class incapsulates logic for grouping together the inferred columns of the text file based on their type
/// This class encapsulates logic for grouping together the inferred columns of the text file based on their type
/// and purpose, and generating column names.
/// </summary>
internal static class ColumnGroupingInference
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
namespace Microsoft.ML.AutoML
{
/// <summary>
/// This class incapsulates logic for automatic inference of column types for the text file.
/// This class encapsulates logic for automatic inference of column types for the text file.
/// It also attempts to guess whether there is a header row.
/// </summary>
internal static class ColumnTypeInference
Expand Down
2 changes: 1 addition & 1 deletion src/Microsoft.ML.AutoML/ColumnInference/TextFileSample.cs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public static TextFileSample CreateFromFullStream(Stream stream)
var lineCount = firstChunk.Count(x => x == '\n');
if (lineCount == 0)
{
throw new ArgumentException("Counldn't identify line breaks. Provided file is not text?");
throw new ArgumentException("Couldn't identify line breaks. Provided file is not text?");
}

long approximateRowCount = (long)(lineCount * fileSize * 1.0 / firstChunk.Length);
Expand Down
2 changes: 1 addition & 1 deletion src/Microsoft.ML.AutoML/Experiment/SuggestedPipeline.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace Microsoft.ML.AutoML
{
/// <summary>
/// A runnable pipeline. Contains a learner and set of transforms,
/// along with a RunSummary if it has already been exectued.
/// along with a RunSummary if it has already been executed.
/// </summary>
internal class SuggestedPipeline
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public static SuggestedPipeline GetNextInferredPipeline(MLContext context,
// sort top trainers by # of times they've been run, from lowest to highest
var orderedTopTrainers = OrderTrainersByNumTrials(history, topTrainers);

// keep as hashset of previously visited pipelines
// keep as hash set of previously visited pipelines
var visitedPipelines = new HashSet<SuggestedPipeline>(history.Select(h => h.Pipeline));

// iterate over top trainers (from least run to most run),
Expand Down Expand Up @@ -186,7 +186,7 @@ private static IValueGenerator[] ConvertToValueGenerators(IEnumerable<SweepableP

/// <summary>
/// Samples new hyperparameters for the trainer, and sets them.
/// Returns true if success (new hyperparams were suggested and set). Else, returns false.
/// Returns true if success (new hyperparameters were suggested and set). Else, returns false.
/// </summary>
private static bool SampleHyperparameters(MLContext context, SuggestedTrainer trainer, IEnumerable<SuggestedPipelineRunDetail> history, bool isMaximizingMetric)
{
Expand All @@ -207,7 +207,7 @@ private static bool SampleHyperparameters(MLContext context, SuggestedTrainer tr
return false;
}

// associate proposed param set with trainer, so that smart hyperparam
// associate proposed parameter set with trainer, so that smart hyperparameter
// sweepers (like KDO) can map them back.
trainer.SetHyperparamValues(proposedParamSet);

Expand Down
2 changes: 1 addition & 1 deletion src/Microsoft.ML.AutoML/Sweepers/Parameters.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ internal abstract class BaseParamArguments

internal abstract class NumericParamArguments : BaseParamArguments
{
// Number of steps for grid runthrough.
// Number of steps for grid run-through.
public int NumSteps;

// Amount of increment between steps (multiplicative if log).
Expand Down
10 changes: 5 additions & 5 deletions src/Microsoft.ML.AutoML/Sweepers/SmacSweeper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
namespace Microsoft.ML.AutoML
{
//REVIEW: Figure out better way to do this. could introduce a base class for all smart sweepers,
//encapsulating common functionality. This seems like a good plan to persue.
//encapsulating common functionality. This seems like a good plan to pursue.
internal sealed class SmacSweeper : ISweeper
{
public sealed class Arguments
Expand Down Expand Up @@ -140,12 +140,12 @@ private FastForestRegressionModelParameters FitModel(IEnumerable<IRunResult> pre

/// <summary>
/// Generates a set of candidate configurations to sweep through, based on a combination of random and local
/// search, as outlined in Hutter et al - Sequential Model-Based Optimization for General Algorithm Configuration.
/// search, as outlined in Hutter et al. - Sequential Model-Based Optimization for General Algorithm Configuration.
/// Makes use of class private members which determine how many candidates are returned. This number will include
/// random configurations interleaved (per the paper), and thus will be double the specified value.
/// </summary>
/// <param name="numOfCandidates">Number of candidate solutions to return.</param>
/// <param name="previousRuns">History of previously evaluated points, with their emprical performance values.</param>
/// <param name="previousRuns">History of previously evaluated points, with their empirical performance values.</param>
/// <param name="forest">Trained random forest ensemble. Used in evaluating the candidates.</param>
/// <returns>An array of ParamaterSets which are the candidate configurations to sweep.</returns>
private ParameterSet[] GenerateCandidateConfigurations(int numOfCandidates, IEnumerable<IRunResult> previousRuns, FastForestRegressionModelParameters forest)
Expand Down Expand Up @@ -251,8 +251,8 @@ private Tuple<double, ParameterSet> LocalSearch(ParameterSet parent, FastForestR
}

/// <summary>
/// Computes a single-mutation neighborhood (one param at a time) for a given configuration. For
/// numeric parameters, samples K mutations (i.e., creates K neighbors based on that paramater).
/// Computes a single-mutation neighborhood (one parameter at a time) for a given configuration. For
/// numeric parameters, samples K mutations (i.e., creates K neighbors based on that parameter).
/// </summary>
/// <param name="parent">Starting configuration.</param>
/// <returns>A set of configurations that each differ from parent in exactly one parameter.</returns>
Expand Down
4 changes: 2 additions & 2 deletions src/Microsoft.ML.AutoML/Utils/UserInputValidationUtil.cs
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ private static void ValidateValidationData(IDataView trainData, IDataView valida

// Validate that every active column in the train data corresponds to an active column in the validation data.
// (Indirectly, since we asserted above that the train and validation data have the same number of active columns, this also
// esnures the reverse -- that every active column in the validation data corresponds to an active column in the train data.)
// ensures the reverse -- that every active column in the validation data corresponds to an active column in the train data.)
foreach (var trainCol in trainData.Schema)
{
if (trainCol.IsHidden)
Expand All @@ -202,7 +202,7 @@ private static void ValidateValidationData(IDataView trainData, IDataView valida
var validCol = validationData.Schema.GetColumnOrNull(trainCol.Name);
if (validCol == null)
{
throw new ArgumentException($"{schemaMismatchError} Column '{trainCol.Name}' exsits in train data, but not in validation data.", nameof(validationData));
throw new ArgumentException($"{schemaMismatchError} Column '{trainCol.Name}' exists in train data, but not in validation data.", nameof(validationData));
}

if (trainCol.Type != validCol.Value.Type)
Expand Down
2 changes: 1 addition & 1 deletion src/Microsoft.ML.Core/BestFriendAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace Microsoft.ML
/// Intended to be applied to types and members with internal scope to indicate that friend access of this
/// internal item is OK from another assembly. This restriction applies only to assemblies that declare the
/// <see cref="WantsToBeBestFriendsAttribute"/> assembly level attribute. Note that this attribute is not
/// transferrable: an internal member with this attribute does not somehow make a containing internal type
/// transferable: an internal member with this attribute does not somehow make a containing internal type
/// accessible. Conversely, neither does marking an internal type make any unmarked internal members accessible.
/// </summary>
[BestFriend]
Expand Down
2 changes: 1 addition & 1 deletion src/Microsoft.ML.Core/CommandLine/ArgumentType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ internal enum ArgumentType
Unique = 0x02,

/// <summary>
/// Inidicates that the argument may be specified more than once.
/// Indicates that the argument may be specified more than once.
/// Only valid if the argument is a collection
/// </summary>
Multiple = 0x04,
Expand Down
2 changes: 1 addition & 1 deletion src/Microsoft.ML.Core/CommandLine/CmdLexer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ private void GatherSlash(StringBuilder bldr, bool reduce)
while (_curs.ChNext() == '\\')
cv++;

// This assumes that slash is escaped iff it preceeds a special character
// This assumes that slash is escaped iff it precedes a special character
switch (_curs.ChCur)
{
case '"':
Expand Down
22 changes: 11 additions & 11 deletions src/Microsoft.ML.Core/CommandLine/CmdParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ internal interface ICommandLineComponentFactory : IComponentFactory
// }
// }
//
// So you could call this aplication with the following command line to count
// So you could call this application with the following command line to count
// lines in the foo and bar files:
//
// wc.exe /lines /files:foo /files:bar
Expand All @@ -115,14 +115,14 @@ internal interface ICommandLineComponentFactory : IComponentFactory
// @<file> Read response file for more options
//
// That was pretty easy. However, you really want to omit the "/files:" for the
// list of files. The details of field parsing can be controled using custom
// attributes. The attributes which control parsing behaviour are:
// list of files. The details of field parsing can be controlled using custom
// attributes. The attributes which control parsing behavior are:
//
// ArgumentAttribute
// - controls short name, long name, required, allow duplicates, default value
// and help text
// DefaultArgumentAttribute
// - allows omition of the "/name".
// - allows omission of the "/name".
// - This attribute is allowed on only one field in the argument class.
//
// So for the wc.exe program we want this:
Expand Down Expand Up @@ -180,7 +180,7 @@ internal interface ICommandLineComponentFactory : IComponentFactory
/// <summary>
/// Parser for command line arguments.
///
/// The parser specification is infered from the instance fields of the object
/// The parser specification is inferred from the instance fields of the object
/// specified as the destination of the parse.
/// Valid argument types are: int, uint, string, bool, enums
/// Also argument types of Array of the above types are also valid.
Expand Down Expand Up @@ -209,9 +209,9 @@ internal sealed class CmdParser
private readonly IHost _host;

/// <summary>
/// Parses a command line. This assumes that the exe name has been stripped off.
/// Parses a command line. This assumes that the .exe name has been stripped off.
/// Errors are output on Console.Error.
/// Use ArgumentAttributes to control parsing behaviour.
/// Use ArgumentAttributes to control parsing behavior.
/// </summary>
/// <param name="env"> The host environment</param>
/// <param name="settings">The command line</param>
Expand All @@ -223,8 +223,8 @@ public static bool ParseArguments(IHostEnvironment env, string settings, object
}

/// <summary>
/// Parses a command line. This assumes that the exe name has been stripped off.
/// Use ArgumentAttributes to control parsing behaviour.
/// Parses a command line. This assumes that the .exe name has been stripped off.
/// Use ArgumentAttributes to control parsing behavior.
/// </summary>
/// <param name="env"> The host environment</param>
/// <param name="settings">The command line</param>
Expand Down Expand Up @@ -268,7 +268,7 @@ private static bool ParseArguments(string settings, object destination, CmdParse

/// <summary>
/// Parses a command line. This assumes that the exe name has been stripped off.
/// Use ArgumentAttributes to control parsing behaviour.
/// Use ArgumentAttributes to control parsing behavior.
/// </summary>
/// <param name="env"> The host environment</param>
/// <param name="settings">The command line</param>
Expand Down Expand Up @@ -403,7 +403,7 @@ private void Report(string fmt, params object[] args)

/// <summary>
/// Returns a Usage string for command line argument parsing.
/// Use ArgumentAttributes to control parsing behaviour.
/// Use ArgumentAttributes to control parsing behavior.
/// </summary>
/// <param name="env"> The host environment. </param>
/// <param name="type"> The type of the arguments to display usage for. </param>
Expand Down
12 changes: 6 additions & 6 deletions src/Microsoft.ML.Core/ComponentModel/ComponentCatalog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ internal enum AccessModifier
}

/// <summary>
/// This catalogs instantiatable components (aka, loadable classes). Components are registered via
/// This catalogs instantiable components (aka, loadable classes). Components are registered via
/// a descendant of <see cref="LoadableClassAttributeBase"/>, identifying the names and signature types under which the component
/// type should be registered. Signatures are delegate types that return void and specify that parameter
/// types for component instantiation. Each component may also specify an "arguments object" that should
Expand All @@ -87,7 +87,7 @@ internal ComponentCatalog()
}

/// <summary>
/// Provides information on an instantiatable component, aka, loadable class.
/// Provides information on an instantiable component, aka, loadable class.
/// </summary>
[BestFriend]
internal sealed class LoadableClassInfo
Expand Down Expand Up @@ -259,7 +259,7 @@ internal object CreateInstanceCore(object[] ctorArgs)
/// <summary>
/// Create an instance, given the arguments object and arguments to the signature delegate.
/// The args should be non-null iff ArgType is non-null. The length of the extra array should
/// match the number of paramters for the signature delgate. When that number is zero, extra
/// match the number of parameters for the signature delegate. When that number is zero, extra
/// may be null.
/// </summary>
public object CreateInstance(IHostEnvironment env, object args, object[] extra)
Expand All @@ -280,7 +280,7 @@ public object CreateInstance(IHostEnvironment env, object args, object[] extra)
/// <summary>
/// Create an instance, given the arguments object and arguments to the signature delegate.
/// The args should be non-null iff ArgType is non-null. The length of the extra array should
/// match the number of paramters for the signature delgate. When that number is zero, extra
/// match the number of parameters for the signature delegate. When that number is zero, extra
/// may be null.
/// </summary>
public TRes CreateInstance<TRes>(IHostEnvironment env, object args, object[] extra)
Expand Down Expand Up @@ -714,7 +714,7 @@ public void RegisterAssembly(Assembly assembly, bool throwOnError = true)
}

/// <summary>
/// Return an array containing information for all instantiatable components.
/// Return an array containing information for all instantiable components.
/// If provided, the given set of assemblies is loaded first.
/// </summary>
[BestFriend]
Expand All @@ -724,7 +724,7 @@ internal LoadableClassInfo[] GetAllClasses()
}

/// <summary>
/// Return an array containing information for instantiatable components with the given
/// Return an array containing information for instantiable components with the given
/// signature and base type. If provided, the given set of assemblies is loaded first.
/// </summary>
[BestFriend]
Expand Down
2 changes: 1 addition & 1 deletion src/Microsoft.ML.Core/Data/LinkedRootCursorBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ internal abstract class LinkedRootCursorBase : RootCursorBase
/// Returns the root cursor of the input. It should be used to perform <see cref="DataViewRowCursor.MoveNext"/>
/// operations, but with the distinction, as compared to <see cref="SynchronizedCursorBase"/>, that this is not
/// a simple passthrough, but rather very implementation specific. For example, a common usage of this class is
/// on filter cursor implemetnations, where how that input cursor is consumed is very implementation specific.
/// on filter cursor implementations, where how that input cursor is consumed is very implementation specific.
/// That is why this is <see langword="protected"/>, not <see langword="private"/>.
/// </summary>
protected DataViewRowCursor Root { get; }
Expand Down
2 changes: 1 addition & 1 deletion src/Microsoft.ML.Core/Data/ModelLoadContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ internal sealed partial class ModelLoadContext : IDisposable
public readonly RepositoryReader Repository;

/// <summary>
/// When in repository mode, this is the direcory we're reading from. Null means the root
/// When in repository mode, this is the directory we're reading from. Null means the root
/// of the repository. It is always null in single-stream mode.
/// </summary>
public readonly string Directory;
Expand Down
2 changes: 1 addition & 1 deletion src/Microsoft.ML.Core/EntryPoints/ModuleArgs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ public sealed class OutputAttribute : Attribute
public string Desc { get; set; }

/// <summary>
/// The rank order of the output. Because .NET reflection returns members in an unspecfied order, this
/// The rank order of the output. Because .NET reflection returns members in an unspecified order, this
/// is the only way to ensure consistency.
/// </summary>
public Double SortOrder { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion src/Microsoft.ML.Core/Prediction/IPredictor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace Microsoft.ML
{
/// <summary>
/// Type of prediction task. Note that this is a legacy structure and usage of this should generally be
/// discouraged in future projects. Its presence suggests that there are priviledged and supported
/// discouraged in future projects. Its presence suggests that there are privileged and supported
/// tasks, and anything outside of this is unsupported. This runs rather contrary to the idea of this
/// being an expandable framework, and it is inappropriately limiting. For legacy pipelines based on
/// <see cref="ITrainer"/> and <see cref="IPredictor"/> it is still useful, but for things based on
Expand Down
Loading

0 comments on commit d849ba4

Please sign in to comment.