MATLAB Answers


Regarding usage of classifier in case of imbalance data

Asked by varinder kaur on 14 Jul 2018
Latest activity Commented on by varinder kaur on 15 Jul 2018
I have images database consisting of four classes, but highly imbalanced. One class contains 150 images other 1500, 1800,1000. which classifier can be used to get efficient results for classification. How can i divide these images into training and testing. Kindly help


Sign in to comment.

1 Answer

Answer by Image Analyst
on 14 Jul 2018
 Accepted Answer

You can use randsample() or randperm() to get a list of 120 (80% of the smallest group) from each of the 4 groups. Use those 480 images for training, and the rest for testing/validation of the model.


Thanks for answer. But i want to perform 50: 50, 60: 40 division of training and testing data. In that case which method can i use to deal with imbalance data. also Can you please suggest classifier.
You can decide how many samples you want for training and testing and use randsample. There's no way anyone can suggest a classifier for your data without seeing it. The best option is to use the Classification Learner App, on the Apps tab of the tool ribbon, and try them all and pick the one with the lowest error.
Thanks Image Analyst for the answer

Sign in to comment.