Practice
Solution
Step 1: Define data drift
Data drift refers to changes in the statistical properties of input data over time.Step 2: Eliminate wrong options
A sudden drop in model accuracy due to a bug in the code. describes a bug, not data drift. An increase in the model's training time due to larger datasets. is about computational resources, not data properties. A decrease in the model's interpretability over time. is unrelated to data drift.Final Answer:
Option C -> Option CQuick Check:
Data drift = change in data stats [OK]
import torch
optimizer = torch.optim.SGD(model.parameters(), lr=0.1)
for epoch in range(10):
for data, target in dataloader:
optimizer.zero_grad()
output = model(data)
loss = loss_fn(output, target)
loss.backward()
optimizer.step()
print(optimizer.param_groups[0]['lr'])What will be printed after the loop?Solution
Step 1: Understand the code.
The learning rate is set to 0.1 and not changed in the loop.Step 2: Check for learning rate updates.
SGD without a scheduler keeps the learning rate constant.Final Answer:
Option C -> Option CQuick Check:
SGD without scheduler keeps lr constant. [check]
Solution
Step 1: Understand p-value definition
A p-value is the probability of observing the data, or something more extreme, given that the null hypothesis is true.Step 2: Eliminate wrong options
The probability that the null hypothesis is true. is incorrect because p-value is not the probability that the null hypothesis is true. The probability of the alternative hypothesis being true. is incorrect because it does not relate to the alternative hypothesis. The probability of making a Type I error. is incorrect because it confuses p-value with Type I error probability.Final Answer:
Option A -> Option AQuick Check:
P-value is about data given null hypothesis [OK]
Solution
Step 1: Consider computational efficiency.
Filter methods are computationally inexpensive as they do not involve training models.Step 2: Eliminate wrong options.
Wrapper methods and recursive feature elimination are computationally intensive. Embedded methods require model training, which can be resource-heavy.Final Answer:
Option D -> Option DQuick Check:
Filter = low cost, no model. [OK]
Solution
Step 1: Identify task requirements
The task requires capturing both spatial and temporal hierarchies, which suggests a hybrid approach.Step 2: Eliminate wrong options
Use a shallow CNN for spatial features and a separate RNN for temporal features. is incorrect because separate models may not capture interactions. Use a shallow RNN for temporal features and ignore spatial features. is incorrect because it ignores spatial features. Use a deep CNN for spatial features and ignore temporal features. is incorrect because it ignores temporal features.Final Answer:
Option A -> Option AQuick Check:
Hybrid models for spatial-temporal tasks. [OK]
