38 references to BiasCount
Microsoft.ML.StandardTrainers (38)
Standard\LogisticRegression\LbfgsPredictorBase.cs (21)
321
? new L1Optimizer(Host,
BiasCount
, L1Weight / NumGoodRows, MemorySize, DenseOptimizer, null, EnforceNonNegativity)
329
float[] initWeights = new float[
BiasCount
+ WeightCount];
337
init = VBufferUtils.CreateEmpty<float>(
BiasCount
+ WeightCount);
351
var oldWeights = VBufferUtils.CreateEmpty<float>(
BiasCount
+ WeightCount);
397
sgdWeights = VBufferUtils.CreateDense<float>(
BiasCount
+ WeightCount);
399
sgdWeights = VBufferUtils.CreateEmpty<float>(
BiasCount
+ WeightCount);
548
float[] betaArray = new float[WeightCount +
BiasCount
];
677
int size =
BiasCount
+ WeightCount;
709
ch.Assert(CurrentWeights.Length ==
BiasCount
+ WeightCount);
711
int numParams =
BiasCount
;
714
VBufferUtils.ForEachDefined(in CurrentWeights, (index, value) => { if (index >=
BiasCount
&& value != 0) numParams++; });
716
ch.Info("L1 regularization selected {0} of {1} weights.", numParams,
BiasCount
+ WeightCount);
729
Contracts.Assert(vec.Length ==
BiasCount
+ WeightCount);
730
VBufferUtils.DensifyFirst(ref vec,
BiasCount
);
747
Contracts.Assert(x.Length ==
BiasCount
+ WeightCount);
748
Contracts.Assert(gradient.Length ==
BiasCount
+ WeightCount);
777
for (int i =
BiasCount
; i < values.Length; i++)
786
(int ind, float v1, ref float v2) => { if (ind >=
BiasCount
) v2 += L2Weight * v1; });
894
var initWeights = new float[
BiasCount
+ WeightCount];
900
Contracts.Check(i <
BiasCount
, classError);
903
Contracts.Check(i ==
BiasCount
, classError);
Standard\LogisticRegression\LogisticRegression.cs (7)
214
Contracts.Assert(editor.Values.Length >=
BiasCount
&& (grad.IsDense || editor.Indices[
BiasCount
- 1] ==
BiasCount
- 1));
226
Contracts.Assert(
BiasCount
== 1);
228
Contracts.Assert(numParams >=
BiasCount
);
250
VBufferUtils.ForEachDefined(in CurrentWeights, (ind, value) => { if (ind >=
BiasCount
) regLoss += Math.Abs(value); });
270
var featureLength = CurrentWeights.Length -
BiasCount
;
Standard\LogisticRegression\MulticlassLogisticRegression.cs (7)
272
Contracts.Assert(editor.Values.Length >=
BiasCount
&& (grad.IsDense || editor.Indices[
BiasCount
- 1] ==
BiasCount
- 1));
314
Contracts.Assert(
BiasCount
== _numClasses);
316
Contracts.Assert(numParams >=
BiasCount
);
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)
179
Contracts.Assert(editor.Values.Length >=
BiasCount
&& (grad.IsDense || editor.Indices[
BiasCount
- 1] ==
BiasCount
- 1));