I have a big issue for already a week. I cannot balance my classes with SMOTE as I am getting an error
Error in T[, col] <- data[, col] :
incorrect number of subscripts on matrix
This is the code I am applying:
smote_train <- SMOTE(Covid_tested ~., data = dataTrain, perc.over = 100, perc.under = 200)
I have almost approx 60.000 rows, with numerical variables and categorical ones.
Additionally, I get warning messages as well:
In addition: Warning messages:
1: In if (class(data[, col]) %in% c("factor", "character")) { :
the condition has length > 1 and only the first element will be used
2: In if (class(data[, col]) %in% c("factor", "character")) { :
the condition has length > 1 and only the first element will be used
Would you please help me? Did someone else got the same error? How did you solve it?