Sample question 1 — Data Preparation for Machine Learning (ML)
A manufacturing team is training a defect detection model where only 2% of produced items are defective. The team has a large labeled dataset and wants to improve the model's ability to identify defects without discarding valuable examples or fabricating synthetic samples that may not reflect real defects. Which data-level technique should the team apply during training?
- A. Assign a higher class weight to the defective class
- B. Duplicate defective samples until classes are balanced
- C. Generate synthetic defective samples with SMOTE
- D. Undersample the non-defective class to match defects
Answer: A. Option A is correct because class weighting increases the penalty for misclassifying defects during training, improving defect detection while keeping every real example and avoiding fabricated data. Option B is incorrect because duplicating defective samples causes overfitting to those exact examples and does not add new information. Option C is incorrect because SMOTE fabricates synthetic defects that may not reflect real manufacturing failure modes, which the team explicitly wants to avoid. Option D is incorrect because undersampling the non-defective class discards valuable majority-class examples and can degrade overall model performance.
