1 write to L2Weight
Microsoft.ML.StandardTrainers (1)
Standard\LogisticRegression\LbfgsPredictorBase.cs (1)
259
L2Weight
= LbfgsTrainerOptions.L2Regularization;
11 references to L2Weight
Microsoft.ML.StandardTrainers (11)
Standard\LogisticRegression\LbfgsPredictorBase.cs (4)
556
OneDalLbfgs.LogisticRegressionCompute(featuresPtr, labelsPtr, weightsPtr, useSampleWeights, betaPtr, NumGoodRows, nFeatures, ClassCount, L1Weight,
L2Weight
, OptTol, MaxIterations, MemorySize, numThreads);
772
if (
L2Weight
> 0)
782
regLoss = (float)(r *
L2Weight
* 0.5);
786
(int ind, float v1, ref float v2) => { if (ind >= BiasCount) v2 +=
L2Weight
* v1; });
Standard\LogisticRegression\LogisticRegression.cs (5)
237
if (
L2Weight
> 0)
241
var regLoss = VectorUtils.NormSquared(currentWeightsValues.Slice(1)) *
L2Weight
;
327
if (
L2Weight
> 0)
335
hessian[i] =
L2Weight
;
413
var std = LbfgsTrainerOptions.ComputeStandardDeviation.ComputeStandardDeviation(hessian, weightIndices, numParams, CurrentWeights.Length, ch,
L2Weight
);
Standard\LogisticRegression\MulticlassLogisticRegression.cs (2)
323
if (
L2Weight
> 0)
327
var regLoss = VectorUtils.NormSquared(CurrentWeights.GetValues().Slice(BiasCount)) *
L2Weight
;