s-kganz / scutr Goto Github PK
View Code? Open in Web Editor NEWBalancing Multiclass Datasets for Classification Tasks
License: Other
Balancing Multiclass Datasets for Classification Tasks
License: Other
The options for SCUT do not work.
Error in dist(data[, -which(names(data) == cls_col)], ...) :
unused argument (k = 7)
I run and that is the error.
library(scutr)
data(imbalance)
imbalance <- imbalance[imbalance$class %in% c(2, 3, 19, 20), ]
imbalance$class <- as.numeric(imbalance$class)
plot(imbalance$V1, imbalance$V2, col=imbalance$class)
scutted <- SCUT(imbalance, "class", undersample = undersample_kmeans,
usamp_opts = list(k=7))
It also does not work in a specific data set i am working on. I have problems with the options in general.
Could you explain me if there is a problem in the function or something wrong from my side?
Here is the number of cases in each class (total 22 classes, 460 samples, average is 21)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
3 4 2 44 27 10 7 15 15 10 5 8 115 8 3 46 38 6 4 58
21 22
3 29
I ran scut usng default.
command: scutted <- SCUT(zz, "class")
I get the following error:
Error in get.knnx(data, query, k, algorithm) : ANN: ERROR------->
Calls: SCUT ... -> SMOTE -> knearest -> -> get.knnx
In addition: Warning message:
In get.knnx(data, query, k, algorithm) : k should be less than sample size!
It seems for SMOTE to work, K cannot be greater than or equal to the sample size. (in my case it's 2). But to generate 20 samples, k have to >2. is there a way to get around this? Thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.