-
Notifications
You must be signed in to change notification settings - Fork 11
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
AdasynClassif - Error in matrix(nrow = sum(unlist(g)), ncol = nC) : invalid 'nrow' value (too large or NA) #4
Comments
I'm adding one more example. It has the same samples as ADAS_fail.csv but it has an extra feature column. In this case, AdasynClassif function works.. |
Hi, I found the problem. It is related with the nearest neighbours in your data. I'm attaching a part of ADASYN algorithm below just to make this discussion more clear: So, when the algorithm tries to generate new cases for examples of class 3, it fails because they all have This is a special case where the ADASYN algorithm is not capable of generating a non uniform distribution for the In effect, when you add more features the nearest neighbours change and the problem does not occur because all classes have nearest neighbours that belong to the majority class! I'll try to push as soon as possible an updated version of ADASYN to github. I'll use the development branch. Regarding the "mystery" of the class.freq function, it is implemented in UBL but it is an auxiliary function, so it is not exported. UBL knows what it is but the end-users shouldn't need to know ;-) I'm sorry for the inconvenience. |
Thank you so much for your great explanation! |
Hi, I was just wondering when do you think that the updated version will be available? |
Hi, |
Hi,
I have used AdasynClassif function for several times without any problem. But now I experienced weird behavior. I got this error:
"Error in matrix(nrow = sum(unlist(g)), ncol = nC) : invalid 'nrow' value (too large or NA)"
It’s only happening for some combination of samples and features (please find attached - "a","b" and "c" are features and "target" is class, baseClass = 4). Additionally, setting different base class has an effect on it. I wanted to dive deeper into the function and find out what’s going on, but I couldn’t figure out from where class.freq function came from.
(That’s another mystery for me, how is it possible that AdasynClassif is running without having installed a package with class.freq function?)
ADAS_examples.zip
The text was updated successfully, but these errors were encountered: