Practice
1. In the context of cross-validation, which method is most appropriate for imbalanced datasets?
easy
Solution
Step 1: Identify the need for balanced class distribution.
Imbalanced datasets require maintaining class distribution in each fold.Step 2: Eliminate wrong options.
K-Fold does not ensure class balance (A), Time Series Split is for temporal data (C), Leave-One-Out is computationally expensive and doesn't address imbalance (D).Final Answer:
Option C -> Option CQuick Check:
Stratified keeps class balance. [OK]
Hint: Stratified keeps class balance. [OK]
Common Mistakes:
2. A neural network using ReLU activation is not learning. What could be a likely cause?
medium
Solution
Step 1: Identify ReLU-specific issues.
ReLU can suffer from the dying ReLU problem where neurons output zero for all inputs.Step 2: Evaluate each option.
High learning rate (A) and small batch size (D) are not ReLU-specific. Vanishing gradients (B) are less likely with ReLU.Final Answer:
Option A -> Option AQuick Check:
Dying ReLU: neurons stuck at zero. [OK]
Hint: Dying ReLU: neurons stuck at zero. [OK]
Common Mistakes:
3. A model trained on standardized data is underperforming. What could be a potential issue?
medium
Solution
Step 1: Analyze the impact of standardization on model performance.
Standardization centers data around zero, which can affect models sensitive to feature means.Step 2: Identify the potential issue.
Some models may perform poorly if they rely on the original mean of the data.Final Answer:
Option A -> Option AQuick Check:
Model sensitive to mean? Standardization affects it. [OK]
Hint: Model sensitive to mean? Standardization affects it. [OK]
Common Mistakes:
4. When monitoring an ML model in production, which approach is better for detecting data drift and why?
medium
Solution
Step 1: Identify effective drift detection
Monitoring statistical properties helps detect subtle changes in input data.Step 2: Eliminate wrong options
Use a static threshold on model accuracy. is reactive, not proactive. Rely on user feedback to identify issues. is unreliable and subjective. Increase the frequency of model retraining. addresses performance decay, not drift detection.Final Answer:
Option A -> Option AQuick Check:
Monitor input stats for drift detection [OK]
Hint: Monitor input stats for drift detection [OK]
Common Mistakes:
5. You implemented stratified sampling but notice that the sample still has class imbalance. What is the most likely cause?
medium
Solution
Step 1: Identify the stratified sampling requirement.
Stratified sampling requires correct class proportion specification.Step 2: Eliminate unrelated issues.
Random Sampling (B) would not be used if stratified was intended. Data leakage (C) affects model performance, not sampling. Sample size (D) affects variability, not imbalance directly.Final Answer:
Option C -> Option CQuick Check:
Check class proportions in stratified sampling [[check]]
Hint: Check class proportions in stratified sampling [[check]]
Common Mistakes:
