8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
scikit-learn/sklearn/feature_selection/univariate_selection.py line 577:
def _get_support_mask(self): check_is_fitted(self, 'scores_') n_features = len(self.pvalues_) sv = np.sort(self.pvalues_) # here selected = sv[sv <= float(self.alpha) / n_features * np.arange(n_features)] if selected.size == 0: return np.zeros_like(self.pvalues_, dtype=bool) return self.pvalues_ <= selected.max()
Should Be:
selected = sv[sv <= float(self.alpha) / n_features * (np.arange(n_features) + 1)]
Because np.arange is start from 0, here it should be start from 1
The text was updated successfully, but these errors were encountered:
@bthirion any comment?
Sorry, something went wrong.
It does seem a bit of a harsh criterion!
consider the first element
hi @jnothman any more comments
I agree with the comment.
So I suppose we mark this as a (long-standing) bug and fix it without notice?
Successfully merging a pull request may close this issue.
Description
scikit-learn/sklearn/feature_selection/univariate_selection.py line 577:
Should Be:
Because np.arange is start from 0, here it should be start from 1
The text was updated successfully, but these errors were encountered: