Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SmoteRegress - Oversampling - Weights of targets might be wrong #9

Open
cosnova-yannik opened this issue Jan 7, 2020 · 1 comment

Comments

@cosnova-yannik
Copy link

UBL/R/smoteRegress.R

Lines 228 to 232 in e796812

d1 <- d2 <- 0
for(x in (1:nC)[-c(nomatr, tgt)]) {
d1 <- abs(T[i,x] - new[(i-1)*nexs+n,x])/ranges[x]
d2 <- abs(T[kNNs[i,neig],x] - new[(i-1)*nexs+n,x])/ranges[x]
}

This part of the code does not seem to be correct, because d1 and d2 are overwritten in every iteration of the loop. Am I mistaken?

@neverfox
Copy link

neverfox commented Jul 2, 2020

Ah I just reported this. I think you are correct. That pretty much makes the results completely untrustworthy until this is fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants