Practice
Solution
Step 1: Understand the methods
Interleaving method allows for simultaneous comparison, reducing temporal bias.Step 2: Eliminate wrong options
Holdout and cross-validation do not address temporal trends. Causal inference is more about understanding causality than handling temporal trends.Final Answer:
Option B -> Option BQuick Check:
Interleaving reduces temporal bias. [OK]
import numpy as np
data = np.array([1, 2, 3, 4, 5])
mask = data > 3
result = data[mask]
print(result)Solution
Step 1: Understand the code logic
The mask is applied to filter elements greater than 3.Step 2: Determine the output
Only elements 4 and 5 satisfy the condition, so result is [4, 5].Final Answer:
Option A -> Option AQuick Check:
Mask filters elements > 3. [OK]
Solution
Step 1: Evaluate multilingual strategies
Multilingual BERT is designed to handle multiple languages effectively, unlike Word2Vec.Step 2: Eliminate wrong options
Train separate Word2Vec models for each language and concatenate the embeddings. doesn't capture cross-lingual semantics. Use a shared vocabulary across languages and train a single Word2Vec model. is impractical due to vocabulary differences. Translate all text to a single language before training Word2Vec. loses language-specific nuances.Final Answer:
Option A -> Option AQuick Check:
Multilingual BERT for cross-language tasks [OK]
Solution
Step 1: Identify latency reduction strategies
Reducing the number of trees and their depth directly decreases computation time per prediction.Step 2: Eliminate wrong options
Use a batch prediction approach to handle multiple requests at once. is incorrect because batch processing increases latency for individual requests. Deploy the model on a high-performance GPU server. is incorrect because LightGBM is CPU-optimized. Use a distributed computing framework to parallelize predictions. is incorrect because distributed frameworks add overhead, increasing latency.Final Answer:
Option C -> Option CQuick Check:
Fewer trees = Lower latency [OK]
Solution
Step 1: Identify the goal
Effect size measures the magnitude of a feature's impact, not just its statistical significance.Step 2: Choose the correct metric
Cohen's d is a standard measure for effect size, especially in comparing means.Final Answer:
Option D -> Option DQuick Check:
Effect size? Use Cohen's d [OK]
