3 writes to CurrentWeights
Microsoft.ML.StandardTrainers (3)
Standard\LogisticRegression\LbfgsPredictorBase.cs (3)
560CurrentWeights = new VBuffer<float>(betaArray.Length, betaArray); 699opt.Minimize(DifferentiableFunction, ref initWeights, terminationCriterion, ref CurrentWeights, out loss); 705CurrentWeights = e.State.X;
21 references to CurrentWeights
Microsoft.ML.StandardTrainers (21)
Standard\LogisticRegression\LbfgsPredictorBase.cs (2)
709ch.Assert(CurrentWeights.Length == BiasCount + WeightCount); 714VBufferUtils.ForEachDefined(in CurrentWeights, (index, value) => { if (index >= BiasCount && value != 0) numParams++; });
Standard\LogisticRegression\LogisticRegression.cs (12)
229Contracts.Assert(CurrentWeights.IsDense); 235var currentWeightsValues = CurrentWeights.GetValues(); 250VBufferUtils.ForEachDefined(in CurrentWeights, (ind, value) => { if (ind >= BiasCount) regLoss += Math.Abs(value); }); 270var featureLength = CurrentWeights.Length - BiasCount; 283bool denseWeight = numParams == CurrentWeights.Length; 349var score = bias + VectorUtils.DotProductWithOffset(in CurrentWeights, 1, in cursor.Features); 412CurrentWeights.CopyTo(ref weightsOnly, 1, CurrentWeights.Length - 1); 413var std = LbfgsTrainerOptions.ComputeStandardDeviation.ComputeStandardDeviation(hessian, weightIndices, numParams, CurrentWeights.Length, ch, L2Weight); 454CurrentWeights.GetItemOrDefault(0, ref bias); 455CurrentWeights.CopyTo(ref weights, 1, CurrentWeights.Length - 1);
Standard\LogisticRegression\MulticlassLogisticRegression.cs (4)
305return new MaximumEntropyModelParameters(Host, in CurrentWeights, _numClasses, NumFeatures, _labelNames, _stats); 317Contracts.Assert(CurrentWeights.IsDense); 327var regLoss = VectorUtils.NormSquared(CurrentWeights.GetValues().Slice(BiasCount)) * L2Weight; 336VBufferUtils.ForEachDefined(in CurrentWeights, (ind, value) => { if (ind >= BiasCount) regLoss += Math.Abs(value); });
Standard\PoissonRegression\PoissonRegression.cs (3)
192CurrentWeights.CopyTo(ref weights, 1, CurrentWeights.Length - 1); 194CurrentWeights.GetItemOrDefault(0, ref bias);