A dataset contains two classes with significant imbalance. Which strategy most directly helps the model not ignore the minority class?
Answer
Use class-weighted loss or oversample the minority class
Explanation
Class-weighting and oversampling increase the effective contribution of minority examples to the loss. This helps the model learn decision boundaries that consider both classes.
Last reviewed: October 2026
Reviewed by FirstInTest Editorial Team
Related questions
Consider an embedding layer used for categorical inputs (e.g., user IDs). What is a main advantage of embeddings compared to one-hot vectors?
View question →
Which activation function is commonly used as the nonlinearity after a final linear layer for multiclass classification?
View question →
Which situation best describes the vanishing gradient problem in deep networks?
View question →
Suppose you increase the number of neurons in a hidden layer. Which effect is most directly expected (all else equal)?
View question →
For convolutional neural networks (CNNs), which property explains why they work well on images?
View question →
A student uses stochastic gradient descent (SGD) with mini-batches. What is a key benefit compared to full-batch gradient descent?
View question →