I\'m making an algorithm for feature selection in a binary classification which swipe through a np.array or pd.series to find intervals with good target division in a greedy