paobranco / UBL

An R package for utility-based learning
32 stars 11 forks source link

SMOGN distances not accumulating #12

Closed neverfox closed 4 years ago

neverfox commented 4 years ago

Perhaps I'm missing something but it appears the distances of the numeric variables are not accumulating and only the distance of the last column is stored in d1 and d2 before moving on:

https://github.com/paobranco/UBL/blob/ce3789c7c1a8e8695519e20e3f00d9f2d2fa0a54/R/smoteRegress.R#L265

Shouldn't that be d1 <- d1 + abs(T[i, x] - newM[(i - 1) * nexs + n, x])/ranges[x]? Likewise for d2?

neverfox commented 4 years ago

Duplicate of #9