Feature selection

Selection of features for modeling

DropZeroVariance

DropZeroVariance(self, inputs, *, tolerance=0.0001)

A step for removing columns with zero variance.

Parameters

Name Type Description Default
inputs SelectionType A selection of columns to analyze for zero variance. required
tolerance int | float Tolerance level for considering variance as zero. Columns with variance less than this tolerance will be removed. Default is 1e-4. 0.0001

Examples

>>> import ibis_ml as ml

To remove columns with zero variance:

>>> step = ml.DropZeroVariance(ml.everything())

To remove all numeric columns with zero variance:

>>> step = ml.DropZeroVariance(ml.numeric())

To remove all string or categorical columns with only one unique value:

>>> step = ml.DropZeroVariance(ml.nominal())
Back to top