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))What the rule reports
Section titled “What the rule reports”Calls to SmartCorrelatedSelection with selection_method="model_performance" and no non-None estimator argument.
How to fix it
Section titled “How to fix it”Pass a scikit-learn estimator via estimator=, or use a model-free selection_method such as "variance" or "missing_values".
Diagnostic message
Section titled “Diagnostic message”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.