Practice
1. You notice that your XGBoost model is overfitting despite using early stopping. What could be the root cause?
medium
Solution
Step 1: Identify overfitting causes
Overfitting can occur if the model is too complex, such as having trees with high max depth.Step 2: Eliminate wrong options
The learning rate is too low, causing the model to converge slowly. is incorrect because a low learning rate would not cause overfitting. The number of boosting rounds is too low, leading to underfitting. is incorrect because too few rounds would cause underfitting, not overfitting. The regularization parameters are set too high, restricting model complexity. is incorrect because high regularization would prevent overfitting, not cause it.Final Answer:
Option A -> Option AQuick Check:
High max depth = Overfitting risk [OK]
Hint: High max depth = Overfitting risk [OK]
Common Mistakes:
2. A KNN model is performing poorly on a high-dimensional dataset. What is the most likely cause?
medium
Solution
Step 1: Consider high-dimensional effects
In high dimensions, distance metrics often become less effective.Step 2: Eliminate wrong options
The model has too few neighbors. is incorrect as increasing neighbors may not help. The dataset is too small. is wrong because size isn't the main issue. The model is overfitting due to too many neighbors. is incorrect as overfitting is less likely with many neighbors.Final Answer:
Option B -> Option BQuick Check:
High dimensions dilute distance metrics. [OK]
Hint: High dimensions dilute distance metrics. [OK]
Common Mistakes:
3. A model's performance improved significantly on the test set but not on the validation set. What is the most likely cause?
medium
Solution
Step 1: Analyze performance discrepancy
Significant improvement on the test set but not on the validation set suggests an issue with test set integrity.Step 2: Identify data leakage
Data leakage from the test set can artificially inflate performance metrics.Final Answer:
Option A -> Option AQuick Check:
Test set improvement only? Check for leakage [OK]
Hint: Test set improvement only? Check for leakage [OK]
Common Mistakes:
4. A high-dimensional dataset is causing a model to perform poorly. The model's accuracy is unexpectedly low. What is the most likely root cause?
medium
Solution
Step 1: Identify the impact of high dimensions.
High dimensions often lead to data sparsity, affecting generalization.Step 2: Eliminate wrong options.
The model is underfitting due to insufficient complexity. is about model complexity, not data sparsity. The model is overfitting due to too many parameters. is about overfitting, not generalization. The learning rate is too high, causing unstable training. is about training stability, not generalization.Final Answer:
Option A -> Option AQuick Check:
High dimensions lead to sparsity, hurting generalization. [OK]
Hint: High dimensions lead to sparsity, hurting generalization. [OK]
Common Mistakes:
5. How would you apply the No Free Lunch Theorem to improve a recommendation system for a new user base?
hard
Solution
Step 1: Apply the No Free Lunch Theorem
The theorem suggests no single model is best for all scenarios, so testing is essential.Step 2: Eliminate wrong options
Use the same model that worked for the previous user base. is incorrect because past success doesn't guarantee future performance. Increase the model complexity to handle diverse user preferences. is incorrect because complexity doesn't ensure better results. Rely on collaborative filtering as it works well for recommendations. is incorrect because collaborative filtering isn't universally optimal.Final Answer:
Option C -> Option CQuick Check:
Test models with new data. [OK]
Hint: Test models with new data. [OK]
Common Mistakes:
