Skip to content

Commit

Permalink
numberOfIterations
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivan Matantsev committed Mar 11, 2019
1 parent 9d0fec8 commit 55c4eda
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -127,23 +127,23 @@ internal AveragedPerceptronTrainer(IHostEnvironment env, Options options)
/// <param name="learningRate">The learning rate. </param>
/// <param name="decreaseLearningRate">Whether to decrease learning rate as iterations progress.</param>
/// <param name="l2Regularization">Weight of L2 regularization term.</param>
/// <param name="numIterations">The number of training iterations.</param>
/// <param name="numberOfIterations">The number of training iterations.</param>
internal AveragedPerceptronTrainer(IHostEnvironment env,
string labelColumnName = DefaultColumnNames.Label,
string featureColumnName = DefaultColumnNames.Features,
IClassificationLoss lossFunction = null,
float learningRate = Options.AveragedDefault.LearningRate,
bool decreaseLearningRate = Options.AveragedDefault.DecreaseLearningRate,
float l2Regularization = Options.AveragedDefault.L2Regularization,
int numIterations = Options.AveragedDefault.NumberOfIterations)
int numberOfIterations = Options.AveragedDefault.NumberOfIterations)
: this(env, new Options
{
LabelColumnName = labelColumnName,
FeatureColumnName = featureColumnName,
LearningRate = learningRate,
DecreaseLearningRate = decreaseLearningRate,
L2Regularization = l2Regularization,
NumberOfIterations = numIterations,
NumberOfIterations = numberOfIterations,
LossFunction = new TrivialFactory(lossFunction ?? new HingeLoss())
})
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -233,19 +233,19 @@ public override LinearBinaryModelParameters CreatePredictor()
/// <param name="labelColumn">The name of the label column. </param>
/// <param name="featureColumn">The name of the feature column.</param>
/// <param name="exampleWeightColumnName">The name of the example weight column (optional).</param>
/// <param name="numIterations">The number of training iteraitons.</param>
/// <param name="numberOfIterations">The number of training iteraitons.</param>
[BestFriend]
internal LinearSvmTrainer(IHostEnvironment env,
string labelColumn = DefaultColumnNames.Label,
string featureColumn = DefaultColumnNames.Features,
string exampleWeightColumnName = null,
int numIterations = Options.OnlineDefault.NumberOfIterations)
int numberOfIterations = Options.OnlineDefault.NumberOfIterations)
: this(env, new Options
{
LabelColumnName = labelColumn,
FeatureColumnName = featureColumn,
ExampleWeightColumnName = exampleWeightColumnName,
NumberOfIterations = numIterations,
NumberOfIterations = numberOfIterations,
})
{
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,22 +96,22 @@ public override LinearRegressionModelParameters CreatePredictor()
/// <param name="learningRate">The learning Rate.</param>
/// <param name="decreaseLearningRate">Decrease learning rate as iterations progress.</param>
/// <param name="l2Regularization">Weight of L2 regularization term.</param>
/// <param name="numIterations">Number of training iterations through the data.</param>
/// <param name="numberOfIterations">Number of training iterations through the data.</param>
/// <param name="lossFunction">The custom loss functions. Defaults to <see cref="SquaredLoss"/> if not provided.</param>
internal OnlineGradientDescentTrainer(IHostEnvironment env,
string labelColumn = DefaultColumnNames.Label,
string featureColumn = DefaultColumnNames.Features,
float learningRate = Options.OgdDefaultArgs.LearningRate,
bool decreaseLearningRate = Options.OgdDefaultArgs.DecreaseLearningRate,
float l2Regularization = Options.OgdDefaultArgs.L2Regularization,
int numIterations = Options.OgdDefaultArgs.NumberOfIterations,
int numberOfIterations = Options.OgdDefaultArgs.NumberOfIterations,
IRegressionLoss lossFunction = null)
: this(env, new Options
{
LearningRate = learningRate,
DecreaseLearningRate = decreaseLearningRate,
L2Regularization= l2Regularization,
NumberOfIterations = numIterations,
NumberOfIterations = numberOfIterations,
LabelColumnName = labelColumn,
FeatureColumnName = featureColumn,
LossFunction = new TrivialFactory(lossFunction ?? new SquaredLoss())
Expand Down

0 comments on commit 55c4eda

Please sign in to comment.