how to implement SMOTE in Shiny

I am working on shiny project , i want to implement the SMOTE (Over sampling and under sampling ) in shiny app. i tried but my code didn't worked . how can i implement SMOTE in Shiny and get save the over sampling and result in shiny.How can i print output
this is my smote code which i want to implement

# Data Partition
splitIndextu <- createDataPartition(data_smote2$id, p = .80,
                                  list = FALSE,
                                  times = 1)
train <- data_smote2[ splitIndextu,]
test <- data_smote2[-splitIndextu,]
# Data for Developing Predictive Model
table(train$id)
prop.table(table(train$id))
summary(train)

library(ROSE) 
 

rose <- ROSE(id~., data = train, N = 500, seed=111)$data
table(rose$id)
summary(rose)

# Predictive Model (Random Forest)
library(randomForest)

rfrose <- randomForest(id~., data=rose)

# Predictive Model Evaluation with test data
library(caret)
library(e1071)

confusionMatrix(predict(rfrose, test), test$id, positive = '1')

This topic was automatically closed 54 days after the last reply. New replies are no longer allowed.