hello: smote

Description Usage Examples

Description

preprocess the imbalance data by using SMOTE.

Usage

1
smote(X,Y,minority,m = 50,r = 2,neighbors = 5)

Examples

1
2
3
4
5
6
X = data.frame(x1 = rep(1,5),x2 = rep(0,5),x3 = runif(5))#train data
Y = as.factor(c(1,0,0,0,1))
minority = Y[1]
data = smote(X,Y,minority,m = 0.5,r = 2,neighbors = 1)
data$data_train
data$train_label

binyi10/SMOTE documentation built on May 22, 2019, 2:21 p.m.