The lab’s six minority rows include the source’s three points. For x = (1.0, 2.0) the nearest minority neighbours, sorted, are (0.8, 1.4), (1.7, 2.1), (1.5, 2.5) — with distances 0.632, 0.707 and 0.707.
Example A — choose (1.5, 2.5), t = 0.4:
step = t · (neighbour − x)
= 0.4 · (0.5, 0.5) = (0.2, 0.2)
new = (1.0, 2.0) + (0.2, 0.2) = (1.20, 2.20) ← the docs' point
distance from x = 0.4 · 0.707 = 0.283, so new sits 40% of the way.
Example B — choose (1.0, 2.0) from x = (2.0, 1.5), t = 0.75:
step = 0.75 · (−1.0, 0.5) = (−0.75, 0.375)
new = (2.0, 1.5) + (−0.75, 0.375) = (1.25, 1.875)
parent gap = √(1² + 0.5²) = 1.118, travelled 0.75 · 1.118 = 0.838.
k is capped at n_minority − 1: six rows allow k ≤ 5, and fewer than
two minority rows means SMOTE cannot run at all.
Compare with duplication: random oversampling of x would produce (1.0, 2.0) again, ten times. SMOTE produces a family of distinct points along the segment, which gives the model a region rather than a set of repeated coordinates.