Fast Correlation-Based Filter #

class feasel.f_mFCBF.ModifiedFastCorrFS(dataset: ndarray, target: ndarray, n_features: int | None = None, threshold: float = 0.01, verbose: int = 0)

Bases: FeaselBase

__init__(dataset: ndarray, target: ndarray, n_features: int | None = None, threshold: float = 0.01, verbose: int = 0)

Implements the modified Fast Correlation Based Feature Selection found in “Fast Correlation Based Filter (FCBF) with a different search strategy” by Senliol et al. http://dx.doi.org/10.1109/ISCIS.2008.4717949

Parameters:
  • dataset (np.ndarray) – Dataset of size (n_samples, n_features).

  • target (np.ndarray) – Target vector of size (n_samples,).

  • n_features (int) – Number of features to select. If None, returns with a filtered feature order similar to FCBF. Default value is None.

  • threshold (float) – Threshold for initial filtering. Default value is 0.01.

  • verbose (int) – Verbosity. 0: no output; 1: prints execution time, selected feature and metric; 2: prints every step. Recommend turning off parallel execution when verbose is 2. Note that increased verbosity affects execution time. Default value is 0.

Variables:
  • _flags – Dictionary of flags describing the capabilities of the algorithm.

  • _measures_used – Set of measure names used in the algorithm.

Returns:

None

Return type:

None

transform() tuple[set[int], ndarray[int], float]

Applies the algorithm.

Returns:

Selected feature index or indices, ordered selection, execution time; tuple of size (3,).

Return type:

tuple[set[int], np.ndarray[int], float]