SMOTE(form, data, perc.over = 200, k = 5, perc.under = 200, learner = NULL, ...)
SMOTE(form, data, perc.over = 200, k = 5, perc.under = 200,
learner = NULL, ...)
library(caret)
library(DMwR)
set.seed(2969)
imbal_train <- twoClassSim(10000, intercept = -20, linearVars = 20)
table(imbal_train\\\$Class)
set.seed(9560)
smote_train <- SMOTE(Class ~ ., data = imbal_train)
table(smote_train\\\$Class)[2]
perc.over <- 100*(table(smote_train\\\$Class)[2]-table(imbal_train\\\$Class)[2])/table(imbal_train\\\$Class)[2]
perc.under <- 100*table(smote_train\\\$Class)[1]/(table(smote_train\\\$Class)[2]-table(imbal_train\\\$Class)[2])
perc.over = 200
perc.under = 200
set.seed(1234)
imbal_train <- twoClassSim(10000, intercept = -40, linearVars = 40)
table(imbal_train\\\$Class)
set.seed(5678)
smote_train <- SMOTE(Class ~ ., data = imbal_train)
table(smote_train\\\$Class)
perc.over <- 100*(table(smote_train\\\$Class)[2]-table(imbal_train\\\$Class)[2])/table(imbal_train$Class)[2]
perc.under <- 100*table(smote_train\\\$Class)[1]/(table(smote_train\\\$Class)[2]-table(imbal_train\\\$Class)[2])
perc.over = 200
perc.under = 200
library(caret)
library(DMwR)
set.seed(2969)
imbal_train <- twoClassSim(10000, intercept = -20, linearVars = 20)
table(imbal_train\\\$Class)
set.seed(9560)
smote_train <- SMOTE(Class ~ ., data = imbal_train)
table(smote_train\\\$Class)[2]
perc.over <- 100*(table(smote_train\\\$Class)[2] - table(imbal_train\
$Class)[2])/table(imbal_train\\\$Class)[2]
perc.under <- 100*table(smote_train\\\$Class)[1]/
(table(smote_train\\\$Class)[2] - table(imbal_train\\\$Class)[2])
perc.over = 200
perc.under = 200
set.seed(1234)
imbal_train <- twoClassSim(10000, intercept = -40, linearVars = 40)
table(imbal_train\\\$Class)
set.seed(5678)
smote_train <- SMOTE(Class ~ ., data = imbal_train)
table(smote_train\\\$Class)
perc.over <- 100*(table(smote_train\\\$Class)[2] -
table(imbal_train\\\$Class)[2])/table(imbal_train$Class)[2]
perc.under <- 100*table(smote_train\\\$Class)[1]/
(table(smote_train\\\$Class)[2]-table(imbal_train\\\$Class)[2])
perc.over = 200
perc.under = 200