1
$\begingroup$

The SMOTE for the imbalance should be applied for the training data only, right? Can we still do it (perform SMOTE on training data) while we select the k-fold CV and does not go for splitting the data in separate train and test set? I have read somewhere that we must separate the train data ( apply the SMOTE) and then run the classifier on a separate test data.

$\endgroup$
1
$\begingroup$

You apply SMOTE only on your training set, build your model on it, and then test it on the unSMOTE-ed test set.

In CV you would perform this by applying SMOTE on your k-1 folds, build your model on them and test it on the remaining unSMOTE-ed fold.

$\endgroup$
  • $\begingroup$ thanks but using CV, we have one dataset so how can we perform the SMOTE on train data (and not on test data)? We just load the dataset in CV and perform k-fold CV so how can we control the training and testing part of the data? My confusion is that can we do it without splitting the dataset into two parts? Thanks for understanding $\endgroup$ – Javed Khan Jul 16 at 8:16
  • $\begingroup$ @JavedKhan You will probably have to implement the CV procedure yourself to do this. $\endgroup$ – user2974951 Jul 16 at 8:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.