The full SMOTE step repeats three things: pick a minority sample, pick one of its nearest minority neighbors, and create a point between them. Repeating this builds up the minority class without copying existing rows.
Implement smote_oversample(X, n_new, k, rng), which creates n_new synthetic minority samples by interpolating random neighbor pairs.
k nearest neighbors, excluding the sample itself.Draw a sample index, sort its distances to find neighbors (skipping the first, which is itself), draw a neighbor, draw u, then interpolate.
No results yet
Run your code to check it against the examples, or submit to run every test.