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