1

Here are some standard methods i am aware of when there is a class imbalance of data for classification problems in CNNs:

  1. Change the Loss Function (Focal, Dice, ...)
  2. Spatial Pyramid Pooling
  3. Non-local blocks
  4. Initialise the bias term only in the final layer of CNN

Are there any others new or old?

CCZ23
  • 252
  • 1
  • 11
  • 1
    What problem does class imbalance cause for your CNN? What are you trying to fix? – Sycorax Feb 24 '22 at 15:11
  • The classification F1 score is very low for the class imbalanced data (a score of 15% compared to 60% of the other classes). Using some of the ideas above i have brought the score up to ~40%. – CCZ23 Feb 24 '22 at 15:14
  • What score are you using? – Stephan Kolassa Feb 24 '22 at 15:15
  • I used an F1 score – CCZ23 Feb 24 '22 at 15:15
  • 2
    Don't use accuracy, precision, recall, sensitivity, specificity, or the F1 score. Every criticism at the following threads applies equally to all of these, and indeed to all evaluation metrics that rely on hard classifications: [Why is accuracy not the best measure for assessing classification models?](https://stats.stackexchange.com/q/312780/1352) [Is accuracy an improper scoring rule in a binary classification setting?](https://stats.stackexchange.com/q/359909/1352) [Classification probability threshold](https://stats.stackexchange.com/q/312119/1352) – Stephan Kolassa Feb 24 '22 at 15:21
  • 2
    Instead, use probabilistic classifications, and evaluate these using [proper scoring rules](https://stats.stackexchange.com/tags/scoring-rules/info). Unbalanced classes are almost certainly not a problem: [Are unbalanced datasets problematic, and (how) does oversampling (purport to) help?](https://stats.stackexchange.com/q/357466/1352) – Stephan Kolassa Feb 24 '22 at 15:22

0 Answers0