17 references to MetricKind
Microsoft.ML.StandardTrainers (17)
Standard\SdcaBinary.cs (9)
1000
var loss = metrics[(int)
MetricKind
.Loss];
1002
metrics[(int)
MetricKind
.Loss] = newLoss;
1003
metrics[(int)
MetricKind
.DualLoss] = newDualLoss;
1004
var dualityGap = metrics[(int)
MetricKind
.DualityGap] = newLoss - newDualLoss;
1005
metrics[(int)
MetricKind
.BiasUnreg] = biasUnreg[0];
1006
metrics[(int)
MetricKind
.BiasReg] = biasReg[0];
1007
metrics[(int)
MetricKind
.L1Sparsity] = SdcaTrainerOptions.L1Regularization == 0 ? 1 : (Double)firstWeights.GetValues().Count(w => w != 0) / weights.Length;
1011
if (metrics[(int)
MetricKind
.Loss] < bestPrimalLoss)
1019
bestPrimalLoss = metrics[(int)
MetricKind
.Loss];
Standard\SdcaMulticlass.cs (8)
433
metrics[(int)
MetricKind
.Loss] = newLoss;
434
metrics[(int)
MetricKind
.DualLoss] = newDualLoss;
435
metrics[(int)
MetricKind
.DualityGap] = dualityGap;
436
metrics[(int)
MetricKind
.BiasUnreg] = biasUnreg[0];
437
metrics[(int)
MetricKind
.BiasReg] = biasReg[0];
438
metrics[(int)
MetricKind
.L1Sparsity] = SdcaTrainerOptions.L1Regularization == 0 ? 1 : weights.Sum(
443
if (metrics[(int)
MetricKind
.Loss] < bestPrimalLoss)
455
bestPrimalLoss = metrics[(int)
MetricKind
.Loss];