Practice
1. In the context of data leakage, which of the following scenarios is most likely to cause leakage during model training?
easy
Solution
Step 1: Identify potential leakage sources
Data leakage occurs when information from outside the training dataset is used to create the model.Step 2: Eliminate wrong options
Using a validation set that is randomly sampled from the training data. is common practice, Normalizing features using statistics from the entire dataset before splitting. is a preprocessing mistake but not leakage, Using a large number of features in the model. is about complexity, not leakage.Final Answer:
Option A -> Option AQuick Check:
Future data in training = leakage risk [OK]
Hint: Future data in training = leakage risk [OK]
Common Mistakes:
2. In the context of transfer learning, why is it beneficial to pretrain a model on a large dataset before fine-tuning it on a smaller, task-specific dataset?
easy
Solution
Step 1: Understand the purpose of pretraining.
Pretraining allows the model to learn general features from a large dataset.Step 2: Eliminate wrong options.
Pretraining ensures the model learns task-specific features from the start. is incorrect because pretraining focuses on general, not task-specific, features. Pretraining reduces the need for any further training on the task-specific dataset. is incorrect because fine-tuning is still necessary. Pretraining is only useful for models with a large number of parameters. is incorrect because pretraining is beneficial regardless of model size.Final Answer:
Option A -> Option AQuick Check:
Pretrain for general features, fine-tune for specific tasks. [check]
Hint: Pretrain for general features, fine-tune for specific tasks. [check]
Common Mistakes:
3. For a system with highly volatile data, which approach is more suitable and why?
medium
Solution
Step 1: Consider the nature of volatile data.
Volatile data can introduce noise, which continual learning might overfit to.Step 2: Evaluate the options.
Continual learning, because it adapts quickly to changes. is incorrect because continual learning can overfit to noise. Continual learning, because it is computationally cheaper. is incorrect because continual learning is not necessarily cheaper. Periodic retraining, because it ensures model stability. is incorrect because while periodic retraining ensures stability, it is not the primary reason for its suitability here.Final Answer:
Option B -> Option BQuick Check:
Volatile data needs stability. [OK]
Hint: Volatile data needs stability. [OK]
Common Mistakes:
4. When should you prefer using Gini Impurity over Entropy in decision trees?
medium
Solution
Step 1: Compare computational efficiency.
Gini Impurity is computationally less intensive than Entropy.Step 2: Eliminate wrong options.
Interpretability is not affected by the choice, imbalance handling is not specific to Gini, and both can handle continuous features.Final Answer:
Option A -> Option AQuick Check:
Gini is faster than Entropy. [OK]
Hint: Gini is faster than Entropy. [OK]
Common Mistakes:
5. You are tasked with adapting a Transformer model for a real-time translation application on mobile devices. Which approach is most suitable?
hard
Solution
Step 1: Consider constraints
Real-time applications on mobile devices require efficient models with low latency and small size.Step 2: Eliminate wrong options
Use a larger model with more layers for better accuracy is incorrect because larger models increase latency. Increase the number of attention heads for better context understanding is incorrect because more heads increase complexity. Use a higher learning rate to speed up training is incorrect because learning rate affects training, not inference.Final Answer:
Option B -> Option BQuick Check:
Mobile apps need efficient, small models. [OK]
Hint: Mobile apps need efficient, small models. [OK]
Common Mistakes:
