To illustrate problems and solutions of SMOTE with categorical variables, let's consider a dataset (imbalanced) where each rows represent an animal and we have following informations:
- [has_tail] : 1 if the animal has a tail. Binary variable.
- [weight] : the weight of the animal. Continuous variable.
SMOTE create synthetic observation by interpolation between different data points.
Therefore, has you mentioned, in the [has_tail] column one can have 0.23 as a value for a synthetic observation. Yet this doesn't mean anything ! We are mixing categories and numerical values, it is a problem even when computing distances between vectors to find the $k$ nearest neighbors.
Even though we have only numeric values, we lost meaning of the data.
To tackle this issue, two variations of SMOTE were developed :
- SMOTE-N : for dataset with only categorical variables
- SMOTE-NC : for dataset with categorical and continuous variables
The last one is a good fit for your problem. To get more detail about the two variations check imblearn SMOTE variations for Python, but there must be implementation in R.