1 write to TrainData
Microsoft.ML.FastTree (1)
Training\TreeLearners\TreeLearner.cs (1)
19TrainData = trainData;
42 references to TrainData
Microsoft.ML.FastTree (42)
Dataset\FeatureFlock.cs (16)
197int featureMin = learner.TrainData.FlockToFirstFeature(flock); 198int featureLim = featureMin + learner.TrainData.Flocks[flock].Count; 204Contracts.Assert(learner.TrainData.FlockToFirstFeature(flock) == feature - subfeature); 211double trust = learner.TrainData.Flocks[flock].Trust(subfeature); 335int featureMin = learner.TrainData.FlockToFirstFeature(flock); 336int featureLim = featureMin + learner.TrainData.Flocks[flock].Count; 380double trust = learner.TrainData.Flocks[flock].Trust(0); 403Contracts.Assert(learner.TrainData.FlockToFirstFeature(flock) == feature - subfeature); 515int featureMin = learner.TrainData.FlockToFirstFeature(flock); 516int featureLim = featureMin + learner.TrainData.Flocks[flock].Count; 547Contracts.Assert(learner.TrainData.FlockToFirstFeature(flock) == feature - subfeature); 600double trust = learner.TrainData.Flocks[flock].Trust(0); 711int featureMin = learner.TrainData.FlockToFirstFeature(flock); 712int featureLim = featureMin + learner.TrainData.Flocks[flock].Count; 743Contracts.Assert(learner.TrainData.FlockToFirstFeature(flock) == feature - subfeature); 822double trust = learner.TrainData.Flocks[flock].Trust(0);
Training\TreeLearners\LeastSquaresRegressionTreeLearner.cs (25)
144FindBestThresholdForFlockThreadWorker, TrainData.NumFlocks); 152histogramPool[i] = new SufficientStatsBase[TrainData.NumFlocks]; 153for (int j = 0; j < TrainData.NumFlocks; j++) 156var ss = histogramPool[i][j] = TrainData.Flocks[j].CreateSufficientStats(HasWeights); 162_sizeOfReservedMemory += (long)IntPtr.Size * TrainData.NumFlocks; 168MakeSplitCandidateArrays(TrainData, out SmallerChildSplitCandidates, out LargerChildSplitCandidates); 170FeatureUseCount = new int[TrainData.NumFeatures]; 181_parallelTraining.InitTreeLearner(TrainData, numLeaves, MaxCategoricalSplitPointsPerNode, ref MinDocsInLeaf); 298Contracts.Assert(TrainData.Flocks[bestSplitInfo.Flock] is OneHotFeatureFlock); 304int flockFirstFeatureIndex = TrainData.FlockToFirstFeature(bestSplitInfo.Flock); 314Partitioning.Split(bestLeaf, (TrainData.Flocks[bestSplitInfo.Flock] as OneHotFeatureFlock)?.Bins, CategoricalThresholds, gtChild); 317Partitioning.Split(bestLeaf, TrainData.GetIndexer(bestSplitInfo.Feature), bestSplitInfo.Threshold, gtChild); 335protected bool HasWeights => TrainData?.SampleWeights != null; 339return TrainData.SampleWeights; 355if (Partitioning.NumDocs == TrainData.NumDocs) 507int featureMin = TrainData.FlockToFirstFeature(flock); 508int featureLim = featureMin + TrainData.Flocks[flock].Count; 582Contracts.Assert(0 <= min && min <= lim && lim <= TrainData.NumFeatures); 661int featureMin = TrainData.FlockToFirstFeature(flock); 662int featureLim = featureMin + TrainData.Flocks[flock].Count; 674Contracts.Assert(0 <= flock && flock < TrainData.NumFlocks); 675Contracts.Assert(histogram.Flock == TrainData.Flocks[flock]); 677if (TrainData.Flocks[flock].Categorical && leafSplitCandidates.NumDocsInLeaf > 100) 718double trust = TrainData.Flocks[flock].Trust(subfeature); 743int numBin = TrainData.Flocks[flock].BinCount(subfeature);
Training\TreeLearners\TreeLearner.cs (1)
21Partitioning = new DocumentPartitioning(TrainData.NumDocs, numLeaves);