4 writes to CategoricalSplitFeatures
Microsoft.ML.FastTree (4)
TreeEnsemble\InternalRegressionTree.cs (4)
111
CategoricalSplitFeatures
= new int[NumNodes][];
209
CategoricalSplitFeatures
= categoricalSplitFeatures;
285
CategoricalSplitFeatures
= new int[NumNodes][];
1043
CategoricalSplitFeatures
= new int[MaxNumNodes][];
54 references to CategoricalSplitFeatures
Microsoft.ML.FastTree (54)
FastTree.cs (1)
3315
_regTree.
CategoricalSplitFeatures
[nodeId].Select(feature => features[feature]));
RegressionTree.cs (3)
111
if (_tree.
CategoricalSplitFeatures
== null || _tree.
CategoricalSplitFeatures
[nodeIndex] == null)
114
return _tree.
CategoricalSplitFeatures
[nodeIndex];
TreeEnsemble\InternalRegressionTree.cs (50)
115
CategoricalSplitFeatures
[index] = buffer.ToIntArray(ref position);
210
CategoricalSplitFeatureRanges = new int[
CategoricalSplitFeatures
.Length][];
211
for (int i = 0; i <
CategoricalSplitFeatures
.Length; ++i)
213
if (
CategoricalSplitFeatures
[i] != null &&
CategoricalSplitFeatures
[i].Length > 0)
216
CategoricalSplitFeatureRanges[i][0] =
CategoricalSplitFeatures
[i].First();
217
CategoricalSplitFeatureRanges[i][1] =
CategoricalSplitFeatures
[i].Last();
292
CategoricalSplitFeatures
[index] = reader.ReadIntArray();
393
Contracts.Assert(
CategoricalSplitFeatures
[indexLocal] != null &&
394
CategoricalSplitFeatures
[indexLocal].Length > 0);
399
writer.WriteIntArray(
CategoricalSplitFeatures
[indexLocal]);
451
checker(
CategoricalSplitFeatures
!= null &&
452
(
CategoricalSplitFeatures
.Length == NumNodes ||
453
CategoricalSplitFeatures
.Length == numMaxNodes),
468
checker(
CategoricalSplitFeatures
[index] != null, "Categorical split features is null");
469
checker(
CategoricalSplitFeatures
[index].Length > 0,
479
for (int featureIndex = 0; featureIndex <
CategoricalSplitFeatures
[index].Length; featureIndex++)
481
checker(
CategoricalSplitFeatures
[index][featureIndex] > previous,
484
checker(
CategoricalSplitFeatures
[index][featureIndex] >=
486
CategoricalSplitFeatures
[index][featureIndex] <=
490
previous =
CategoricalSplitFeatures
[index][featureIndex];
514
(
CategoricalSplitFeatures
!= null ?
CategoricalSplitFeatures
.Select(thresholds => thresholds.SizeInBytes()).Sum() : 0) +
538
if (
CategoricalSplitFeatures
!= null)
541
for (int i = 0; i <
CategoricalSplitFeatures
.Length; i++)
543
CategoricalSplitFeatures
[i].ToByteArray(buffer, ref position);
855
Contracts.Assert(
CategoricalSplitFeatures
!= null);
858
foreach (var indices in
CategoricalSplitFeatures
[node])
888
Contracts.Assert(
CategoricalSplitFeatures
!= null);
891
foreach (var index in
CategoricalSplitFeatures
[node])
937
Contracts.Assert(
CategoricalSplitFeatures
!= null);
948
if (
CategoricalSplitFeatures
[node].TryFindIndexSorted(0,
CategoricalSplitFeatures
[node].Length, index, out int ii))
1040
if (categoricalSplit &&
CategoricalSplitFeatures
== null)
1049
CategoricalSplitFeatures
[indexOfNewNonLeaf] = categoricalSplitFeatures;
1140
Contracts.Assert(
CategoricalSplitFeatures
[n] != null);
1144
for (int i = 0; i <
CategoricalSplitFeatures
[n].Length; i++)
1145
CategoricalSplitFeatures
[n][i] = oldToNewFeatures[
CategoricalSplitFeatures
[n][i]];
1245
if (
CategoricalSplitFeatures
== null ||
1246
CategoricalSplitFeatures
.Length == 0 ||
1247
CategoricalSplitFeatures
.All(val => val == null))
1255
Contracts.Assert(
CategoricalSplitFeatures
.Length == NumNodes);
1257
for (int i = 0; i <
CategoricalSplitFeatures
.Length; ++i)
1266
int numNonLeaves =
CategoricalSplitFeatures
[i].Length;
1280
int categoricalSplitFeature =
CategoricalSplitFeatures
[i][n];
1548
Contracts.Assert(
CategoricalSplitFeatures
!= null);
1552
foreach (var index in
CategoricalSplitFeatures
[node])
1573
foreach (var index in
CategoricalSplitFeatures
[node])
1592
foreach (var index in
CategoricalSplitFeatures
[node])