Skip to content


Interval Discretizer#

Assigns continuous features to ordered categories using variable width per-feature histograms with a fixed user-specified number of bins.

Interfaces: Transformer, Stateful, Persistable

Data Type Compatibility: Continuous


# Name Default Type Description
1 bins 5 int The number of bins per histogram.
2 equiWidth false bool Should the bins be equal width?


use Rubix\ML\Transformers\IntervalDiscretizer;

$transformer = new IntervalDiscretizer(8, false);

Additional Methods#

Return the bin intervals of the fitted data:

public intervals() : array