Practice
1. In a binary classification problem where false positives are costly, which metric should be prioritized?
easy
Solution
Step 1: Identify the cost concern.
False positives are costly, so we need to minimize them.Step 2: Choose the metric that minimizes false positives.
Precision is the metric that focuses on minimizing false positives.Final Answer:
Option A -> Option AQuick Check:
Precision minimizes false positives. [OK]
Hint: Precision minimizes false positives. [OK]
Common Mistakes:
2. In the context of continual learning, which of the following is a primary advantage over periodic retraining?
easy
Solution
Step 1: Identify the key advantage of continual learning.
Continual learning allows models to adapt immediately to new data without waiting for a retraining cycle.Step 2: Eliminate wrong options.
Reduced risk of catastrophic forgetting is incorrect because continual learning can increase the risk of catastrophic forgetting. Lower computational cost over time is incorrect because continual learning can be computationally expensive due to constant updates. Better performance on static datasets is incorrect because continual learning is not specifically better for static datasets.Final Answer:
Option D -> Option DQuick Check:
Continual learning adapts immediately. [OK]
Hint: Continual learning adapts immediately. [OK]
Common Mistakes:
3. Given the following Python code snippet for a segmentation task, what will be the output shape if the input image shape is (256, 256, 3) and the model outputs a segmentation map with 10 classes?
import numpy as np
input_image = np.random.rand(256, 256, 3)
model_output = np.random.rand(256, 256, 10)easy
Solution
Step 1: Understand the model output
The model outputs a segmentation map with a shape corresponding to the input spatial dimensions and the number of classes.Step 2: Eliminate wrong options
(256, 256, 3) is the input shape, (256, 256, 1) implies binary segmentation, and (256, 256) lacks class dimension.Final Answer:
Option A -> Option AQuick Check:
Output shape = Input spatial + class channels [OK]
Hint: Output shape = Input spatial + class channels [OK]
Common Mistakes:
4. When deploying a model to production, which trade-off is most critical to consider?
medium
Solution
Step 1: Identify the key trade-off in production.
In production, inference latency is crucial as it affects user experience.Step 2: Eliminate less relevant trade-offs.
Model accuracy vs. training time is more relevant during development, not deployment. Data size vs. interpretability and feature engineering vs. hyperparameter tuning are less critical in production.Final Answer:
Option B -> Option BQuick Check:
Latency impacts user experience in production. [OK]
Hint: Latency impacts user experience in production. [OK]
Common Mistakes:
5. A retail company wants to use ML to optimize inventory levels. Which approach best frames this business problem as an ML problem?
hard
Solution
Step 1: Identify the core ML task
Predicting future sales based on historical data aligns well with regression, which is suitable for continuous output prediction.Step 2: Eliminate wrong options
Use clustering to group similar products and predict demand is incorrect because clustering is unsupervised and doesn't predict demand. Use classification to categorize products into high and low demand is incorrect because classification is for discrete categories, not continuous predictions. Use reinforcement learning to dynamically adjust inventory levels is incorrect because reinforcement learning is complex and not necessary for static predictions.Final Answer:
Option A -> Option AQuick Check:
Use regression for continuous predictions like sales. [OK]
Hint: Use regression for continuous predictions like sales. [OK]
Common Mistakes:
