cddf39be59c3c1231d2d4fd3b9bfc10a21e63780,imblearn/under_sampling/prototype_selection/neighbourhood_cleaning_rule.py,NeighbourhoodCleaningRule,_sample,#NeighbourhoodCleaningRule#Any#Any#,144

Before Change


        index_target_class = np.flatnonzero(selected_samples)

        if self.return_indices:
            return (X[index_target_class], y[index_target_class],
                    index_target_class)
        else:
            return X[index_target_class], y[index_target_class]

After Change


                    safe_indexing(y, index_target_class),
                    index_target_class)
        else:
            return (safe_indexing(X, index_target_class),
                    safe_indexing(y, index_target_class))
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

Instances


Project Name: scikit-learn-contrib/imbalanced-learn
Commit Name: cddf39be59c3c1231d2d4fd3b9bfc10a21e63780
Time: 2017-08-24
Author: g.lemaitre58@gmail.com
File Name: imblearn/under_sampling/prototype_selection/neighbourhood_cleaning_rule.py
Class Name: NeighbourhoodCleaningRule
Method Name: _sample


Project Name: scikit-learn-contrib/imbalanced-learn
Commit Name: cddf39be59c3c1231d2d4fd3b9bfc10a21e63780
Time: 2017-08-24
Author: g.lemaitre58@gmail.com
File Name: imblearn/under_sampling/prototype_selection/tomek_links.py
Class Name: TomekLinks
Method Name: _sample


Project Name: scikit-learn-contrib/imbalanced-learn
Commit Name: cddf39be59c3c1231d2d4fd3b9bfc10a21e63780
Time: 2017-08-24
Author: g.lemaitre58@gmail.com
File Name: imblearn/under_sampling/prototype_selection/random_under_sampler.py
Class Name: RandomUnderSampler
Method Name: _sample