Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions boruta/boruta_py.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,13 @@ def _fit(self, X, y):
not_selected = np.setdiff1d(np.arange(n_feat), selected)
# large importance values should rank higher = lower ranks -> *(-1)
imp_history_rejected = imp_history[1:, not_selected] * -1
# if no features are rejected , returning importance_
if(0 in imp_history_rejected.shape):
if self.verbose > 0:
self._print_results(dec_reg, _iter, 1)

self.importance_ = imp_history[1:]
return self
# update rank for not_selected features
if not_selected.shape[0] > 0:
# calculate ranks in each iteration, then median of ranks across feats
Expand Down