Artificial Intelligence, Machine Learning, Math, Computer Science, Software Engineering.
1) synthetic[new_index][attr] = sample.iloc[i][attr] + gap * dif We move onto the next available index in our array and decrement N to indicate that we already considered one of the N/100 nearest neighbors. new_index += 1 N = N - 1 We obtain the nearest neighbors for a point in the original array