bartz.prepcovars.RangeEvenBinner¶
- class bartz.prepcovars.RangeEvenBinner(X, *, max_bins=256, key=None)[source]¶
Binner with cutpoints evenly spaced over the observed range.
For each predictor,
max_bins - 1cutpoints are placed at equally spaced positions strictly between the minimum and the maximum value observed in the training matrix. All predictors use the same number of cutpoints.- Parameters:
- max_split: UInt[Array, 'p']¶
The number of cutpoints actually used for each of the
ppredictors.
- bin(X)[source]¶
Map predictors to bin indices using the cutpoints chosen at construction.
- Parameters:
X (
Real[Array, 'p n']) – A matrix withppredictors andnobservations. Must have the same number of predictors as the training matrix passed to the constructor.- Returns:
UInt[Array, 'p n']– QuantizedXwith minimal data type.