Exact tree search checks boundaries between every distinct feature value. On large continuous datasets that means far too many candidates per node. Histogram search limits each feature to a fixed set of evenly spaced bin boundaries, trading a little precision for predictable work.
Implement build_histogram and find_best_split_histogram, using the same information-gain score as exact trees but only interior bin edges as thresholds.
build_histogram returns exactly n_bins + 1 edges from values.min() to values.max().n_bins - 1 interior candidate thresholds.None.information_gain and preserve its label partitioning.Open one at a time. Each gives away a little more than the last.
An interval count needs one more edge than the number of intervals.
edges[1:-1] removes the endpoints that would put all samples on one side.
No results yet
Run your code to check it against the examples, or submit to run every test.