I am working on a multi class text classifier. The total number of class that are there is 265 and total number of rows is 20,000. The class with largest number of occurrences has 6000 samples and there are many classes with exactly 1 sample as well. Preliminary analysis of the data led me to put a cutoff of 10 samples to be their for a class to be recognized and I made a separate miscellaneous class of less than 10 samples. Now I am reduced to 27 classes. And there is still class imbalance as can be seen from the figure with the class having largest number of samples has around 6000 and the lowest has 10.
How do I deal with such large class imbalance? Are their algorithms which are better suited to handle such large class imbalance?