Skip to content

Commit

Permalink
FIX SelectKBest
Browse files Browse the repository at this point in the history
  • Loading branch information
furkanmtorun authored Apr 3, 2023
1 parent 0debb0f commit db49723
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions omiclearn/utils/ml_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,11 @@ def select_features(feature_method, X, y, max_features, n_trees, random_state):

elif "k-best" in feature_method:
if feature_method == "k-best (mutual_info_classif)":
clf = SelectKBest(mutual_info_classif, max_features)
clf = SelectKBest(mutual_info_classif, k=max_features)
elif feature_method == "k-best (f_classif)":
clf = SelectKBest(f_classif, max_features)
clf = SelectKBest(f_classif, k=max_features)
elif feature_method == "k-best (chi2)":
clf = SelectKBest(chi2, max_features)
clf = SelectKBest(chi2, k=max_features)
else:
raise NotImplementedError(
"Feature method {} not implemented.".format(feature_method)
Expand Down

0 comments on commit db49723

Please sign in to comment.