This function generates synthetic examples using the SMOTE algorithm.
For each example in the minority class, this function generates synthetic examples by interpolating between the example and its k nearest neighbors. This function is used in the smote_classif
function.
fast_generate_synthetic(dat, k, n, p_code)
A data frame containing the generated synthetic examples.
A data.frame
object.
Number of nearest neighbors to consider.
Number of synthetic examples to generate.
Numeric code representing the distance metric to use:
p >= 1: p-norm
p = 0: Chebyshev
p = -1: Canberra
p = -2: Overlap (nominal attributes only)
p = -3: HEOM (Heterogeneous Euclidean-Overlap Metric)
p = -4: HVDM (Heterogeneous Value Difference Metric)
smote_classif