DropConstantColumns#

class sdm.processing.numerical.DropConstantColumns(*, threshold: int = 1)#

Bases: EnsembleProcessor

Remove non-informative numerical columns learned during fit.

Columns are retained when they have more than threshold distinct values. When the number of samples is less than or equal to threshold, all columns are preserved. NaN is counted once as a distinct value.

Only numerical columns are supported. Convert other feature stypes before this step, for example with ToNumerical. Fitting expects data with shape [N, C], where N is the number of rows and C is the number of numerical columns. The learned selection can transform later tables with shape [..., C].

Parameters:

threshold (int) – Columns with at most this many unique values are removed. Must be positive.

Capabilities#

Handled Semantic Types

numerical

Requires Fitting

✅