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: Categorical, Continuous, Image, Other
Parameters#
| # | Name | Default | Type | Description |
|---|---|---|---|---|
| 1 | bins | 5 | int | The number of bins per histogram. |
| 2 | equiWidth | false | bool | Should the bins be equal width? If not, they will be equal height. |
Example#
use Rubix\ML\Transformers\IntervalDiscretizer;
$transformer = new IntervalDiscretizer(8, false);
Additional Methods#
Return the bin intervals of the fitted data.
public intervals() : ?array