f24ebe799c1fcd52ace755432a8444820595d730,imblearn/under_sampling/one_sided_selection.py,OneSidedSelection,_sample,#OneSidedSelection#Any#Any#,100

Before Change


            pred_S_y = knn.predict(S_x)

            // Find the misclassified S_y
            sel_x = np.squeeze(S_x[np.nonzero(pred_S_y != S_y), :])
            sel_y = S_y[np.nonzero(pred_S_y != S_y)]

            // If we need to offer support for the indices selected
            // We concatenate the misclassified samples with the seed and the
            // minority samples
            if self.return_indices:
                idx_tmp = np.nonzero(y == key)[0][np.nonzero(pred_S_y != S_y)]
                idx_under = np.concatenate((idx_under,
                                            idx_maj_sample,
                                            idx_tmp),

After Change


            // We concatenate the misclassified samples with the seed and the
            // minority samples
            if self.return_indices:
                idx_tmp = np.flatnonzero(y == key)[
                    np.flatnonzero(pred_S_y != S_y)]
                idx_under = np.concatenate((idx_under,
                                            idx_maj_sample,
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: scikit-learn-contrib/imbalanced-learn
Commit Name: f24ebe799c1fcd52ace755432a8444820595d730
Time: 2016-08-30
Author: g.lemaitre58@gmail.com
File Name: imblearn/under_sampling/one_sided_selection.py
Class Name: OneSidedSelection
Method Name: _sample


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


Project Name: scikit-learn-contrib/imbalanced-learn
Commit Name: f24ebe799c1fcd52ace755432a8444820595d730
Time: 2016-08-30
Author: g.lemaitre58@gmail.com
File Name: imblearn/under_sampling/edited_nearest_neighbours.py
Class Name: EditedNearestNeighbours
Method Name: _sample