21 references to NumberOfNodes
Microsoft.ML.FastTree (13)
RegressionTree.cs (5)
108if (nodeIndex < 0 || nodeIndex >= NumberOfNodes) 109throw Contracts.Except($"The input index, {nodeIndex}, is invalid. Its valid range is from 0 (inclusive) to {NumberOfNodes} (exclusive)."); 125if (nodeIndex < 0 || nodeIndex >= NumberOfNodes) 126throw Contracts.Except($"The input node index, {nodeIndex}, is invalid. Its valid range is from 0 (inclusive) to {NumberOfNodes} (exclusive)."); 146/// node0->leaf3, node1->leaf1, node1->leaf2, <see cref="NumberOfNodes"/> and <see cref="NumberOfLeaves"/> should
Utils\RegressionTreeBaseUtils.cs (8)
26var numberOfRows = trees.Select(tree => tree.NumberOfNodes).Sum() + trees.Select(tree => tree.NumberOfLeaves).Sum(); 44treeWeightsList.AddRange(Enumerable.Repeat(treeWeights[i], trees[i].NumberOfNodes + trees[i].NumberOfLeaves)); 47treeId.AddRange(Enumerable.Repeat(i, trees[i].NumberOfNodes + trees[i].NumberOfLeaves)); 50isLeaf.AddRange(Enumerable.Repeat(new ReadOnlyMemory<char>("Tree node".ToCharArray()), trees[i].NumberOfNodes)); 74leafValues.AddRange(Enumerable.Repeat(0d, trees[i].NumberOfNodes)); 81for (int j = 0; j < trees[i].NumberOfNodes; j++) 124leafSamples.AddRange(Enumerable.Repeat(new VBuffer<double>(), quantileTrees[i].NumberOfNodes)); 125leafSampleWeights.AddRange(Enumerable.Repeat(new VBuffer<double>(), quantileTrees[i].NumberOfNodes));
Microsoft.ML.IntegrationTests (7)
IntrospectiveTraining.cs (7)
58Assert.Equal(4, tree.NumberOfNodes); 59Assert.Equal(tree.SplitGains.Count, tree.NumberOfNodes); 60Assert.Equal(tree.NumericalSplitThresholds.Count, tree.NumberOfNodes); 102Assert.Equal(4, tree.NumberOfNodes); 103Assert.Equal(tree.SplitGains.Count, tree.NumberOfNodes); 104Assert.Equal(tree.NumericalSplitThresholds.Count, tree.NumberOfNodes); 120for (int i = 0; i < finalTree.NumberOfNodes; ++i)
Microsoft.ML.Tests (1)
TrainerEstimators\TreeEstimators.cs (1)
883for (int j = 0; j < trees[i].NumberOfNodes; j++)