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