liveBook · Manning

Upsampling

As explained in Build AI Drug Discovery Pipelines

Random oversampling is a sampling technique that duplicates minority-class instances to reduce class imbalance.

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

How Build AI Drug Discovery Pipelines covers it

How deep it goes
Defines duplication, contrasts alternatives, and demonstrates implementation while stopping short of advanced synthetic-sampling details.
Examples
Uses cytochrome P450 inhibitor data, duplicated inhibitor rows, decision trees, and precision–recall evaluation.
What you can do after
Apply random oversampling to rebalance training data and compare its classification performance against alternative strategies.
How it connects
Connects random oversampling with class imbalance, random undersampling, SMOTE, overfitting, precision, and recall.

Also explained in

Compare how 6 books explain upsampling →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Build AI Drug Discovery Pipelines. The section links point to the parts of the book it draws on.