Skip to content

Commit

Permalink
Merge pull request #38 from Saravji/Saravji-patch-1
Browse files Browse the repository at this point in the history
Update boruta_py.py
  • Loading branch information
danielhomola authored Jan 31, 2019
2 parents 52d504b + 06febb1 commit 47f6cd4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion boruta/boruta_py.py
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,8 @@ def _add_shadows_get_imps(self, X, y, dec_reg):

def _assign_hits(self, hit_reg, cur_imp, imp_sha_max):
# 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)]
cur_imp_no_nan = cur_imp[0]
cur_imp_no_nan[np.isnan(cur_imp_no_nan)] = 0
hits = np.where(cur_imp_no_nan > imp_sha_max)[0]
hit_reg[hits] += 1
return hit_reg
Expand Down

0 comments on commit 47f6cd4

Please sign in to comment.