scikit-learn-contrib / boruta_py

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

Early stopping support #94

Closed Yard1 closed 3 years ago

Yard1 commented 3 years ago

It is often possible that the algorithm will not be able to decide whether a feature is confirmed or rejected within the given amount of iterations - in that case, one can consider all of the iterations which do not change the final decisions as wasted. A solution to that problem is to introduce early stopping.

If the user sets early_stopping=True, then if the dec_reg array does not change for n_iter_no_change iterations (default 20), the loop will break. Whenever dec_reg changes, the counter for early stopping will be reset.

This feature will help in cases where time performance is a concern. The default behavior is unchanged.

danielhomola commented 3 years ago

This looks like a good feature, thanks a lot for taking the time to add it.