Practice
1. In the context of LSTM networks, which component is primarily responsible for deciding what information to keep or discard from the cell state?
easy
Solution
Step 1: Identify the role of each gate in LSTM.
The forget gate determines what information to discard from the cell state.Step 2: Eliminate wrong options.
The input gate decides what new information to store, the output gate decides what to output, and the activation function is not a gate.Final Answer:
Option A -> Option AQuick Check:
Forget gate discards info in LSTM. [OK]
Hint: Forget gate discards info in LSTM. [OK]
Common Mistakes:
2. 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:
3. How would you adapt logistic regression to handle imbalanced datasets effectively?
hard
Solution
Step 1: Addressing class imbalance.
Applying class weights helps logistic regression focus more on the minority class by penalizing misclassifications more heavily.Step 2: Eliminate wrong options.
Use a higher learning rate to speed up convergence. is incorrect as learning rate affects convergence speed, not class balance. Increase the number of iterations to ensure convergence. is incorrect because more iterations don't address imbalance. Use a linear kernel to transform the feature space. is incorrect as logistic regression doesn't use kernels.Final Answer:
Option C -> Option CQuick Check:
Use class weights for imbalance [OK]
Hint: Use class weights for imbalance [OK]
Common Mistakes:
4. You need to implement a CI/CD pipeline for an ML model that requires frequent updates and real-time predictions. Which approach best handles these requirements?
hard
Solution
Step 1: Match requirements to approaches.
Frequent updates and real-time predictions require a system that can adapt quickly and deploy changes continuously.Step 2: Evaluate each option.
Batch processing (A) and scheduled deployments (D) are too slow. Manual deployment (C) is inefficient. Online learning (B) supports continuous updates and real-time predictions.Final Answer:
Option A -> Option AQuick Check:
Online learning = real-time updates. [OK]
Hint: Online learning = real-time updates. [OK]
Common Mistakes:
5. You are tasked with evaluating a regression model for a financial application where large errors are particularly costly. Which metric should you choose and why?
hard
Solution
Step 1: Consider the cost of large errors.
MSE penalizes larger errors more due to squaring, making it suitable for costly errors.Step 2: Eliminate wrong options.
MAE does not penalize large errors enough. RMSE is similar to MSE but does not emphasize large errors as much. Huber Loss is more for outliers, not large errors specifically.Final Answer:
Option C -> Option CQuick Check:
MSE penalizes large errors heavily. [OK]
Hint: MSE penalizes large errors heavily. [OK]
Common Mistakes:
