Changelog
imbalanceKit 0.2.0
- New vignette “Getting started with imbalanceKit” and the
bananadata set. - The package has a website: https://fatihsaglam.github.io/imbalanceKit/.
- The
imbalanceDatRelpackage (DatRel) is now part ofimbalanceKit; it is not needed any more. The class cover algorithm of thercccdpackage is included as compiled C++ code (needsRcpp) that does not build the cover matrix, soDatRel()andoversampleDatRel()are much faster and need less memory than the former R implementation. - Complexity measures for imbalance, overlap and noise:
IR,C1,C2,ID,F1,F1v,F2,F3,F4,N1-N4,LSC,R,R_augand the types of minority examples (SAFE,BORDERLINE,RARE,OUTLIER), each ascomplexity_<NAME>(), andcomplexity()for all or selected ones. - New oversamplers
RadiusSMOTE()(Pradipta et al., 2021) andVSSMOTE()(Qiu et al., 2025). Both work with more than two classes (one-versus-rest) and can be used asmethodinoversampleDatRel().
imbalanceKit 0.1.0
CRAN release: 2026-11-13
First release. imbalanceKit collects the resampling methods of the former SMOTEWB package (version 1.2.5) and extends them.
New methods
BiSMOTE(): bi-directional SMOTE (Sağlam & Yamak).MCSMOTE(): transition matrix driven oversampling (Sağlam & Cengiz, 2025). Works with more than two classes.UGO(): uncertainty guided oversampling (Sağlam & Cengiz, 2026), with"RWO","SMOTE","ROS"and"MCSMOTE"as base methods. UGO is not a resampler by itself but a procedure that uses a base method and a classifier. The classifier is chosen with theclassifierargument: one of the seven built-in classifiers ("CART","RF","LogReg","KNN","NaiveBayes","LDA","NNET") or any function that returns class probabilities. The old names"rpart"and"randomForest"still work.DatRel()(Sağlam, 2025) is a post-processing method:DatRel(x, y, x_syn, y_syn)moves synthetic samples from any source that fall outside their class region back into it (pure and proper class cover; works with more than two classes). The cover algorithm of thercccdpackage is included, sorcccdis not needed.oversampleDatRel()generates the samples with a base method first.EBSMOTE(),GQEO(),LEAO()andSyMProD(): further oversamplers that need no deep learning libraries. The first, third and fourth are defined for two classes; with more classes every class is oversampled against the union of the others.LEAO()estimates class probabilities with baggedrparttrees, logistic regression, k-nearest neighbours or naive Bayes (prob_type).
Documentation
- The year of publication of every method is part of its help page title and is listed in the README.
- References were added for
EBSMOTE(),GQEO(),LEAO()andSyMProD()(also incitation()).
Metrics
-
evaluate()calculatesACC,BACC,F1,GMEAN,MCC,ROCAUC,PRAUC,Brier,PBrier(penalized),BBrier(balanced),ECE,BECE(balanced),P4andIAMplusPRECISION,RECALL,SPECIFICITY,KAPPAandLOGLOSS, or the selected ones. Each metric is also a function of its own. - Metrics are defined for two or more classes; class-wise metrics have an
averageargument ("binary","macro","micro","weighted").
Methods carried over from SMOTEWB 1.2.5
ADASYN(), BLSMOTE(), GSMOTE(), ROS(), ROSE(), RSLSMOTE(), RUS(), RWO(), SLSMOTE(), SMOTE() and SMOTEWB().
Changes compared with SMOTEWB 1.2.5
- Every resampler is built from a
generate_<METHOD>()function (one class at a time) and a shared driver. Generation is vectorised, so the methods are several times faster on large data. Because the random numbers are now drawn in bulk, a seed no longer reproduces the output of SMOTEWB 1.2.5 (ROS()andROSE()still do); the distribution of the synthetic samples is unchanged. - All resamplers work with more than two classes.
-
ovRate: the number of synthetic samples isovRate * (n_max - n_j)rounded half up for every method (before:round()for most,ceiling()for BiSMOTE and UGO).ovRatemay also be a vector with one value per class and is validated. -
RUS()keeps the original row order and validatesn_neededToRemove.
Fixes
-
SMOTE(k = 1)andADASYN(k = 1)no longer fail;klarger than the class size is reduced. Classes with a single sample are duplicated with a warning. -
ADASYN()returns exactly the required number of samples (it was off by a few because of rounding) and itsCis reported for every class. -
RSLSMOTE()used the neighbours of the first sample instead of those of the current sample when relocating; fixed. -
BLSMOTE()no longer modifiesk2across classes and no longer loops forever when too few borderline samples exist. -
GSMOTE()now returnsy_synas documented.