Data Relocation (DatRel, 2025)
DatRel.RdDatRel (Saglam, 2025) is a post-processing method for
synthetic samples. Synthetic samples that fall outside the region covered by
their class are moved back into it. The synthetic samples can come from any
oversampling method; DatRel only needs the original data and the
synthetic data.
Arguments
- x
feature matrix of the original data.
- y
a factor class variable of the original data. Can have more than two classes.
- x_syn
feature matrix of the synthetic samples.
- y_syn
factor (or vector) with the class of each synthetic sample. Every class is relocated against the union of the other classes (one-versus-rest), so any number of classes is allowed.
- proportion
proportion of the samples of a class that has to be covered by the dominating balls. Default is 1 (all samples).
- p_of
overflow proportion: the radii of the balls are multiplied by
1 + p_of, so the synthetic samples may stay slightly outside of the class region. Default is 0.
Value
a list with
- x_new
Original data followed by the relocated synthetic samples.
- y_new
Class variable of
x_new.- x_syn
Relocated synthetic samples, in the order of the input.
- y_syn
Classes of the synthetic samples.
- i_dominant, x_dominant, radii_dominant, cover_proportion, n_relocated
Lists with one element per class that has synthetic samples: indices and coordinates of the dominating samples, radii of their balls, proportion of the class covered, and the number of relocated samples.
Details
Year: 2025. For every class a ball is placed around each sample
whose radius is the distance to the nearest sample of the other classes
(times 1 + p_of), so that the ball contains no sample of another
class. A small set of dominating samples whose balls cover the class (pure
and proper class cover catch digraph, PCCCD) is selected greedily; the cover
algorithm is the C++ implementation of the rcccd package, which
is included here (the imbalanceDatRel package is not needed any more). Each synthetic sample is
assigned to the dominating ball of its class with the smallest ratio of
distance to radius. If it is outside that ball, it is moved onto the border
of the ball along the line to the dominating sample.