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