Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate RegFeatureSelector and the sub-methods it calls. #10

Merged
merged 1 commit into from
Feb 3, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions dfds_ds_toolbox/feature_selection/feat_selector.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@
from sklearn.linear_model import Lasso
from sklearn.metrics import mean_absolute_error
from sklearn.model_selection import ShuffleSplit
from sklearn.utils import deprecated


@deprecated("Use sklearn.feature_selection.SequentialFeatureSelector instead.")
def stepwise_selection(
X: pd.DataFrame,
y: np.array,
Expand Down Expand Up @@ -86,6 +88,7 @@ def stepwise_selection(
return included


@deprecated("Use sklearn.feature_selection.SelectFromModel instead.")
def rf_prim_columns(
X: pd.DataFrame, y: pd.Series, n_trees: int = 10, top_cols: int = 10
) -> Tuple[pd.DataFrame, List[float]]:
Expand Down Expand Up @@ -149,6 +152,7 @@ def rf_prim_columns(
return (cols_df, score_list)


@deprecated("Use sklearn.feature_selection module instead.")
class RegFeatureSelector:
"""Selects useful features.

Expand Down