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.
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.
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