2 writes to _labelCount
Microsoft.ML.StandardTrainers (2)
Standard\MulticlassClassification\MulticlassNaiveBayesTrainer.cs (2)
301
_labelCount
= _labelHistogram.Length;
328
_labelCount
= _labelHistogram.Length;
13 references to _labelCount
Microsoft.ML.StandardTrainers (13)
Standard\MulticlassClassification\MulticlassNaiveBayesTrainer.cs (13)
305
_outputType = new VectorDataViewType(NumberDataViewType.Single,
_labelCount
);
335
_featureHistogram = new long[
_labelCount
][];
336
for (int iLabel = 0; iLabel <
_labelCount
; iLabel += 1)
349
_absentFeaturesLogProb = ctx.Reader.ReadDoubleArray(
_labelCount
);
352
_outputType = new VectorDataViewType(NumberDataViewType.Single,
_labelCount
);
374
ctx.Writer.Write(
_labelCount
);
377
for (int i = 0; i <
_labelCount
; i += 1)
383
ctx.Writer.WriteDoublesNoCount(_absentFeaturesLogProb.AsSpan(0,
_labelCount
));
442
var labelCount = ctx.AddInitializer((float)
_labelCount
, "labelCount");
592
logProb += Math.Log(featureCount + 1) - Math.Log(labelOccurrenceCount +
_labelCount
);
593
absentFeatureLogProb += Math.Log(absentFeatureCount + 1) - Math.Log(labelOccurrenceCount +
_labelCount
);
603
var editor = VBufferEditor.Create(ref dst,
_labelCount
);
605
for (int iLabel = 0; iLabel <
_labelCount
; iLabel += 1)