Upsampling, or random oversampling, reduces class imbalance by randomly duplicating minority-class instances until the training classes are more balanced. section 5.2.2
Use upsampling with these trade-offs in mind:
- Balance the classes without discarding majority-class information, unlike random undersampling. section 5.2.2
- Watch for overfitting because repeated minority examples can influence the model disproportionately. section 5.2.2
- Consider SMOTE when duplication is undesirable; it creates synthetic minority points between existing minority instances. section 5.2.2
Balancing inhibitor data
For cytochrome P450 inhibition classification, duplicate inhibitor rows with replacement until their count matches noninhibitors, then fit a decision tree and compare precision–recall performance. section 5.2.2
Figure 5.8 Comparison of downsampling and upsampling on the training data set’s class composition.

Compare how downsampling and upsampling change the training set’s class composition. section 5.2.2





