2
$\begingroup$

I have 5379 observations in a data set. Its a classification problem where the no. of bad's is 25 and the no. of goods is 5354. I want to do a 5 fold cross validation in which 5 classes will consist of 5 bad's respectively and the no. of goods distributed equally. How do i make the split?!!!

$\endgroup$
4
  • $\begingroup$ You are thinking of stratified CV. In R there are functions that do it, what is your language of choice? $\endgroup$ Oct 9 '18 at 7:24
  • $\begingroup$ Can you describe in more detail what you are trying to accomplish? Can't you just divide both your positive and negative examples into 5 equally large sets each and then combine them into 5 cross-validation sets? $\endgroup$ Oct 9 '18 at 7:24
  • $\begingroup$ As already said, you seem to be asking about stratified cross-validation, but another question is if using only negative 5 observations per validation set would give you meaningful results. $\endgroup$
    – Tim
    Oct 9 '18 at 7:27
  • $\begingroup$ Hi Tim, I know its very difficult to get meaningful results with 5 bad's in each cluster. Still i just need to see if anything good i can get. $\endgroup$
    – sumanta
    Oct 9 '18 at 7:37
0
$\begingroup$

There are few methods to handle such imbalanced data. Stratified sampling will not help you in your case, because of large variation. Best is to augment some data using SMOTE. It use graph network, to augment the data in smart way. Give it a try.

Another you can try sampling technique, by considering over and under sampling technique. Using oversampling methods, we can repeat the sample with less instances, whereas with under-sampling, we loss some data of many instances. For more, you can refer

$\endgroup$

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.