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)
622if (schema[ScoreIndex].HasSlotNames(_numClasses)) 626_classNames = new ReadOnlyMemory<char>[_numClasses]; 630_classNames = Utils.BuildArray(_numClasses, i => i.ToString().AsMemory()); 632var key = new KeyDataViewType(typeof(uint), _numClasses); 635_types[SortedScoresCol] = new VectorDataViewType(NumberDataViewType.Single, _numClasses); 636_types[SortedClassesCol] = new VectorDataViewType(key, _numClasses); 650Host.CheckDecode(_numClasses > 0); 653_classNames = new ReadOnlyMemory<char>[_numClasses]; 654for (int i = 0; i < _numClasses; i++) 658_classNames = Utils.BuildArray(_numClasses, i => i.ToString().AsMemory()); 661var key = new KeyDataViewType(typeof(uint), _numClasses); 664_types[SortedScoresCol] = new VectorDataViewType(NumberDataViewType.Single, _numClasses); 665_types[SortedClassesCol] = new VectorDataViewType(key, _numClasses); 689Host.Assert(_numClasses > 0); 690ctx.Writer.Write(_numClasses); 691for (int i = 0; i < _numClasses; i++) 721var scoresArr = new float[_numClasses]; 722int[] sortedIndices = new int[_numClasses]; 759var editor = VBufferEditor.Create(ref dst, _numClasses); 760for (int i = 0; i < _numClasses; i++) 773var editor = VBufferEditor.Create(ref dst, _numClasses); 774for (int i = 0; i < _numClasses; i++) 794if (intLabel < _numClasses) 813assignedColKeyValues.AddKeyValues(_numClasses, TextDataViewType.Instance, CreateKeyValueGetter()); 819sortedScores.AddSlotNames(_numClasses, CreateSlotNamesGetter(_numClasses, "Score")); 822sortedClasses.AddSlotNames(_numClasses, CreateSlotNamesGetter(_numClasses, "Class")); 823sortedClasses.AddKeyValues(_numClasses, TextDataViewType.Instance, CreateKeyValueGetter()); 848var editor = VBufferEditor.Create(ref dst, _numClasses); 849for (int i = 0; i < _numClasses; i++)