Practice
1. In the context of K-Means clustering, which initialization method is most likely to avoid poor local minima?
easy
Solution
Step 1: Understand initialization impact
K-Means++ initialization helps in spreading initial centroids to avoid poor local minima.Step 2: Eliminate wrong options
Random initialization can lead to poor local minima. Using centroids from a previous run might not improve if the previous run was suboptimal. Initializing all centroids to the same point is clearly incorrect.Final Answer:
Option A -> Option AQuick Check:
K-Means++ spreads centroids well [OK]
Hint: K-Means++ spreads centroids well [OK]
Common Mistakes:
2. When should you prefer approximate nearest neighbors over exact KNN?
medium
Solution
Step 1: Consider dataset size and dimensionality
Approximate methods are beneficial for large, high-dimensional datasets.Step 2: Eliminate wrong options
When you have a small dataset with low dimensions. is incorrect as exact KNN is feasible. When you need exact results for a critical application. is wrong because approximate methods are not for critical exactness. When computational resources are unlimited. is incorrect as resources are not a constraint.Final Answer:
Option A -> Option AQuick Check:
Approximate for large, high-dimension data. [OK]
Hint: Approximate for large, high-dimension data. [OK]
Common Mistakes:
3. A model trained on offline data is underperforming when deployed in a real-time environment. What is the most likely cause?
medium
Solution
Step 1: Identify the mismatch between training and deployment
Models trained on offline data may not handle real-time data well due to differences in data characteristics.Step 2: Eliminate unrelated causes
Options A, C, and D do not specifically address the real-time processing capability issue.Final Answer:
Option C -> Option CQuick Check:
Offline-trained models may struggle with real-time data. [OK]
Hint: Offline-trained models may struggle with real-time data. [OK]
Common Mistakes:
4. When deciding between Few-Shot and Chain-of-Thought prompting, which scenario is best suited for Chain-of-Thought?
medium
Solution
Step 1: Understand Chain-of-Thought
Chain-of-Thought is best for tasks requiring complex reasoning.Step 2: Eliminate wrong options
When the task involves simple factual recall. is incorrect as factual recall doesn't need reasoning. When the model needs to be fine-tuned with a few examples. is about Few-Shot, not Chain-of-Thought. When the task requires generating creative content. is unrelated to reasoning.Final Answer:
Option B -> Option BQuick Check:
Use Chain-of-Thought for complex reasoning tasks. [OK]
Hint: Use Chain-of-Thought for complex reasoning tasks. [OK]
Common Mistakes:
5. In a dataset with highly correlated features, which regularization technique is preferable and why?
medium
Solution
Step 1: Identify the issue with correlated features.
Highly correlated features can cause instability in L1 Lasso.Step 2: Choose the technique that addresses this.
Elastic Net combines L1 and L2, providing stability and feature selection.Step 3: Eliminate wrong options.
L1 Lasso struggles with multicollinearity. L2 Ridge does not select features. No regularization ignores the problem.Final Answer:
Option A -> Option AQuick Check:
Elastic Net = L1 + L2 for correlation. [OK]
Hint: Elastic Net = L1 + L2 for correlation. [OK]
Common Mistakes:
