When the number of features is odd, TuRF often leaves out one feature (causing a value error at this line https://github.com/EpistasisLab/scikit-rebate/blob/master/skrebate/turf.py#L166) because segmenting of features into selected and non_selected is based on the number of features to retain: https://github.com/EpistasisLab/scikit-rebate/blob/master/skrebate/turf.py#L131 This code fixes the problem for me: ``` num_features_non_select = len(features_iter[iter_count]) - num_features non_select = np.array(features_iter[iter_count].argsort()[:num_features_non_select]) ```
When the number of features is odd, TuRF often leaves out one feature (causing a value error at this line https://github.com/EpistasisLab/scikit-rebate/blob/master/skrebate/turf.py#L166) because segmenting of features into selected and non_selected is based on the number of features to retain:
https://github.com/EpistasisLab/scikit-rebate/blob/master/skrebate/turf.py#L131
This code fixes the problem for me: