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. Which optimizer is most suitable for handling sparse data due to its adaptive learning rate per parameter?
easy
Solution
Step 1: Identify the optimizer's strength.
AdaGrad adapts the learning rate for each parameter, making it suitable for sparse data.Step 2: Eliminate wrong options.
SGD does not adapt learning rates. Adam and RMSProp adapt but are not specifically designed for sparse data.Final Answer:
Option A -> Option AQuick Check:
AdaGrad adapts per parameter for sparse data. [check]
Hint: AdaGrad adapts per parameter for sparse data. [check]
Common Mistakes:
3. In the context of evaluating models on imbalanced datasets, which metric is more sensitive to changes in the minority class predictions?
easy
Solution
Step 1: Understand metric sensitivity
PR-AUC focuses on precision and recall, which are directly affected by the minority class predictions.Step 2: Eliminate wrong options
ROC-AUC is less sensitive to class imbalance. Accuracy can be misleading in imbalanced datasets. F1-Score is related but not as directly sensitive as PR-AUC.Final Answer:
Option C -> Option CQuick Check:
PR-AUC focuses on minority class. [OK]
Hint: PR-AUC focuses on minority class. [OK]
Common Mistakes:
4. When choosing between LSTM and GRU for a sequence modeling task, which scenario would favor using GRU over LSTM?
medium
Solution
Step 1: Compare LSTM and GRU.
GRUs are simpler and computationally more efficient than LSTMs.Step 2: Match to scenario.
GRU is preferred when computational efficiency is a priority.Final Answer:
Option A -> Option AQuick Check:
GRU is simpler, faster than LSTM. [check]
Hint: GRU is simpler, faster than LSTM. [check]
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:
