One small extension to KBinsDiscretizer is to allow the number of bins to be guessed by the estimator, using one of the strategies supported by np.histogram. We very possibly don't want to implement all of the options, but fd, sturges and auto might be appropriate.
However, I'm not actually sure how useful these estimates are in discretization, when they have been designed for visualisation. So a contribution would be best accompanied by an example that showed that this automatic determination was better for machine learning than a fixed number of bins across all features.
One small extension to KBinsDiscretizer is to allow the number of bins to be guessed by the estimator, using one of the strategies supported by
np.histogram. We very possibly don't want to implement all of the options, butfd,sturgesandautomight be appropriate.However, I'm not actually sure how useful these estimates are in discretization, when they have been designed for visualisation. So a contribution would be best accompanied by an example that showed that this automatic determination was better for machine learning than a fixed number of bins across all features.