Skip to content

Remove all spaces in the end of lines #478

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 3 commits into from
Jul 3, 2018
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
36 changes: 18 additions & 18 deletions src/Microsoft.ML.Data/Transforms/NormalizeColumn.cs
Original file line number Diff line number Diff line change
Expand Up @@ -271,10 +271,10 @@ public static NormalizeTransform Create(IHostEnvironment env, MinMaxArguments ar
/// <param name="name">Name of the output column.</param>
/// <param name="source">Name of the column to be transformed. If this is null '<paramref name="name"/>' will be used.</param>
/// /// <param name="useCdf">Whether to use CDF as the output.</param>
public static NormalizeTransform CreateMeanVarNormalizer(IHostEnvironment env,
IDataView input,
string name,
string source=null,
public static NormalizeTransform CreateMeanVarNormalizer(IHostEnvironment env,
IDataView input,
string name,
string source = null,
bool useCdf = Defaults.MeanVarCdf)
{
var args = new MeanVarArguments()
Expand Down Expand Up @@ -313,10 +313,10 @@ public static NormalizeTransform Create(IHostEnvironment env, MeanVarArguments a
/// <param name="name">Name of the output column.</param>
/// <param name="source">Name of the column to be transformed. If this is null '<paramref name="name"/>' will be used.</param>
/// /// <param name="useCdf">Whether to use CDF as the output.</param>
public static NormalizeTransform CreateLogMeanVarNormalizer(IHostEnvironment env,
IDataView input,
string name,
string source=null,
public static NormalizeTransform CreateLogMeanVarNormalizer(IHostEnvironment env,
IDataView input,
string name,
string source = null,
bool useCdf = Defaults.LogMeanVarCdf)
{
var args = new LogMeanVarArguments()
Expand Down Expand Up @@ -347,10 +347,10 @@ public static NormalizeTransform Create(IHostEnvironment env, LogMeanVarArgument
return func;
}

public static NormalizeTransform CreateBinningNormalizer(IHostEnvironment env,
IDataView input,
string name,
string source=null,
public static NormalizeTransform CreateBinningNormalizer(IHostEnvironment env,
IDataView input,
string name,
string source = null,
int numBins = Defaults.NumBins)
{
var args = new BinArguments()
Expand Down Expand Up @@ -381,12 +381,12 @@ public static NormalizeTransform Create(IHostEnvironment env, BinArguments args,
return func;
}

public static NormalizeTransform CreateSupervisedBinningNormalizer(IHostEnvironment env,
IDataView input,
string labelColumn,
string name,
string source = null,
int numBins = Defaults.NumBins,
public static NormalizeTransform CreateSupervisedBinningNormalizer(IHostEnvironment env,
IDataView input,
string labelColumn,
string name,
string source = null,
int numBins = Defaults.NumBins,
int minBinSize = Defaults.MinBinSize)
{
var args = new SupervisedBinArguments()
Expand Down
8 changes: 4 additions & 4 deletions src/Microsoft.ML.FastTree/FastTreeClassification.cs
Original file line number Diff line number Diff line change
Expand Up @@ -338,10 +338,10 @@ public void AdjustTreeOutputs(IChannel ch, RegressionTree tree,

public static partial class FastTree
{
[TlcModule.EntryPoint(Name = "Trainers.FastTreeBinaryClassifier",
Desc = FastTreeBinaryClassificationTrainer.Summary,
Remarks = FastTreeBinaryClassificationTrainer.Remarks,
UserName = FastTreeBinaryClassificationTrainer.UserNameValue,
[TlcModule.EntryPoint(Name = "Trainers.FastTreeBinaryClassifier",
Desc = FastTreeBinaryClassificationTrainer.Summary,
Remarks = FastTreeBinaryClassificationTrainer.Remarks,
UserName = FastTreeBinaryClassificationTrainer.UserNameValue,
ShortName = FastTreeBinaryClassificationTrainer.ShortName)]
public static CommonOutputs.BinaryClassificationOutput TrainBinary(IHostEnvironment env, FastTreeBinaryClassificationTrainer.Arguments input)
{
Expand Down
6 changes: 3 additions & 3 deletions src/Microsoft.ML.FastTree/FastTreeRanking.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1096,10 +1096,10 @@ public static FastTreeRankingPredictor Create(IHostEnvironment env, ModelLoadCon

public static partial class FastTree
{
[TlcModule.EntryPoint(Name = "Trainers.FastTreeRanker",
Desc = FastTreeRankingTrainer.Summary,
[TlcModule.EntryPoint(Name = "Trainers.FastTreeRanker",
Desc = FastTreeRankingTrainer.Summary,
Remarks = FastTreeRankingTrainer.Remarks,
UserName = FastTreeRankingTrainer.UserNameValue,
UserName = FastTreeRankingTrainer.UserNameValue,
ShortName = FastTreeRankingTrainer.ShortName)]
public static CommonOutputs.RankingOutput TrainRanking(IHostEnvironment env, FastTreeRankingTrainer.Arguments input)
{
Expand Down
6 changes: 3 additions & 3 deletions src/Microsoft.ML.FastTree/FastTreeRegression.cs
Original file line number Diff line number Diff line change
Expand Up @@ -449,9 +449,9 @@ public static FastTreeRegressionPredictor Create(IHostEnvironment env, ModelLoad
public static partial class FastTree
{
[TlcModule.EntryPoint(Name = "Trainers.FastTreeRegressor",
Desc = FastTreeRegressionTrainer.Summary,
Remarks = FastTreeRegressionTrainer.Remarks,
UserName = FastTreeRegressionTrainer.UserNameValue,
Desc = FastTreeRegressionTrainer.Summary,
Remarks = FastTreeRegressionTrainer.Remarks,
UserName = FastTreeRegressionTrainer.UserNameValue,
ShortName = FastTreeRegressionTrainer.ShortName)]
public static CommonOutputs.RegressionOutput TrainRegression(IHostEnvironment env, FastTreeRegressionTrainer.Arguments input)
{
Expand Down
6 changes: 3 additions & 3 deletions src/Microsoft.ML.FastTree/FastTreeTweedie.cs
Original file line number Diff line number Diff line change
Expand Up @@ -463,9 +463,9 @@ protected override void Map(ref VBuffer<float> src, ref float dst)

public static partial class FastTree
{
[TlcModule.EntryPoint(Name = "Trainers.FastTreeTweedieRegressor",
Desc = FastTreeTweedieTrainer.Summary,
UserName = FastTreeTweedieTrainer.UserNameValue,
[TlcModule.EntryPoint(Name = "Trainers.FastTreeTweedieRegressor",
Desc = FastTreeTweedieTrainer.Summary,
UserName = FastTreeTweedieTrainer.UserNameValue,
ShortName = FastTreeTweedieTrainer.ShortName)]
public static CommonOutputs.RegressionOutput TrainTweedieRegression(IHostEnvironment env, FastTreeTweedieTrainer.Arguments input)
{
Expand Down
8 changes: 4 additions & 4 deletions src/Microsoft.ML.FastTree/RandomForestClassification.cs
Original file line number Diff line number Diff line change
Expand Up @@ -208,10 +208,10 @@ protected override void GetGradientInOneQuery(int query, int threadIndex)

public static partial class FastForest
{
[TlcModule.EntryPoint(Name = "Trainers.FastForestBinaryClassifier",
Desc = FastForestClassification.Summary,
Remarks = FastForestClassification.Remarks,
UserName = FastForestClassification.UserNameValue,
[TlcModule.EntryPoint(Name = "Trainers.FastForestBinaryClassifier",
Desc = FastForestClassification.Summary,
Remarks = FastForestClassification.Remarks,
UserName = FastForestClassification.UserNameValue,
ShortName = FastForestClassification.ShortName)]
public static CommonOutputs.BinaryClassificationOutput TrainBinary(IHostEnvironment env, FastForestClassification.Arguments input)
{
Expand Down
6 changes: 3 additions & 3 deletions src/Microsoft.ML.FastTree/RandomForestRegression.cs
Original file line number Diff line number Diff line change
Expand Up @@ -280,10 +280,10 @@ public BasicImpl(Dataset trainData, Arguments args)

public static partial class FastForest
{
[TlcModule.EntryPoint(Name = "Trainers.FastForestRegressor",
Desc = FastForestRegression.Summary,
[TlcModule.EntryPoint(Name = "Trainers.FastForestRegressor",
Desc = FastForestRegression.Summary,
Remarks = FastForestRegression.Remarks,
UserName = FastForestRegression.LoadNameValue,
UserName = FastForestRegression.LoadNameValue,
ShortName = FastForestRegression.ShortName)]
public static CommonOutputs.RegressionOutput TrainRegression(IHostEnvironment env, FastForestRegression.Arguments input)
{
Expand Down
4 changes: 2 additions & 2 deletions src/Microsoft.ML.KMeansClustering/KMeansPlusPlusTrainer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -233,10 +233,10 @@ private static int ComputeNumThreads(IHost host, int? argNumThreads)
return Math.Max(1, maxThreads);
}

[TlcModule.EntryPoint(Name = "Trainers.KMeansPlusPlusClusterer",
[TlcModule.EntryPoint(Name = "Trainers.KMeansPlusPlusClusterer",
Desc = Summary,
Remarks = Remarks,
UserName = UserNameValue,
UserName = UserNameValue,
ShortName = ShortName)]
public static CommonOutputs.ClusteringOutput TrainKMeans(IHostEnvironment env, Arguments input)
{
Expand Down
4 changes: 2 additions & 2 deletions src/Microsoft.ML.PCA/PcaTrainer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -284,10 +284,10 @@ private static void PostProcess(VBuffer<Float>[] y, Float[] sigma, Float[] z, in
}
}

[TlcModule.EntryPoint(Name = "Trainers.PcaAnomalyDetector",
[TlcModule.EntryPoint(Name = "Trainers.PcaAnomalyDetector",
Desc = "Train an PCA Anomaly model.",
Remarks = PcaPredictor.Remarks,
UserName = UserNameValue,
UserName = UserNameValue,
ShortName = ShortName)]
public static CommonOutputs.AnomalyDetectionOutput TrainPcaAnomaly(IHostEnvironment env, Arguments input)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@
using Microsoft.ML.Runtime.EntryPoints;
using Microsoft.ML.Runtime.FactorizationMachine;
using Microsoft.ML.Runtime.Internal.CpuMath;
using Microsoft.ML.Runtime.Internal.Internallearn;
using Microsoft.ML.Runtime.Internal.Utilities;
using Microsoft.ML.Runtime.Model;
using Microsoft.ML.Runtime.Training;

[assembly: LoadableClass(FieldAwareFactorizationMachineTrainer.Summary, typeof(FieldAwareFactorizationMachineTrainer), typeof(FieldAwareFactorizationMachineTrainer.Arguments),
Expand Down Expand Up @@ -413,10 +411,10 @@ public override FieldAwareFactorizationMachinePredictor CreatePredictor()
return _pred;
}

[TlcModule.EntryPoint(Name = "Trainers.FieldAwareFactorizationMachineBinaryClassifier",
Desc = Summary,
[TlcModule.EntryPoint(Name = "Trainers.FieldAwareFactorizationMachineBinaryClassifier",
Desc = Summary,
Remarks = Remarks,
UserName = UserName,
UserName = UserName,
ShortName = ShortName)]
public static CommonOutputs.BinaryClassificationOutput TrainBinary(IHostEnvironment env, Arguments input)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ public abstract class ArgumentsBase : LearnerInputBaseWithLabel
public int? MaxIterations;

[Argument(ArgumentType.AtMostOnce, HelpText = "Shuffle data every epoch?", ShortName = "shuf")]
[TlcModule.SweepableDiscreteParamAttribute("Shuffle", null, isBool:true)]
[TlcModule.SweepableDiscreteParamAttribute("Shuffle", null, isBool: true)]
public bool Shuffle = true;

[Argument(ArgumentType.AtMostOnce, HelpText = "Convergence check frequency (in terms of number of iterations). Set as negative or zero for not checking at all. If left blank, it defaults to check after every 'numThreads' iterations.", NullName = "<Auto>", ShortName = "checkFreq")]
Expand Down Expand Up @@ -1507,7 +1507,7 @@ public sealed class Arguments : LearnerInputBaseWithWeight
public Double InitLearningRate = 0.01;

[Argument(ArgumentType.AtMostOnce, HelpText = "Shuffle data every epoch?", ShortName = "shuf")]
[TlcModule.SweepableDiscreteParamAttribute("Shuffle", null, isBool:true)]
[TlcModule.SweepableDiscreteParamAttribute("Shuffle", null, isBool: true)]
public bool Shuffle = true;

[Argument(ArgumentType.AtMostOnce, HelpText = "Apply weight to the positive class, for imbalanced data", ShortName = "piw")]
Expand Down Expand Up @@ -1795,10 +1795,10 @@ public static CommonOutputs.BinaryClassificationOutput TrainBinary(IHostEnvironm
/// </summary>
public static partial class Sdca
{
[TlcModule.EntryPoint(Name = "Trainers.StochasticDualCoordinateAscentBinaryClassifier",
[TlcModule.EntryPoint(Name = "Trainers.StochasticDualCoordinateAscentBinaryClassifier",
Desc = "Train an SDCA binary model.",
Remarks = LinearClassificationTrainer.Remarks,
UserName = LinearClassificationTrainer.UserNameValue,
UserName = LinearClassificationTrainer.UserNameValue,
ShortName = LinearClassificationTrainer.LoadNameValue)]
public static CommonOutputs.BinaryClassificationOutput TrainBinary(IHostEnvironment env, LinearClassificationTrainer.Arguments input)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -386,10 +386,10 @@ public override ParameterMixingCalibratedPredictor CreatePredictor()
new PlattCalibrator(Host, -1, 0));
}

[TlcModule.EntryPoint(Name = "Trainers.LogisticRegressionBinaryClassifier",
Desc = Summary,
[TlcModule.EntryPoint(Name = "Trainers.LogisticRegressionBinaryClassifier",
Desc = Summary,
Remarks = Remarks,
UserName = UserNameValue,
UserName = UserNameValue,
ShortName = ShortName)]
public static CommonOutputs.BinaryClassificationOutput TrainBinary(IHostEnvironment env, Arguments input)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -961,10 +961,10 @@ public IRow GetStatsIRowOrNull(RoleMappedSchema schema)
/// </summary>
public partial class LogisticRegression
{
[TlcModule.EntryPoint(Name = "Trainers.LogisticRegressionClassifier",
Desc = Summary,
[TlcModule.EntryPoint(Name = "Trainers.LogisticRegressionClassifier",
Desc = Summary,
Remarks = MulticlassLogisticRegression.Remarks,
UserName = MulticlassLogisticRegression.UserNameValue,
UserName = MulticlassLogisticRegression.UserNameValue,
ShortName = MulticlassLogisticRegression.ShortName)]
public static CommonOutputs.MulticlassClassificationOutput TrainMultiClass(IHostEnvironment env, MulticlassLogisticRegression.Arguments input)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@ public override MultiClassNaiveBayesPredictor CreatePredictor()
return _predictor;
}

[TlcModule.EntryPoint(Name = "Trainers.NaiveBayesClassifier",
Desc = "Train a MultiClassNaiveBayesTrainer.",
[TlcModule.EntryPoint(Name = "Trainers.NaiveBayesClassifier",
Desc = "Train a MultiClassNaiveBayesTrainer.",
UserName = UserName, ShortName = ShortName)]
public static CommonOutputs.MulticlassClassificationOutput TrainMultiClassNaiveBayesTrainer(IHostEnvironment env, Arguments input)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,10 @@ public override LinearBinaryPredictor CreatePredictor()
return new LinearBinaryPredictor(Host, ref weights, bias);
}

[TlcModule.EntryPoint(Name = "Trainers.AveragedPerceptronBinaryClassifier",
[TlcModule.EntryPoint(Name = "Trainers.AveragedPerceptronBinaryClassifier",
Desc = Summary,
Remarks = Remarks,
UserName = UserNameValue,
UserName = UserNameValue,
ShortName = ShortName)]
public static CommonOutputs.BinaryClassificationOutput TrainBinary(IHostEnvironment env, Arguments input)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public override TPredictor CreatePredictor()
return new LinearRegressionPredictor(Host, ref weights, bias);
}

[TlcModule.EntryPoint(Name = "Trainers.OnlineGradientDescentRegressor",
[TlcModule.EntryPoint(Name = "Trainers.OnlineGradientDescentRegressor",
Desc = "Train a Online gradient descent perceptron.",
Remarks = Remarks,
UserName = UserNameValue,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public sealed class PoissonRegression : LbfgsTrainerBase<Float, PoissonRegressio
internal const string UserNameValue = "Poisson Regression";
internal const string ShortName = "PR";
internal const string Summary = "Poisson Regression assumes the unknown function, denoted Y has a Poisson distribution.";
new internal const string Remarks = @"<remarks>
internal new const string Remarks = @"<remarks>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Ivanidzo4ka, It has be reverted here as well...:)
I have opened PR (486) to fix it.

<a href='https://en.wikipedia.org/wiki/Poisson_regression'>Poisson regression</a> is a parameterized regression method.
It assumes that the log of the conditional mean of the dependent variable follows a linear function of the dependent variables.
Assuming that the dependent variable follows a Poisson distribution, the parameters of the regressor can be estimated by maximizing the likelihood of the obtained observations.
Expand Down
6 changes: 3 additions & 3 deletions src/Microsoft.ML.StandardLearners/Standard/SdcaMultiClass.cs
Original file line number Diff line number Diff line change
Expand Up @@ -386,10 +386,10 @@ protected override Float GetInstanceWeight(FloatLabelCursor cursor)
/// </summary>
public static partial class Sdca
{
[TlcModule.EntryPoint(Name = "Trainers.StochasticDualCoordinateAscentClassifier",
Desc = SdcaMultiClassTrainer.Summary,
[TlcModule.EntryPoint(Name = "Trainers.StochasticDualCoordinateAscentClassifier",
Desc = SdcaMultiClassTrainer.Summary,
Remarks = SdcaMultiClassTrainer.Remarks,
UserName = SdcaMultiClassTrainer.UserNameValue,
UserName = SdcaMultiClassTrainer.UserNameValue,
ShortName = SdcaMultiClassTrainer.ShortName)]
public static CommonOutputs.MulticlassClassificationOutput TrainMultiClass(IHostEnvironment env, SdcaMultiClassTrainer.Arguments input)
{
Expand Down
4 changes: 2 additions & 2 deletions src/Microsoft.ML.StandardLearners/Standard/SdcaRegression.cs
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,10 @@ protected override Float TuneDefaultL2(IChannel ch, int maxIterations, long rowC
/// </summary>
public static partial class Sdca
{
[TlcModule.EntryPoint(Name = "Trainers.StochasticDualCoordinateAscentRegressor",
[TlcModule.EntryPoint(Name = "Trainers.StochasticDualCoordinateAscentRegressor",
Desc = SdcaRegressionTrainer.Summary,
Remarks = SdcaRegressionTrainer.Remarks,
UserName = SdcaRegressionTrainer.UserNameValue,
UserName = SdcaRegressionTrainer.UserNameValue,
ShortName = SdcaRegressionTrainer.ShortName)]
public static CommonOutputs.RegressionOutput TrainRegression(IHostEnvironment env, SdcaRegressionTrainer.Arguments input)
{
Expand Down
10 changes: 5 additions & 5 deletions src/Microsoft.ML.Transforms/BootstrapSampleTransform.cs
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,11 @@ public BootstrapSampleTransform(IHostEnvironment env, Arguments args, IDataView
/// <param name="seed">The random seed. If unspecified random state will be instead derived from the environment.</param>
/// <param name="shuffleInput">Whether we should attempt to shuffle the source data. By default on, but can be turned off for efficiency.</param>
/// <param name="poolSize">When shuffling the output, the number of output rows to keep in that pool. Note that shuffling of output is completely distinct from shuffling of input.</param>
public BootstrapSampleTransform(IHostEnvironment env,
IDataView input,
bool complement = Defaults.Complement,
uint? seed = null,
bool shuffleInput = Defaults.ShuffleInput,
public BootstrapSampleTransform(IHostEnvironment env,
IDataView input,
bool complement = Defaults.Complement,
uint? seed = null,
bool shuffleInput = Defaults.ShuffleInput,
int poolSize = Defaults.PoolSize)
: this(env, new Arguments() { Complement = complement, Seed = seed, ShuffleInput = shuffleInput, PoolSize = poolSize }, input)
{
Expand Down
Loading