62 references to NumQueries
Microsoft.ML.FastTree (62)
Dataset\Dataset.cs (2)
157if (NumQueries == 0) 160_maxDocsPerQuery = Enumerable.Range(0, NumQueries).Select(NumDocsInQuery).Max();
FastTree.cs (1)
433set.NumDocs, set.NumQueries, set.NumFeatures, datasetSize / 1024 / 1024, (datasetSize - skeletonSize) / 1024 / 1024);
FastTreeRanking.cs (7)
578TrainQueriesTopLabels = new short[Dataset.NumQueries][]; 579for (int q = 0; q < Dataset.NumQueries; ++q) 582_labelCounts = new int[Dataset.NumQueries][]; 584for (int q = 0; q < Dataset.NumQueries; ++q) 592_inverseMaxDcgt = new double[Dataset.NumQueries]; 593for (int q = 0; q < Dataset.NumQueries; ++q) 599for (int q = 0; q < Dataset.NumQueries; ++q)
Training\Applications\ObjectiveFunction.cs (3)
63var actions = new Action[(int)Math.Ceiling((double)Dataset.NumQueries / QueryThreadChunkSize)]; 67for (int q = 0; q < Dataset.NumQueries; q += QueryThreadChunkSize) 74GetGradientChunk(start, start + Math.Min(QueryThreadChunkSize, Dataset.NumQueries - start), GradSamplingRate, sampleIndex, threadIndex);
Training\BaggingProvider.cs (7)
35for (int i = 0; i < CompleteTrainingSet.NumQueries; i++) 104int[] tmpTrainQueryIndices = new int[CompleteTrainingSet.NumQueries]; 105bool[] selectedTrainQueries = new bool[CompleteTrainingSet.NumQueries]; 108for (int i = 0; i < CompleteTrainingSet.NumQueries; i++) 126int outOfBagQueriesCount = CompleteTrainingSet.NumQueries - qIdx; 128var currentTrainQueryIndices = new int[CompleteTrainingSet.NumQueries - outOfBagQueriesCount]; 133for (int q = 0; q < CompleteTrainingSet.NumQueries; q++)
Training\DcgCalculator.cs (19)
166Parallel.ForEach(Enumerable.Range(0, dataset.NumQueries).Where(query => maxDCG3[query] > 0), 174return _result / dataset.NumQueries; 267Parallel.ForEach(Enumerable.Range(0, dataset.NumQueries).Where(query => maxDCG1[query] > 0), 275return _result / dataset.NumQueries; 285for (int query = 0; query < dataset.NumQueries; ++query) 296return result / dataset.NumQueries; 306for (int query = 0; query < dataset.NumQueries; ++query) 313return result * DiscountMap[0] / dataset.NumQueries; 368int chunkSize = 1 + dataset.NumQueries / BlockingThreadPool.NumThreads; // Minimizes the number of repeat computations in sparse array to have each thread take as big a chunk as possible 371var actions = new Action[(int)Math.Ceiling(1.0 * dataset.NumQueries / chunkSize)]; 373for (int q = 0; q < dataset.NumQueries; q += chunkSize) 379NdcgRangeWorkerChunkFromScores(dataset, labels, scores, result, start, Math.Min(dataset.NumQueries - start, chunkSize), threadIndex); 387result[t] /= dataset.NumQueries; 474double[] result = new double[dataset.NumQueries]; 477for (int q = 0; q < dataset.NumQueries; ++q) 507int chunkSize = 1 + dataset.NumQueries / BlockingThreadPool.NumThreads; // Minimizes the number of repeat computations in sparse array to have each thread take as big a chunk as possible 510var actions = new Action[(int)Math.Ceiling(1.0 * dataset.NumQueries / chunkSize)]; 512for (int q = 0; q < dataset.NumQueries; q += chunkSize) 518OrderingRangeWorkerFromScores(dataset, scores, result, start, Math.Min(dataset.NumQueries - start, chunkSize), threadIndex);
Training\Test.cs (18)
359result.Add(new TestResult("NDCG@" + (i + 1).ToString(), ndcg[i] * Dataset.NumQueries, Dataset.NumQueries, false, TestResult.ValueOperator.Average)); 411new TestResult("NDCG@" + NdcgTruncation.ToString(), fastNdcg * Dataset.NumQueries, Dataset.NumQueries, false, TestResult.ValueOperator.Average), 454new TestResult("NDCG@" + NdcgTruncation.ToString(), fastNdcg * Dataset.NumQueries, Dataset.NumQueries, false, TestResult.ValueOperator.Average), 486new TestResult("Surplus@100", surplus[0] * _scaleFactor * Dataset.NumQueries, Dataset.NumQueries, false, TestResult.ValueOperator.Average), 487new TestResult("Surplus@200", surplus[1] * _scaleFactor * Dataset.NumQueries, Dataset.NumQueries, false, TestResult.ValueOperator.Average), 488new TestResult("Surplus@300", surplus[2] * _scaleFactor * Dataset.NumQueries, Dataset.NumQueries, false, TestResult.ValueOperator.Average), 489new TestResult("Surplus@400", surplus[3] * _scaleFactor * Dataset.NumQueries, Dataset.NumQueries, false, TestResult.ValueOperator.Average), 490new TestResult("Surplus@500", surplus[4] * _scaleFactor * Dataset.NumQueries, Dataset.NumQueries, false, TestResult.ValueOperator.Average), 491new TestResult("Surplus@1000", surplus[5] * _scaleFactor * Dataset.NumQueries, Dataset.NumQueries, false, TestResult.ValueOperator.Average),
Training\WinLossCalculator.cs (5)
50int chunkSize = 1 + dataset.NumQueries / BlockingThreadPool.NumThreads; // Minimizes the number of repeat computations in sparse array to have each thread take as big a chunk as possible 53var actions = new Action[(int)Math.Ceiling(1.0 * dataset.NumQueries / chunkSize)]; 56for (int q = 0; q < dataset.NumQueries; q += chunkSize) 61WinLossRangeWorkerChunkFromScores(dataset, labels, scores, result, start, Math.Min(dataset.NumQueries - start, chunkSize), threadIndex)); 66result[t] /= dataset.NumQueries;