Practice
1. In the context of handling class imbalance, which technique is specifically designed to adjust the loss function to focus more on hard-to-classify examples?
easy
Solution
Step 1: Identify the technique that modifies the loss function.
Focal Loss is designed to focus more on hard-to-classify examples by adjusting the loss function.Step 2: Eliminate wrong options.
Oversampling and undersampling adjust the dataset, not the loss function. Cost-sensitive learning modifies the cost, not the focus on hard examples.Final Answer:
Option D -> Option DQuick Check:
Focal Loss focuses on hard examples. [OK]
Hint: Focal Loss focuses on hard examples. [OK]
Common Mistakes:
2. 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:
3. A decision tree model is overfitting the training data. What is the most likely cause?
medium
Solution
Step 1: Identify overfitting causes.
Overfitting often occurs when the model is too complex, such as a deep tree.Step 2: Eliminate wrong options.
A shallow tree would underfit, a small dataset affects generalization but not directly overfitting, and uninformative features would lead to poor performance, not overfitting.Final Answer:
Option D -> Option DQuick Check:
Deep trees overfit easily. [OK]
Hint: Deep trees overfit easily. [OK]
Common Mistakes:
4. A model trained on a dataset with engineered features is underperforming on the validation set. What is the most likely cause?
medium
Solution
Step 1: Analyze the symptoms of underperformance.
Underperformance on validation suggests overfitting or poor generalization.Step 2: Evaluate the role of feature engineering.
Over-engineered features (C) can lead to overfitting, especially if they capture noise. Normalization (B) affects convergence but not generalization directly. Model complexity (A, D) is less likely the issue if features are the focus.Final Answer:
Option B -> Option BQuick Check:
Over-engineered features often lead to overfitting. [OK]
Hint: Over-engineered features often lead to overfitting. [OK]
Common Mistakes:
5. When framing a business problem as an ML problem, which trade-off is most critical to consider?
medium
Solution
Step 1: Identify the key trade-off
In many business contexts, the trade-off between accuracy and interpretability is crucial because stakeholders need to understand model decisions.Step 2: Eliminate wrong options
Data volume vs. Model complexity is incorrect because data volume and model complexity are often complementary. Training time vs. Inference time is incorrect because training and inference times are usually secondary to model performance. Feature engineering vs. Hyperparameter tuning is incorrect because feature engineering and hyperparameter tuning are not directly opposing trade-offs.Final Answer:
Option C -> Option CQuick Check:
Balance accuracy with interpretability for stakeholder trust. [OK]
Hint: Balance accuracy with interpretability for stakeholder trust. [OK]
Common Mistakes:
