Add constant features treatment

This commit is contained in:
2023-10-13 13:35:24 +02:00
parent 7035cc4edc
commit 0fdd754050

View File

@@ -172,6 +172,10 @@ class MUFS:
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]