scikit-learn-contrib / boruta_py

Python implementations of the Boruta all-relevant feature selection method.
BSD 3-Clause "New" or "Revised" License
1.5k stars 256 forks source link

solved the NA issue in _assign_hits() #35

Closed tagomatech closed 6 years ago

tagomatech commented 6 years ago

Solved NA issue in the _assign_hits() function, reported by several users (https://github.com/scikit-learn-contrib/boruta_py/issues/30).

Message error RuntimeWarning: invalid value encountered in greater hits = np.where(cur_imp[0] > imp_sha_max)[0] was due to numpy comparison with NAs.

Fix was to remove any possible NAs from the cur_imp[0] numpy array. This fix has NO impact on the workings of the algorithm per se.

danielhomola commented 6 years ago

Thank you for this!