Skip to content

Commit

Permalink
Update mlxtend/feature_selection/exhaustive_feature_selector.py
Browse files Browse the repository at this point in the history
Co-authored-by: Peter Gedeck <[email protected]>
  • Loading branch information
rasbt and gedeck authored Nov 11, 2024
1 parent 51c4114 commit d21c0f5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion mlxtend/feature_selection/exhaustive_feature_selector.py
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,11 @@ def ncr(n, r):
return self

def finalize_fit(self):
max_score = -np.inf
if np.__version__ < "2.0":
ninf = np.NINF
else:
ninf = -np.inf
max_score = ninf
for c in self.subsets_:
if self.subsets_[c]["avg_score"] > max_score:
best_subset = c
Expand Down

0 comments on commit d21c0f5

Please sign in to comment.