37 references to NumNodes
Microsoft.ML.FastTree (37)
FastTree.cs (5)
3068
for (int nodeIndex = 0; nodeIndex < tree.
NumNodes
; nodeIndex++)
3075
nodesTrueNodeIds.Add(tree.LteChild[nodeIndex] < 0 ? ~tree.LteChild[nodeIndex] + tree.
NumNodes
: tree.LteChild[nodeIndex]);
3076
nodesFalseNodeIds.Add(tree.GtChild[nodeIndex] < 0 ? ~tree.GtChild[nodeIndex] + tree.
NumNodes
: tree.GtChild[nodeIndex]);
3087
int nodeIndex = tree.
NumNodes
+ leafIndex;
3290
public int NumNodes => _regTree.
NumNodes
;
RegressionTree.cs (7)
156
public 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)
111
CategoricalSplitFeatures = new int[
NumNodes
][];
112
CategoricalSplitFeatureRanges = new int[
NumNodes
][];
113
for (int index = 0; index <
NumNodes
; index++)
130
bool[] categoricalSplit = new bool[
NumNodes
];
134
Contracts.Assert(indices.Length <=
NumNodes
);
138
Contracts.Assert(index >= 0 && index <
NumNodes
);
147
bool[] categoricalSplit = new bool[
NumNodes
];
151
Contracts.Assert(indices.Length <=
NumNodes
);
155
Contracts.Assert(index >= 0 && index <
NumNodes
);
285
CategoricalSplitFeatures = new int[
NumNodes
][];
286
CategoricalSplitFeatureRanges = new int[
NumNodes
][];
290
Contracts.Assert(index >= 0 && index <
NumNodes
);
298
CategoricalSplit = new bool[
NumNodes
];
377
Contracts.Assert(CategoricalSplit.Length >=
NumNodes
);
380
for (int index = 0; index <
NumNodes
; index++)
392
Contracts.Assert(indexLocal >= 0 && indexLocal <
NumNodes
);
447
(CategoricalSplit.Length == numMaxNodes || CategoricalSplit.Length ==
NumNodes
), "bad categorical split length");
452
(CategoricalSplitFeatures.Length ==
NumNodes
||
457
(CategoricalSplitFeatureRanges.Length ==
NumNodes
||
516
NumNodes
* 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>
1255
Contracts.Assert(CategoricalSplitFeatures.Length ==
NumNodes
);
1347
Contracts.Assert(-NumLeaves <= node && node <
NumNodes
);
TreeEnsemble\InternalTreeEnsemble.cs (1)
371
for (int n = 0; n < tree.
NumNodes
; n++)