So whenever I try to use some imbalance function on my dataset I get this error:
Error in Ops.data.frame(dataset[, classAttr], minorityClass) :
‘==’ only defined for equally-sized data frames
This is my code:
dset <- read_csv("C:/Users/Downloads/streaming.csv") %>% select(-X1)
head(dset, 10)
imbalanceRatio(dset, classAttr = "cont_subs")
The task is a binary classification of whether the user continues his subscription to the service or not, with the "cont_subs" column containing only "Yes" or "No"
There was a similar question where the fix was adding classAtr to the function but adding classAtr to the function for me causes this error. So far I wasnt able to find someone getting the same error using the same package.
If I remove the classAtr from the imbalanceRatio func I get
Error: Can't subset columns that don't exist.
x The column `Class` doesn't exist.
Run `rlang::last_error()` to see where the error occurred.
I'm new to R so excuse me if there's something obvious I'm missing.