37 references to NumNodes
Microsoft.ML.FastTree (37)
FastTree.cs (5)
3068for (int nodeIndex = 0; nodeIndex < tree.NumNodes; nodeIndex++) 3075nodesTrueNodeIds.Add(tree.LteChild[nodeIndex] < 0 ? ~tree.LteChild[nodeIndex] + tree.NumNodes : tree.LteChild[nodeIndex]); 3076nodesFalseNodeIds.Add(tree.GtChild[nodeIndex] < 0 ? ~tree.GtChild[nodeIndex] + tree.NumNodes : tree.GtChild[nodeIndex]); 3087int nodeIndex = tree.NumNodes + leafIndex; 3290public int NumNodes => _regTree.NumNodes;
RegressionTree.cs (7)
156public int NumberOfNodes => _tree.NumNodes; 162_lteChild = ImmutableArray.Create(_tree.LteChild, 0, _tree.NumNodes); 163_gtChild = ImmutableArray.Create(_tree.GtChild, 0, _tree.NumNodes); 165_numericalSplitFeatureIndexes = ImmutableArray.Create(_tree.SplitFeatures, 0, _tree.NumNodes); 166_numericalSplitThresholds = ImmutableArray.Create(_tree.RawThresholds, 0, _tree.NumNodes); 167_categoricalSplitFlags = ImmutableArray.Create(_tree.CategoricalSplit, 0, _tree.NumNodes); 169_splitGains = ImmutableArray.Create(_tree.SplitGains, 0, _tree.NumNodes);
TreeEnsemble\InternalRegressionTree.cs (24)
111CategoricalSplitFeatures = new int[NumNodes][]; 112CategoricalSplitFeatureRanges = new int[NumNodes][]; 113for (int index = 0; index < NumNodes; index++) 130bool[] categoricalSplit = new bool[NumNodes]; 134Contracts.Assert(indices.Length <= NumNodes); 138Contracts.Assert(index >= 0 && index < NumNodes); 147bool[] categoricalSplit = new bool[NumNodes]; 151Contracts.Assert(indices.Length <= NumNodes); 155Contracts.Assert(index >= 0 && index < NumNodes); 285CategoricalSplitFeatures = new int[NumNodes][]; 286CategoricalSplitFeatureRanges = new int[NumNodes][]; 290Contracts.Assert(index >= 0 && index < NumNodes); 298CategoricalSplit = new bool[NumNodes]; 377Contracts.Assert(CategoricalSplit.Length >= NumNodes); 380for (int index = 0; index < NumNodes; index++) 392Contracts.Assert(indexLocal >= 0 && indexLocal < NumNodes); 447(CategoricalSplit.Length == numMaxNodes || CategoricalSplit.Length == NumNodes), "bad categorical split length"); 452(CategoricalSplitFeatures.Length == NumNodes || 457(CategoricalSplitFeatureRanges.Length == NumNodes || 516NumNodes * sizeof(int) + 606/// <see cref="NumNodes"/> and <see cref="NumLeaves"/> should be 2 and 3, respectively. 630/// <param name="node">A 0-based index to specify a parent node. This value should be smaller than <see cref="NumNodes"/>.</param> 1255Contracts.Assert(CategoricalSplitFeatures.Length == NumNodes); 1347Contracts.Assert(-NumLeaves <= node && node < NumNodes);
TreeEnsemble\InternalTreeEnsemble.cs (1)
371for (int n = 0; n < tree.NumNodes; n++)