public Tree BuildTree() { if (InstancesAreSameClass || Instances.All(f => f.Features.Count() == 1)) { return(LeafTreeForRemainingFeatures()); } var best = Decider.SelectBestAxis(this); return(SplitByAxis(best)); }
private Tree LeafTreeForRemainingFeatures() { if (InstancesAreSameClass) { return(GroupByClass()); } if (Instances.All(f => f.Features.Count() == 1)) { return(LeafForEachFeature()); } return(null); }