imbalanced-learn icon indicating copy to clipboard operation
imbalanced-learn copied to clipboard

Borderline SMOTE-2: how does itpick neighbours from the majority class using a KNN trained only on the minorty?

Open solegalli opened this issue 2 years ago • 0 comments

In Borderline SMOTE, the variant 2 is supposed to interpolate between the minority in danger and other neighbors from the minority, and then between the minority in danger and some neighbors from the majority.

In line we train a KNN only on the minority class and then derive the neighbors nns from it, which we use for the interpolation.

I understand using nns for borderline -1 and the first part of borderline-2.

But, then we use that nns to obtain the neighbors from the majority class in the second part of the borderline-2 code. But would not nns contain only neighbours from the minority? as it is derived from a knn trained only in the minority class?

Many thanks!

solegalli avatar Sep 09 '21 08:09 solegalli