Practice
1. Which activation function is most likely to suffer from the vanishing gradient problem?
easy
Solution
Step 1: Identify the vanishing gradient issue.
The vanishing gradient problem occurs when gradients become too small, hindering learning.Step 2: Evaluate each option.
ReLU and Leaky ReLU do not suffer from this as they have non-zero gradients for positive inputs. GELU is similar to ReLU in behavior. Sigmoid squashes inputs to a small range, leading to vanishing gradients.Final Answer:
Option C -> Option CQuick Check:
Sigmoid squashes, gradients vanish. [OK]
Hint: Sigmoid squashes, gradients vanish. [OK]
Common Mistakes:
2. In the context of gradient boosting, which of the following is a key advantage of using XGBoost over traditional boosting methods?
easy
Solution
Step 1: Identify XGBoost's unique features
XGBoost is known for its regularization capabilities, which help prevent overfitting.Step 2: Eliminate wrong options
XGBoost uses bagging to improve model accuracy. is incorrect because XGBoost does not use bagging; it uses boosting. XGBoost is designed to handle missing data by default. is incorrect because while XGBoost can handle missing data, this is not its key advantage over traditional boosting. XGBoost uses a single decision tree for predictions. is incorrect because XGBoost uses an ensemble of trees, not a single tree.Final Answer:
Option D -> Option DQuick Check:
XGBoost = Regularization advantage [OK]
Hint: XGBoost = Regularization advantage [OK]
Common Mistakes:
3. 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:
4. 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:
5. You need to sample data from a large dataset where some entries are more important than others, and the dataset is too large to fit into memory. Which sampling strategy should you use?
hard
Solution
Step 1: Identify the need for prioritization.
When some entries are more important, prioritization is key.Step 2: Eliminate non-prioritization strategies.
Random (A) and Stratified (B) don't prioritize. Reservoir (C) handles size but not importance.Final Answer:
Option D -> Option DQuick Check:
Weighted = Prioritize important data [[check]]
Hint: Weighted = Prioritize important data [[check]]
Common Mistakes:
