I have imbalance dataset as below
id text category
1 comment1 0
2 comment2 0
3 comment3 1
4 comment4 0
I have pre-processed the "text" by removing numeric values and applying stemming.
Next, I split my data to training and testing set for validation.
X_train, X_test, y_train, y_test = train_test_split(data['text'], data['category'])
Then, I'm applying Down-Sampling method on my training dataset
from imblearn.under_sampling import RandomUnderSampler
rus = RandomUnderSampler(return_indices=True)
train_X_resampled, train_y_resampled, idx_resampled = rus.sample(X_train, y_train)
However, when I got the error as below. Can I know how can i fix the error?
ValueError: could not convert string to float: 'comment2'