Practice
1. Which regularization technique is most suitable for feature selection in a linear regression model?
easy
Solution
Step 1: Identify the purpose of feature selection.
L1 Lasso regularization can shrink some coefficients to zero, effectively selecting features.Step 2: Eliminate wrong options.
L2 Ridge does not shrink coefficients to zero. Elastic Net combines L1 and L2 but is not as direct for feature selection. Dropout is not used in linear regression.Final Answer:
Option A -> Option AQuick Check:
L1 Lasso zeros coefficients for selection. [OK]
Hint: L1 Lasso zeros coefficients for selection. [OK]
Common Mistakes:
2. In the context of tokenization for LLMs, which method is known for using a probabilistic model to determine the most likely tokenization of a sentence?
easy
Solution
Step 1: Identify the method using a probabilistic model.
SentencePiece uses a probabilistic model to tokenize sentences.Step 2: Eliminate wrong options.
BPE and WordPiece do not use probabilistic models; character-level tokenization is too granular.Final Answer:
Option A -> Option AQuick Check:
SentencePiece uses probabilities. [OK]
Hint: SentencePiece uses probabilities. [OK]
Common Mistakes:
3. A model using attention mechanisms is not providing expected interpretability insights. What is a likely cause?
medium
Solution
Step 1: Identify the role of attention.
Attention mechanisms provide insights through attention weights.Step 2: Diagnose the issue.
If insights are missing, it may be due to incorrect visualization of attention weights.Final Answer:
Option B -> Option BQuick Check:
Check attention weight visualization for insights. [OK]
Hint: Check attention weight visualization for insights. [OK]
Common Mistakes:
4. A Naive Bayes model is underperforming on a dataset. What is the most likely cause?
medium
Solution
Step 1: Identify Potential Causes
Naive Bayes assumes feature independence, so correlation can degrade performance.Step 2: Eliminate Other Causes
The model has too many parameters. is incorrect because Naive Bayes is not parameter-heavy. The features are not normalized. is incorrect because normalization is not critical for Naive Bayes. The dataset is too small. is incorrect because Naive Bayes can work well with small datasets.Final Answer:
Option A -> Option AQuick Check:
Correlated features degrade Naive Bayes. [[check]]
Hint: Correlated features degrade Naive Bayes. [[check]]
Common Mistakes:
5. You are designing a recommendation system for a video platform. Which metric would best capture user satisfaction if users tend to watch only the first few recommended videos?
hard
Solution
Step 1: Understand user behavior
Users watching only the first few videos means early precision is crucial.Step 2: Choose the metric
Precision at K directly measures the quality of the top K recommendations, aligning with user behavior.Final Answer:
Option A -> Option AQuick Check:
Precision at K focuses on top results. [OK]
Hint: Precision at K focuses on top results. [OK]
Common Mistakes:
