Skip to main content

Module sequential_feature_selector

Module sequential_feature_selector 

Source
Expand description

Sequential feature selection via forward or backward search.

SequentialFeatureSelector greedily adds (forward) or removes (backward) features one at a time, evaluating each candidate subset with a user-supplied scoring callback.

§Algorithm

Forward: Start with an empty feature set. At each step, try adding each remaining feature, evaluate the score, and keep the addition that yields the highest score. Repeat until n_features_to_select features have been selected.

Backward: Start with all features. At each step, try removing each remaining feature, evaluate the score, and keep the removal that yields the highest score. Repeat until n_features_to_select features remain.

Structs§

FittedSequentialFeatureSelector
A fitted sequential feature selector holding the selected feature indices.
SequentialFeatureSelector
A greedy sequential feature selector.

Enums§

Direction
Search direction for SequentialFeatureSelector.