Skip to content

Commit

Permalink
Add constant features treatment
Browse files Browse the repository at this point in the history
  • Loading branch information
rmontanana committed Oct 13, 2023
1 parent 7035cc4 commit 0fdd754
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions mufs/Selection.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,10 @@ def cfs(self, X, y):
id_selected = idx
merit = merit_new
candidates.pop()
if id_selected is None:
# No more features to add all merits are nan because of
# constant features
break
candidates.append(feature_order[id_selected])
self._scores.append(merit)
del feature_order[id_selected]
Expand Down

0 comments on commit 0fdd754

Please sign in to comment.