Skip to content

feature_engine/smart-corr-model-performance-no-estimator

Pack Severity Fix Versions
Feature-engine error none, edit by hand All versions

SmartCorrelatedSelection(selection_method="model_performance") fits a scikit-learn estimator on each correlated feature group and raises ValueError at initialization when estimator is omitted or None.

sel = SmartCorrelatedSelection(selection_method="model_performance")
sel = SmartCorrelatedSelection(selection_method="model_performance", estimator=RandomForestClassifier(random_state=0))

Calls to SmartCorrelatedSelection with selection_method="model_performance" and no non-None estimator argument.

Pass a scikit-learn estimator via estimator=, or use a model-free selection_method such as "variance" or "missing_values".

SmartCorrelatedSelection(selection_method='model_performance') requires an estimator= and raises ValueError when estimator is None. Pass an estimator= or choose another selection_method.

See all rules in the Feature-engine pack.