76 references to NumDocs
Microsoft.ML.FastTree (76)
Dataset\Dataset.cs (1)
944
Contracts.Assert(0 <= rowIndex && rowIndex < indexer._dataset.
NumDocs
);
FastTree.cs (2)
433
set.
NumDocs
, set.NumQueries, set.NumFeatures, datasetSize / 1024 / 1024, (datasetSize - skeletonSize) / 1024 / 1024);
863
double[] scores = new double[set.
NumDocs
];
FastTreeClassification.cs (1)
253
_trainSetLabels = GetClassificationLabelsFromRatings(TrainSet).ToArray(TrainSet.
NumDocs
);
FastTreeRanking.cs (5)
633
_scoresCopy = new double[Dataset.
NumDocs
];
634
_labelsCopy = new short[Dataset.
NumDocs
];
635
_groupIdToTopLabel = new short[Dataset.
NumDocs
];
961
_gainLabels = new double[Dataset.
NumDocs
];
962
for (int i = 0; i < Dataset.
NumDocs
; i++)
FastTreeRegression.cs (1)
177
Contracts.Assert(dlabels.Length == set.
NumDocs
);
FastTreeTweedie.cs (1)
190
Contracts.Assert(dlabels.Length == set.
NumDocs
);
GamTrainer.cs (4)
333
TrainSet.
NumDocs
,
398
DefineDocumentThreadBlocks(dataset.
NumDocs
, BlockingThreadPool.NumThreads, out int[] threadBlocks);
494
DefineDocumentThreadBlocks(TrainSet.
NumDocs
, BlockingThreadPool.NumThreads, out int[] trainThreadBlocks);
529
meanEffects[featureIndex] /= TrainSet.
NumDocs
;
RandomForestClassification.cs (1)
357
_trainSetLabels = TrainSet.Ratings.Select(x => x >= 1).ToArray(TrainSet.
NumDocs
);
RandomForestRegression.cs (1)
527
Contracts.Assert(_labels.Length == trainData.
NumDocs
);
Training\Applications\ObjectiveFunction.cs (2)
51
Gradient = new double[Dataset.
NumDocs
];
52
Weights = new double[Dataset.
NumDocs
];
Training\BaggingProvider.cs (4)
30
int[] trainDocs = new int[CompleteTrainingSet.
NumDocs
];
31
int[] outOfBagDocs = new int[CompleteTrainingSet.
NumDocs
];
99
int[] trainDocs = new int[CompleteTrainingSet.
NumDocs
];
100
int[] outOfBagDocs = new int[CompleteTrainingSet.
NumDocs
];
Training\DcgCalculator.cs (1)
505
int[] result = new int[dataset.
NumDocs
];
Training\DocumentPartitioning.cs (7)
55
: this(dataset.
NumDocs
, tree.NumLeaves)
62
int innerLoopSize = 1 + dataset.
NumDocs
/ BlockingThreadPool.NumThreads; // +1 is to make sure we don't have a few left over at the end
65
int numChunks = dataset.
NumDocs
/ innerLoopSize;
66
if (dataset.
NumDocs
% innerLoopSize != 0)
71
var actions = new Action[(int)Math.Ceiling(1.0 * dataset.
NumDocs
/ innerLoopSize)];
73
for (int docStart = 0; docStart < dataset.
NumDocs
; docStart += innerLoopSize)
76
var toDoc = Math.Min(docStart + innerLoopSize, dataset.
NumDocs
);
Training\EnsembleCompression\LassoBasedEnsembleCompressor.cs (4)
66
_numObservations = Math.Min(_trainSet.
NumDocs
, maxObservations);
82
if (_numObservations == _trainSet.
NumDocs
)
91
for (int d = 0; d < _trainSet.
NumDocs
; d++)
115
for (int d = 0; d < _trainSet.
NumDocs
; d++)
Training\OptimizationAlgorithms\ConjugateGradientDescent.cs (1)
18
_currentDk = new double[trainData.
NumDocs
];
Training\ScoreTracker.cs (6)
62
Scores = new double[Dataset.
NumDocs
];
68
if (initScores.Length != Dataset.
NumDocs
)
172
int innerLoopSize = 1 + Dataset.
NumDocs
/ BlockingThreadPool.NumThreads; // +1 is to make sure we don't have a few left over at the end
175
var actions = new Action[(int)Math.Ceiling(1.0 * Dataset.
NumDocs
/ innerLoopSize)];
177
for (int d = 0; d < Dataset.
NumDocs
; d += innerLoopSize)
180
var toDoc = Math.Min(d + innerLoopSize, Dataset.
NumDocs
);
Training\Test.cs (15)
348
Contracts.Check(scoreTracker.Dataset.
NumDocs
== labels.Length, "Mismatch between dataset and labels");
528
Contracts.Check(scoreTracker.Dataset.
NumDocs
== _labels.Length, "Mismatch between dataset and labels");
538
int chunkSize = 1 + Dataset.
NumDocs
/ BlockingThreadPool.NumThreads; // Minimizes the number of repeat computations in sparse array to have each thread take as big a chunk as possible
541
var actions = new Action[(int)Math.Ceiling(1.0 * Dataset.
NumDocs
/ chunkSize)];
543
for (int documentStart = 0; documentStart < Dataset.
NumDocs
; documentStart += chunkSize)
546
var endDoc = Math.Min(documentStart + chunkSize - 1, Dataset.
NumDocs
- 1);
574
result.Add(new TestResult("L1", totalL1Error, Dataset.
NumDocs
, true, TestResult.ValueOperator.Average));
577
result.Add(new TestResult("L2", totalL2Error, Dataset.
NumDocs
, true, TestResult.ValueOperator.SqrtAverage));
580
result.Add(new TestResult("L1", totalL1Error, Dataset.
NumDocs
, true, TestResult.ValueOperator.Average));
581
result.Add(new TestResult("L2", totalL2Error, Dataset.
NumDocs
, true, TestResult.ValueOperator.SqrtAverage));
602
Contracts.Check(scoreTracker.Dataset.
NumDocs
== binaryLabels.Length, "Mismatch between dataset and labels");
656
int chunkSize = 1 + Dataset.
NumDocs
/ BlockingThreadPool.NumThreads; // Minimizes the number of repeat computations in sparse array to have each thread take as big a chunk as possible
659
var actions = new Action[(int)Math.Ceiling(1.0 * Dataset.
NumDocs
/ chunkSize)];
661
for (int documentStart = 0; documentStart < Dataset.
NumDocs
; documentStart += chunkSize)
664
var endDoc = Math.Min(documentStart + chunkSize - 1, Dataset.
NumDocs
- 1);
Training\TreeLearners\LeastSquaresRegressionTreeLearner.cs (4)
355
if (Partitioning.NumDocs == TrainData.
NumDocs
)
847
_docIndicesCopy = _docIndices = new int[data.
NumDocs
];
848
Targets = new FloatType[data.
NumDocs
];
850
Weights = new double[data.
NumDocs
];
Training\TreeLearners\TreeLearner.cs (1)
21
Partitioning = new DocumentPartitioning(TrainData.
NumDocs
, numLeaves);
TreeEnsemble\InternalRegressionTree.cs (10)
996
double[] outputs = new double[dataset.
NumDocs
];
997
for (int d = 0; d < dataset.
NumDocs
; ++d)
1379
int innerLoopSize = 1 + dataset.
NumDocs
/ BlockingThreadPool.NumThreads; // +1 is to make sure we don't have a few left over at the end
1382
var actions = new Action[(int)Math.Ceiling(1.0 * dataset.
NumDocs
/ innerLoopSize)];
1384
for (int d = 0; d < dataset.
NumDocs
; d += innerLoopSize)
1387
var toDoc = Math.Min(d + innerLoopSize, dataset.
NumDocs
);
1404
int innerLoopSize = 1 + dataset.
NumDocs
/ BlockingThreadPool.NumThreads; // +1 is to make sure we don't have a few left over at the end
1407
var actions = new Action[(int)Math.Ceiling(1.0 * dataset.
NumDocs
/ innerLoopSize)];
1409
for (int d = 0; d < dataset.
NumDocs
; d += innerLoopSize)
1412
var toDoc = Math.Min(d + innerLoopSize, dataset.
NumDocs
);
TreeEnsemble\InternalTreeEnsemble.cs (4)
293
int innerLoopSize = 1 + dataset.
NumDocs
/ BlockingThreadPool.NumThreads; // minimize number of times we have to skip forward in the sparse arrays
296
var actions = new Action[(int)Math.Ceiling(1.0 * dataset.
NumDocs
/ innerLoopSize)];
298
for (int d = 0; d < dataset.
NumDocs
; d += innerLoopSize)
303
var toDoc = Math.Min(d + innerLoopSize, dataset.
NumDocs
);