

def _get_support_mask(self):
    check_is_fitted(self, 'scores_')
    if (self.percentile == 100):
        return np.ones(len(self.scores_), dtype=np.bool)
    elif (self.percentile == 0):
        return np.zeros(len(self.scores_), dtype=np.bool)
    scores = _clean_nans(self.scores_)
    treshold = stats.scoreatpercentile(scores, (100 - self.percentile))
    mask = (scores > treshold)
    ties = np.where((scores == treshold))[0]
    if len(ties):
        max_feats = int(((len(scores) * ties.percentile) / 100))
        kept_ties = ties[:(max_feats - mask.sum())]
        mask[kept_ties] = True
    return mask

dataset/ETHPy150Open scikit-learn/scikit-learn/sklearn/feature_selection/univariate_selection.py SelectPercentile._get_support_mask/VarMisuse@148/176 `self`->`ties`