Interval Discretizer#

Assigns each continuous feature to a discrete category using equi-width histograms. Useful for converting continuous data to categorical.

Interfaces: Transformer, Stateful

Data Type Compatibility: Continuous


# Param Default Type Description
1 bins 5 int The number of bins (discrete categories) per continuous feature column.

Additional Methods#

Return the possible categories of each feature column:

public categories() : array

Return the intervals of each continuous feature column calculated during fitting:

public intervals() : array


use Rubix\ML\Transformers\IntervalDiscretizer;

$transformer = new IntervalDiscretizer(10);