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