Skip to content

Commit

Permalink
Merge pull request #35 from tagomatech/master
Browse files Browse the repository at this point in the history
solved the NA issue in _assign_hits()
  • Loading branch information
danielhomola authored Nov 19, 2017
2 parents b5ab61f + e1ddfb9 commit 3657c00
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions boruta/boruta_py.py
Original file line number Diff line number Diff line change
Expand Up @@ -414,8 +414,9 @@ def _add_shadows_get_imps(self, X, y, dec_reg):
return imp_real, imp_sha

def _assign_hits(self, hit_reg, cur_imp, imp_sha_max):
# register hits for feautres that did better than the best of shadows
hits = np.where(cur_imp[0] > imp_sha_max)[0]
# register hits for features that did better than the best of shadows
cur_imp_no_nan = [val for val in cur_imp[0] if not np.isnan(val)]
hits = np.where(cur_imp_no_nan > imp_sha_max)[0]
hit_reg[hits] += 1
return hit_reg

Expand Down

0 comments on commit 3657c00

Please sign in to comment.