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