CorrelationFilter

Note

This page is a reference documentation. It only explains the class signature, and not how to use it. Please refer to the Habitat Guide and Python API guide (v2.0) for usage.

class CorrelationFilter(corr_threshold: float = 0.95, corr_method: str = 'spearman')[source]

Bases: object

Greedily drop redundant, highly correlated feature columns.

Radiomics feature families are strongly collinear; keeping one representative per correlated group cuts dimensionality without losing discriminative content. The left-to-right walk makes the surviving subset deterministic.

Parameters:
  • corr_threshold – Absolute-correlation cut-off above which later columns are dropped.

  • corr_method – pearson, spearman or kendall.

__init__(corr_threshold: float = 0.95, corr_method: str = 'spearman') → None[source]
property spec: Spec

Return the algorithm specification.

fit(block: DataFrame) → Dict[str, Any][source]

Learn the surviving column subset.

Parameters:

block – Unit-by-feature matrix to learn from.

Returns:

State naming the columns to keep.

transform(block: DataFrame, state: Mapping[str, Any]) → DataFrame[source]

Restrict the matrix to the learned columns.

Parameters:
  • block – Matrix to transform.

  • state – State from fit().

Returns:

The matrix with only the surviving columns.