0
$\begingroup$

I am using SMOTE in Python to perform oversampling of the minor class in an unbalanced dataset. I would like to know the way SMOTE formats its output, that is, whether SMOTE concatenates the newly generated samples to the end of the input data and returns that as the output or whether the new synthetic data points are positioned randomly among the input data points. I'd appreciate your help.

$\endgroup$
0
$\begingroup$

There is not that much package managing the under-/over-sampling in python. So if you are using imbalanced-learn, it will return a numpy array which concatenate the original imbalanced set with the generated new samples in the minority class.

$\endgroup$
1
  • $\begingroup$ I am indeed using the imbalanced-learn package, and that's what i got from the code. i just wanted to make sure that i correctly understood it. thanks for your help :) $\endgroup$ – darXider Jul 14 '16 at 13:09
1
$\begingroup$

SMOTE is an algorithm used to generate " synthesize" new samples from the real samples. It selects randomly one of the k-nearest neighbors, find the distance between these two pints , synthesize new point by modifying the sample considering the distance and a random number between 0 and 1. SMOTE algorithm does not use samples from majority class only samples from minority. It synthesizes new samples It expects a high density minor class with small variation within the class Anything else is related to the implementation, many implementation return only the synthesized samples

$\endgroup$
1
  • $\begingroup$ thanks! i am aware of the way SMOTE works, and my question was only with regard to the inner working of its Python implementation in the package imbalanced-learn. thanks for the description though. $\endgroup$ – darXider Jul 14 '16 at 13:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.