I am working on SMOTE using DMwR package. i tried oversampling of data but i got error saying The response variable must have 2 levels.
what does it mean ? How can i solve this error ?
i tried following code:
library(ROSE)
> over <- ovun.sample(tumor_stage~., data = train, method = "over", N = 760)$data
got error
Error in (function (formula, data, method, subset, na.action, N, p = 0.5, :
The response variable must have 2 levels.````
as an experiment, if you recoded it down to two levels, would the function run without error ? it does seem to me to be complaining about your response variable having not exactly two levels.