Practice
1. 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:
2. In a scenario where computational resources are limited, which approach is more suitable for hyperparameter tuning and why?
medium
Solution
Step 1: Evaluate resource constraints
Cross-validation is computationally expensive but provides robust tuning.Step 2: Eliminate less suitable options
Use a single train-test split to save resources. risks overfitting. Use a train-validation split and skip the test set. skips the test set, risking unseen data performance. Use a larger test set to ensure model generalization. misallocates resources to testing rather than tuning.Final Answer:
Option C -> Option CQuick Check:
Cross-validation ensures robust tuning despite cost. [OK]
Hint: Cross-validation ensures robust tuning despite cost. [OK]
Common Mistakes:
3. In a scenario where computational resources are limited, which optimizer would you choose for faster convergence and why?
medium
Solution
Step 1: Consider optimizer efficiency.
Adam combines the benefits of both AdaGrad and RMSProp, leading to faster convergence.Step 2: Evaluate resource constraints.
Adam is computationally efficient and converges faster than SGD with momentum and AdaGrad.Final Answer:
Option A -> Option AQuick Check:
Adam is efficient for limited resources. [check]
Hint: Adam is efficient for limited resources. [check]
Common Mistakes:
4. A model trained on a dataset shows unexpected bias against a minority group. What is the most likely root cause?
medium
Solution
Step 1: Identify the symptom.
Bias against a minority group indicates potential data imbalance.Step 2: Analyze the options.
Imbalanced data (B) is a common cause of bias. Other options relate to model complexity or training dynamics, not bias directly.Final Answer:
Option A -> Option AQuick Check:
Imbalanced data often leads to bias. [OK]
Hint: Imbalanced data often leads to bias. [OK]
Common Mistakes:
5. You are tasked with evaluating a model for a rare disease detection system. Which metric would you prioritize and why?
hard
Solution
Step 1: Consider the context
In rare disease detection, the minority class (disease cases) is critical.Step 2: Evaluate metric suitability
PR-AUC is more informative for minority class performance. ROC-AUC (A) and Accuracy (C) can be misleading. Log Loss (D) is useful but doesn't focus on minority class.Final Answer:
Option D -> Option DQuick Check:
PR-AUC for minority class focus. [OK]
Hint: PR-AUC for minority class focus. [OK]
Common Mistakes:
