Relocating Safe-Level SMOTE (RSLSMOTE, 2016)
RSLSMOTE.RdThe Relocating Safe-Level SMOTE (RSLS) algorithm improves the quality of synthetic samples generated by Safe-Level SMOTE (SLS) by relocating specific synthetic data points that are too close to the majority class distribution towards the original minority class distribution in the feature space.
Arguments
- x
feature matrix or data.frame.
- y
a factor class variable. Can have more than two classes.
- k1
number of neighbors to link. Default is 5.
- k2
number of neighbors to determine safe levels. Default is 5.
- ovRate
Oversampling rate. Class \(j\) receives
round(ovRate * (n_max - n_j))synthetic samples, wheren_maxis the size of the largest class (halves are rounded up). Default is 1 meaning full balance. A vector with one value per class is also accepted.
Value
a list with resampled dataset.
- x_new
Resampled feature matrix.
- y_new
Resampled target variable.
- x_syn
Generated synthetic data.
- C
Number of synthetic samples for each positive class samples.
Details
Year: 2016.
In Safe-level SMOTE (SLS), a safe-level threshold is used to control the number of synthetic samples generated from each minority instance. This threshold is calculated based on the number of minority and majority instances in the local neighborhood of each minority instance. SLS generates synthetic samples that are located closer to the original minority class distribution in the feature space.
In Relocating safe-level SMOTE (RSLS), after generating synthetic samples using the SLS algorithm, the algorithm relocates specific synthetic data points that are deemed to be too close to the majority class distribution in the feature space. The relocation process moves these synthetic data points towards the original minority class distribution in the feature space.
This relocation process is performed by first identifying the synthetic data points that are too close to the majority class distribution. Then, for each identified synthetic data point, the algorithm calculates a relocation vector based on the distance between the synthetic data point and its k nearest minority class instances. This relocation vector is used to move the synthetic data point towards the minority class distribution in the feature space.
Can work with classes more than 2.

