Discretisation

Feature-engine’s discretisation transformers transform continuous variables into discrete features. This is accomplished, in general, by sorting the variable values into continuous intervals.

Summary

Transformer

Functionality

EqualFrequencyDiscretiser()

Sorts values into intervals with similar number of observations.

EqualWidthDiscretiser()

Sorts values into intervals of equal size.

ArbitraryDiscretiser()

Sorts values into intervals predefined by the user.

DecisionTreeDiscretiser()

Replaces values by predictions of a decision tree, which are discrete

Additional transformers for discretisation

For discretisation using K-means, check Scikit-learn’s KBinsDiscretizer.