Practice
1. In the context of distributional shift, which type of drift occurs when the statistical properties of the input features change over time?
easy
Solution
Step 1: Identify the type of drift.
Covariate drift refers to changes in the distribution of input features.Step 2: Eliminate wrong options.
Label drift involves changes in the distribution of the output labels. Concept drift involves changes in the relationship between inputs and outputs. Feature drift is not a standard term.Final Answer:
Option C -> Option CQuick Check:
Covariate drift = input feature change [OK]
Hint: Covariate drift = input feature change [OK]
Common Mistakes:
2.
import numpy as np
y_true = np.array([3, -0.5, 2, 7])
y_pred = np.array([2.5, 0.0, 2, 8])
mae = np.mean(np.abs(y_true - y_pred))
print(mae)What is the output of this code snippet?easy
Solution
Step 1: Calculate the absolute errors.
Errors are [0.5, 0.5, 0, 1].Step 2: Compute the mean of absolute errors.
Mean is (0.5 + 0.5 + 0 + 1) / 4 = 0.625.Final Answer:
Option A -> Option AQuick Check:
Sum errors, divide by count. [OK]
Hint: Sum absolute errors, divide by count. [OK]
Common Mistakes:
3. A neural network with dropout is not improving validation accuracy despite training for many epochs. What is a likely cause?
medium
Solution
Step 1: Analyze dropout impact
High dropout rates can lead to underfitting as too many neurons are deactivated.Step 2: Eliminate wrong options
The dropout rate is too low, causing overfitting. is incorrect because low dropout rates do not cause underfitting. The learning rate is too high, causing instability. is incorrect because learning rate issues would cause erratic training, not just poor validation accuracy. The batch size is too small, causing noisy gradients. is incorrect because small batch sizes affect convergence speed, not dropout effectiveness.Final Answer:
Option A -> Option AQuick Check:
High dropout can underfit. [OK]
Hint: High dropout can underfit. [OK]
Common Mistakes:
4. When deciding between MLflow and Weights & Biases for experiment tracking, which scenario makes MLflow a better choice?
medium
Solution
Step 1: Compare MLflow and W&B features
MLflow is often chosen for self-hosting due to its open-source nature.Step 2: Match features to scenarios
MLflow's self-hosting is ideal for environments with strict data privacy requirements.Final Answer:
Option C -> Option CQuick Check:
MLflow = Self-hosting [OK]
Hint: MLflow = Self-hosting [OK]
Common Mistakes:
5. When deciding between Few-Shot and Chain-of-Thought prompting, which scenario is best suited for Chain-of-Thought?
medium
Solution
Step 1: Understand Chain-of-Thought
Chain-of-Thought is best for tasks requiring complex reasoning.Step 2: Eliminate wrong options
When the task involves simple factual recall. is incorrect as factual recall doesn't need reasoning. When the model needs to be fine-tuned with a few examples. is about Few-Shot, not Chain-of-Thought. When the task requires generating creative content. is unrelated to reasoning.Final Answer:
Option B -> Option BQuick Check:
Use Chain-of-Thought for complex reasoning tasks. [OK]
Hint: Use Chain-of-Thought for complex reasoning tasks. [OK]
Common Mistakes:
