myfm.utils.encoders.BinningEncoder¶
- class myfm.utils.encoders.BinningEncoder(x: object, n_percentiles: int = 10)[source]¶
Bases:
myfm.utils.encoders.base.SparseEncoderBase
The class to one-hot encode a List of numerical values into a sparse matrix representation by binning.
- __init__(x: object, n_percentiles: int = 10) None [source]¶
Initializes the encoder by compting the percentile values of input.
- Parameters
x – list of numerical values.
n_percentiles – number of percentiles computed against x, by default 10.
Methods
__init__
(x[, n_percentiles])Initializes the encoder by compting the percentile values of input.
names
()Description of each non-zero entry.
to_sparse
(x)