22 references to NumberOfLeaves
Microsoft.ML.FastTree (19)
RegressionTree.cs (6)
140
/// Number of leaves in the tree. Note that <see cref="
NumberOfLeaves
"/> does not take non-leaf nodes into account.
146
/// node0->leaf3, node1->leaf1, node1->leaf2, <see cref="NumberOfNodes"/> and <see cref="
NumberOfLeaves
"/> should
213
if (leafIndex < 0 || leafIndex >=
NumberOfLeaves
)
214
throw Contracts.Except($"The input leaf index, {leafIndex}, is invalid. Its valid range is from 0 (inclusive) to {
NumberOfLeaves
} (exclusive).");
229
if (leafIndex < 0 || leafIndex >=
NumberOfLeaves
)
230
throw Contracts.Except($"The input leaf index, {leafIndex}, is invalid. Its valid range is from 0 (inclusive) to {
NumberOfLeaves
} (exclusive).");
Utils\RegressionTreeBaseUtils.cs (13)
26
var numberOfRows = trees.Select(tree => tree.NumberOfNodes).Sum() + trees.Select(tree => tree.
NumberOfLeaves
).Sum();
44
treeWeightsList.AddRange(Enumerable.Repeat(treeWeights[i], trees[i].NumberOfNodes + trees[i].
NumberOfLeaves
));
47
treeId.AddRange(Enumerable.Repeat(i, trees[i].NumberOfNodes + trees[i].
NumberOfLeaves
));
51
isLeaf.AddRange(Enumerable.Repeat(new ReadOnlyMemory<char>("Leaf node".ToCharArray()), trees[i].
NumberOfLeaves
));
55
leftChild.AddRange(Enumerable.Repeat(0, trees[i].
NumberOfLeaves
));
59
rightChild.AddRange(Enumerable.Repeat(0, trees[i].
NumberOfLeaves
));
63
numericalSplitFeatureIndexes.AddRange(Enumerable.Repeat(0, trees[i].
NumberOfLeaves
));
67
numericalSplitThresholds.AddRange(Enumerable.Repeat(0f, trees[i].
NumberOfLeaves
));
71
categoricalSplitFlags.AddRange(Enumerable.Repeat(false, trees[i].
NumberOfLeaves
));
79
splitGains.AddRange(Enumerable.Repeat(0d, trees[i].
NumberOfLeaves
));
94
categoricalSplitFeatures.AddRange(Enumerable.Repeat(new VBuffer<int>(), trees[i].
NumberOfLeaves
));
95
categoricalCategoricalSplitFeatureRange.AddRange(Enumerable.Repeat(new VBuffer<int>(), trees[i].
NumberOfLeaves
));
126
for (int j = 0; j < quantileTrees[i].
NumberOfLeaves
; j++)
Microsoft.ML.IntegrationTests (2)
IntrospectiveTraining.cs (2)
57
Assert.Equal(5, tree.
NumberOfLeaves
);
101
Assert.Equal(5, tree.
NumberOfLeaves
);
Microsoft.ML.Tests (1)
TrainerEstimators\TreeEstimators.cs (1)
890
for (int j = 0; j < trees[i].
NumberOfLeaves
; j++)