Implement QuantileBinner(n_bins):
fit(x): store the interior cut points np.quantile(x, [1/n, 2/n, ..., (n-1)/n])transform(x): bin index 0 .. n_bins-1 for each value, where a value equal to a cut point goes to the upper bin (use np.searchsorted(..., side='right'))Bins then hold roughly equal numbers of training points.