2 writes to _numClasses
Microsoft.ML.Data (2)
Evaluators\MulticlassClassificationEvaluator.cs (2)
619
_numClasses
= scoreColumn.Type.GetVectorSize();
649
_numClasses
= ctx.Reader.ReadInt32();
31 references to _numClasses
Microsoft.ML.Data (31)
Evaluators\MulticlassClassificationEvaluator.cs (31)
622
if (schema[ScoreIndex].HasSlotNames(
_numClasses
))
626
_classNames = new ReadOnlyMemory<char>[
_numClasses
];
630
_classNames = Utils.BuildArray(
_numClasses
, i => i.ToString().AsMemory());
632
var key = new KeyDataViewType(typeof(uint),
_numClasses
);
635
_types[SortedScoresCol] = new VectorDataViewType(NumberDataViewType.Single,
_numClasses
);
636
_types[SortedClassesCol] = new VectorDataViewType(key,
_numClasses
);
650
Host.CheckDecode(
_numClasses
> 0);
653
_classNames = new ReadOnlyMemory<char>[
_numClasses
];
654
for (int i = 0; i <
_numClasses
; i++)
658
_classNames = Utils.BuildArray(
_numClasses
, i => i.ToString().AsMemory());
661
var key = new KeyDataViewType(typeof(uint),
_numClasses
);
664
_types[SortedScoresCol] = new VectorDataViewType(NumberDataViewType.Single,
_numClasses
);
665
_types[SortedClassesCol] = new VectorDataViewType(key,
_numClasses
);
689
Host.Assert(
_numClasses
> 0);
690
ctx.Writer.Write(
_numClasses
);
691
for (int i = 0; i <
_numClasses
; i++)
721
var scoresArr = new float[
_numClasses
];
722
int[] sortedIndices = new int[
_numClasses
];
759
var editor = VBufferEditor.Create(ref dst,
_numClasses
);
760
for (int i = 0; i <
_numClasses
; i++)
773
var editor = VBufferEditor.Create(ref dst,
_numClasses
);
774
for (int i = 0; i <
_numClasses
; i++)
794
if (intLabel <
_numClasses
)
813
assignedColKeyValues.AddKeyValues(
_numClasses
, TextDataViewType.Instance, CreateKeyValueGetter());
819
sortedScores.AddSlotNames(
_numClasses
, CreateSlotNamesGetter(
_numClasses
, "Score"));
822
sortedClasses.AddSlotNames(
_numClasses
, CreateSlotNamesGetter(
_numClasses
, "Class"));
823
sortedClasses.AddKeyValues(
_numClasses
, TextDataViewType.Instance, CreateKeyValueGetter());
848
var editor = VBufferEditor.Create(ref dst,
_numClasses
);
849
for (int i = 0; i <
_numClasses
; i++)