Practice
1. In a medical diagnosis system, why might you choose recall over precision?
medium
Solution
Step 1: Understand the context.
In medical diagnosis, missing a positive case (false negative) can be critical.Step 2: Choose the metric that minimizes false negatives.
Recall focuses on minimizing false negatives.Final Answer:
Option C -> Option CQuick Check:
Recall minimizes false negatives. [OK]
Hint: Recall minimizes false negatives. [OK]
Common Mistakes:
2. When choosing between LSTM and GRU for a time series prediction task with limited computational resources, which is generally more appropriate and why?
medium
Solution
Step 1: Compare LSTM and GRU.
GRU is simpler and often faster due to fewer parameters, making it suitable for limited resources.Step 2: Eliminate wrong options.
LSTM's complexity isn't always needed, GRU isn't always more accurate, and LSTM's longer sequence handling isn't a universal advantage.Final Answer:
Option C -> Option CQuick Check:
GRU: fewer parameters, faster. [OK]
Hint: GRU: fewer parameters, faster. [OK]
Common Mistakes:
3. When choosing between LSTM and GRU for a sequence modeling task, which scenario would favor using GRU over LSTM?
medium
Solution
Step 1: Compare LSTM and GRU.
GRUs are simpler and computationally more efficient than LSTMs.Step 2: Match to scenario.
GRU is preferred when computational efficiency is a priority.Final Answer:
Option A -> Option AQuick Check:
GRU is simpler, faster than LSTM. [check]
Hint: GRU is simpler, faster than LSTM. [check]
Common Mistakes:
4. How would you apply slice-based evaluation to improve a sentiment analysis model for a multilingual dataset?
hard
Solution
Step 1: Understand the application of slice-based evaluation
Slice-based evaluation helps identify performance issues in specific data subsets.Step 2: Apply to multilingual context
Creating slices based on language allows for targeted performance analysis and improvements.Final Answer:
Option B -> Option BQuick Check:
Slice by language for targeted analysis. [OK]
Hint: Slice by language for targeted analysis. [OK]
Common Mistakes:
5. You are tasked with improving a model's performance on a highly imbalanced dataset. Which approach is most appropriate to prevent overfitting while addressing class imbalance?
hard
Solution
Step 1: Address class imbalance and overfitting
Class weights help balance the dataset, and early stopping prevents overfitting by halting training when validation performance stops improving.Step 2: Eliminate wrong options
Use SMOTE to oversample the minority class and increase model complexity. increases complexity, risking overfitting, Downsample the majority class and increase the learning rate. may lead to instability, and Use a simpler model with no regularization. lacks regularization, increasing overfitting risk.Final Answer:
Option C -> Option CQuick Check:
Class weights + early stopping = balanced, robust model [OK]
Hint: Class weights + early stopping = balanced, robust model [OK]
Common Mistakes:
