Practice
1. A Lasso regression model is underperforming with high bias. What is the most likely cause?
medium
Solution
Step 1: Identify the effect of high alpha in Lasso.
High alpha increases regularization strength, leading to high bias.Step 2: Eliminate wrong options.
Large datasets do not cause overfitting. High complexity increases variance, not bias. Non-normalized features affect scale, not bias directly.Final Answer:
Option D -> Option DQuick Check:
High alpha = high bias in Lasso. [OK]
Hint: High alpha = high bias in Lasso. [OK]
Common Mistakes:
2. In a real-time prediction system, how should you handle data splits to ensure both model performance and system efficiency?
hard
Solution
Step 1: Consider real-time constraints
Real-time systems need to adapt to new data while maintaining performance.Step 2: Evaluate options for adaptability and efficiency
Use a single train-test split to minimize latency. risks overfitting. Use a large test set to ensure model robustness. misallocates resources. Use a static validation set to simplify the system. lacks adaptability to new data.Final Answer:
Option D -> Option DQuick Check:
Rolling window adapts to new data efficiently. [OK]
Hint: Rolling window adapts to new data efficiently. [OK]
Common Mistakes:
3. In a time-series dataset, missing values occur at random intervals. Which imputation strategy is most suitable?
hard
Solution
Step 1: Consider the nature of time-series data
Time-series data often relies on temporal continuity.Step 2: Evaluate imputation strategies
Forward fill maintains temporal order, while mean and KNN ignore sequence. Backward fill is less intuitive for future predictions.Final Answer:
Option C -> Option CQuick Check:
Forward fill for time-series [OK]
Hint: Forward fill for time-series [OK]
Common Mistakes:
4. You are tasked with designing a system to detect and mitigate bias in real-time predictions for a financial application. Which approach would be most effective?
hard
Solution
Step 1: Identify the need for real-time bias mitigation.
Real-time adjustments require on-the-fly techniques.Step 2: Choose the most effective approach.
Post-processing techniques (D) can adjust predictions in real-time, ensuring fairness without retraining.Final Answer:
Option A -> Option AQuick Check:
Post-processing adjusts predictions in real-time. [OK]
Hint: Post-processing adjusts predictions in real-time. [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:
