Practice
1. In a dataset with missing values in a numerical feature, which imputation strategy is most appropriate when the data is normally distributed?
easy
Solution
Step 1: Identify the distribution of the data
For normally distributed data, the mean is the best measure of central tendency.Step 2: Eliminate wrong options
Median is better for skewed data, mode for categorical data, and zero imputation can distort the distribution.Final Answer:
Option D -> Option DQuick Check:
Mean for normal distribution [OK]
Hint: Mean for normal distribution [OK]
Common Mistakes:
2. When comparing two ML models using A/B testing, why might you choose causal inference over the holdout method?
medium
Solution
Step 1: Understand the methods
Causal inference helps understand the cause-effect relationship, not just performance.Step 2: Eliminate wrong options
Holdout is not inherently less accurate or unsuitable for large datasets. Causal inference is not necessarily faster.Final Answer:
Option C -> Option CQuick Check:
Causal inference explains why, not just what. [OK]
Hint: Causal inference explains why, not just what. [OK]
Common Mistakes:
3. 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:
4. In a scenario where computational resources are limited, which approach is more suitable for sequence-to-sequence tasks and why?
medium
Solution
Step 1: Evaluate computational efficiency.
Attention mechanisms allow for parallel processing, making them more efficient with limited resources.Step 2: Eliminate wrong options.
Use RNNs because they require less memory than attention mechanisms. is incorrect as attention mechanisms can be more memory efficient due to parallelism. Use RNNs because they are faster to train than attention mechanisms. is incorrect because RNNs are slower due to sequential processing. Use attention mechanisms because they are more interpretable than RNNs. is incorrect as interpretability is not the main concern here.Final Answer:
Option C -> Option CQuick Check:
Parallel processing saves resources. [OK]
Hint: Parallel processing saves resources. [OK]
Common Mistakes:
5. You are tasked with building a model for a financial dataset with many features, some of which are irrelevant. Which regularization technique would you apply and why?
hard
Solution
Step 1: Identify the need for feature selection and handling multicollinearity.
Financial datasets often have correlated features and irrelevant ones.Step 2: Choose the technique that addresses both issues.
Elastic Net combines L1 for feature selection and L2 for handling multicollinearity.Step 3: Eliminate wrong options.
L1 Lasso struggles with multicollinearity. L2 Ridge does not eliminate features. No regularization ignores the problem.Final Answer:
Option C -> Option CQuick Check:
Elastic Net = L1 + L2 for finance. [OK]
Hint: Elastic Net = L1 + L2 for finance. [OK]
Common Mistakes:
