Skip to content

Over-sampling

Over-sampling is the act of synthetically generating observations for the minority classes, either by random replication or by more advanced methods that synthesize new observations.

Random replication

step_upsample()
Up-Sample a Data Set Based on a Factor Variable

SMOTE family

step_smote()
Apply SMOTE Algorithm
step_bsmote()
Apply Borderline-SMOTE Algorithm
step_svmsmote()
Apply SVM-SMOTE Algorithm
step_kmeans_smote()
Apply KMeans-SMOTE Algorithm
step_smotenc()
Apply SMOTENC Algorithm
step_smoten()
Apply SMOTEN Algorithm

Adaptive

step_adasyn()
Apply Adaptive Synthetic Algorithm

Smoothed bootstrap

step_rose()
Apply ROSE Algorithm

Under-sampling

Under-sampling is the act of removing observations from the majority classes. Most under-samplers here use prototype selection, keeping a subset of the real rows. step_cluster_centroids() instead uses prototype generation, creating new representative rows.

Random

step_downsample()
Down-Sample a Data Set Based on a Factor Variable

Distance / near-boundary

step_nearmiss()
Remove Points Near Other Classes
step_tomek()
Remove Tomek's Links
step_cnn()
Condensed Nearest Neighbors
step_oss()
One-Sided Selection

Neighborhood cleaning

step_enn()
Edited Nearest Neighbors
step_ncl()
Neighborhood Cleaning Rule

Hardness

step_instance_hardness()
Remove hard to classify points

Prototype generation

step_cluster_centroids()
Under-Sampling by Cluster Centroids

Regression

Resampling an imbalanced numeric outcome rather than a class.

step_smogn()
Apply SMOGN Algorithm

Methods

Some of the methods implemented in this package as steps are also available as their own functions.

smote()
SMOTE Algorithm
smogn()
SMOGN Algorithm
smotenc()
SMOTENC Algorithm
smoten()
SMOTEN Algorithm
bsmote()
Borderline-SMOTE Algorithm
svmsmote()
SVM-SMOTE Algorithm
kmeans_smote()
KMeans-SMOTE Algorithm
adasyn()
Adaptive Synthetic Algorithm
rose()
ROSE Algorithm
cluster_centroids()
ClusterCentroids Algorithm
cnn()
Condensed Nearest Neighbors
enn()
Edited Nearest Neighbors
instance_hardness()
Remove hard to classify points
ncl()
Neighborhood Cleaning Rule
nearmiss()
Remove Points Near Other Classes
oss()
One-Sided Selection
tomek()
Remove Tomek's Links

Datasets

circle_example
Synthetic Dataset With a Circle

Developer tools