1 write to SdcaTrainerOptions
Microsoft.ML.StandardTrainers (1)
Standard\SdcaBinary.cs (1)
310
SdcaTrainerOptions
= options;
59 references to SdcaTrainerOptions
Microsoft.ML.StandardTrainers (59)
Standard\SdcaBinary.cs (41)
286
private protected override bool ShuffleData =>
SdcaTrainerOptions
.Shuffle;
311
SdcaTrainerOptions
.L2Regularization = l2Const ?? options.L2Regularization;
312
SdcaTrainerOptions
.L1Regularization = l1Threshold ?? options.L1Regularization;
313
SdcaTrainerOptions
.MaximumNumberOfIterations = maxIterations ?? options.MaximumNumberOfIterations;
314
SdcaTrainerOptions
.Check(env);
336
if (
SdcaTrainerOptions
.NumberOfThreads.HasValue)
338
numThreads =
SdcaTrainerOptions
.NumberOfThreads.Value;
351
if (
SdcaTrainerOptions
.ConvergenceCheckFrequency.HasValue)
352
checkFrequency =
SdcaTrainerOptions
.ConvergenceCheckFrequency.Value;
453
if (
SdcaTrainerOptions
.MaximumNumberOfIterations == null)
454
SdcaTrainerOptions
.MaximumNumberOfIterations = TuneDefaultMaxIterations(ch, count, numThreads);
456
Contracts.Assert(
SdcaTrainerOptions
.MaximumNumberOfIterations.HasValue);
457
if (
SdcaTrainerOptions
.L2Regularization == null)
458
SdcaTrainerOptions
.L2Regularization = TuneDefaultL2(ch,
SdcaTrainerOptions
.MaximumNumberOfIterations.Value, count, numThreads);
460
Contracts.Assert(
SdcaTrainerOptions
.L2Regularization.HasValue);
461
if (
SdcaTrainerOptions
.L1Regularization == null)
462
SdcaTrainerOptions
.L1Regularization = TuneDefaultL1(ch, numFeatures);
464
ch.Assert(
SdcaTrainerOptions
.L1Regularization.HasValue);
465
var l1Threshold =
SdcaTrainerOptions
.L1Regularization.Value;
494
ch.Assert(
SdcaTrainerOptions
.L2Regularization.HasValue);
495
var l2Const =
SdcaTrainerOptions
.L2Regularization.Value;
558
ch.Assert(
SdcaTrainerOptions
.MaximumNumberOfIterations.HasValue);
559
var maxIterations =
SdcaTrainerOptions
.MaximumNumberOfIterations.Value;
584
if (
SdcaTrainerOptions
.BiasLearningRate == 0)
795
Contracts.Assert(
SdcaTrainerOptions
.L1Regularization.HasValue);
800
var l1Threshold =
SdcaTrainerOptions
.L1Regularization.Value;
802
var lr =
SdcaTrainerOptions
.BiasLearningRate *
SdcaTrainerOptions
.L2Regularization.Value;
805
using (var cursor =
SdcaTrainerOptions
.Shuffle ? cursorFactory.Create(rand) : cursorFactory.Create())
825
if (
SdcaTrainerOptions
.BiasLearningRate == 0)
871
if (
SdcaTrainerOptions
.BiasLearningRate == 0)
992
Contracts.Assert(
SdcaTrainerOptions
.L2Regularization.HasValue);
993
Contracts.Assert(
SdcaTrainerOptions
.L1Regularization.HasValue);
994
Double l2Const =
SdcaTrainerOptions
.L2Regularization.Value;
995
Double l1Threshold =
SdcaTrainerOptions
.L1Regularization.Value;
1007
metrics[(int)MetricKind.L1Sparsity] =
SdcaTrainerOptions
.L1Regularization == 0 ? 1 : (Double)firstWeights.GetValues().Count(w => w != 0) / weights.Length;
1009
bool converged = dualityGap / newLoss <
SdcaTrainerOptions
.ConvergenceTolerance;
1451
private protected override bool ShuffleData =>
SdcaTrainerOptions
.Shuffle;
1509
_positiveInstanceWeight =
SdcaTrainerOptions
.PositiveInstanceWeight;
1519
_positiveInstanceWeight =
SdcaTrainerOptions
.PositiveInstanceWeight;
Standard\SdcaMulticlass.cs (16)
139
_loss = loss ??
SdcaTrainerOptions
.InternalLoss ??
SdcaTrainerOptions
.LossFunctionFactory.CreateComponent(env);
179
Contracts.Assert(
SdcaTrainerOptions
.L1Regularization.HasValue);
188
var l1Threshold =
SdcaTrainerOptions
.L1Regularization.Value;
190
var lr =
SdcaTrainerOptions
.BiasLearningRate *
SdcaTrainerOptions
.L2Regularization.Value;
194
using (var cursor =
SdcaTrainerOptions
.Shuffle ? cursorFactory.Create(rand) : cursorFactory.Create())
219
if (
SdcaTrainerOptions
.BiasLearningRate == 0)
289
if (
SdcaTrainerOptions
.BiasLearningRate == 0)
411
Contracts.Assert(
SdcaTrainerOptions
.L2Regularization.HasValue);
412
Contracts.Assert(
SdcaTrainerOptions
.L1Regularization.HasValue);
413
Double l2Const =
SdcaTrainerOptions
.L2Regularization.Value;
414
Double l1Threshold =
SdcaTrainerOptions
.L1Regularization.Value;
426
Double l1Regularizer =
SdcaTrainerOptions
.L1Regularization.Value * l2Const * weightsL1Norm;
438
metrics[(int)MetricKind.L1Sparsity] =
SdcaTrainerOptions
.L1Regularization == 0 ? 1 : weights.Sum(
441
bool converged = dualityGap / newLoss <
SdcaTrainerOptions
.ConvergenceTolerance;
Standard\SdcaRegression.cs (2)
124
_loss = loss ??
SdcaTrainerOptions
.LossFunction ??
SdcaTrainerOptions
.LossFunctionFactory.CreateComponent(env);