2 references to L1Sparsity
Microsoft.ML.StandardTrainers (2)
Standard\SdcaBinary.cs (1)
1007
metrics[(int)MetricKind.
L1Sparsity
] = SdcaTrainerOptions.L1Regularization == 0 ? 1 : (Double)firstWeights.GetValues().Count(w => w != 0) / weights.Length;
Standard\SdcaMulticlass.cs (1)
438
metrics[(int)MetricKind.
L1Sparsity
] = SdcaTrainerOptions.L1Regularization == 0 ? 1 : weights.Sum(