Practice
Solution
Step 1: Identify the purpose of calibration.
Calibration aims to ensure that predicted probabilities reflect true likelihoods.Step 2: Evaluate each metric.
Accuracy, precision, and F1 score do not consider probability estimates, only classification decisions. Log Loss penalizes incorrect probability estimates, making it suitable for calibration.Final Answer:
Option C -> Option CQuick Check:
Log Loss evaluates probability accuracy. [OK]
import numpy as np
from sklearn.model_selection import train_test_split
X = np.array([1, 2, 3, 4, 5, 6, 7, 8, 9, 10])
y = np.array([1, 1, 1, 1, 0, 0, 0, 0, 0, 0])
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)
print(len(X_train), len(X_test))Solution
Step 1: Calculate the split sizes
With a test_size of 0.2, 20% of 10 samples go to the test set, i.e., 2 samples.Step 2: Determine the training set size
The remaining 80% (8 samples) go to the training set.Final Answer:
Option B -> Option BQuick Check:
80% train, 20% test split. [OK]
Solution
Step 1: Analyze the impact of mean imputation
Mean imputation can introduce bias, especially if data is not normally distributed.Step 2: Eliminate other causes
Variance reduction and overfitting are less likely causes; dataset size remains unchanged.Final Answer:
Option B -> Option BQuick Check:
Bias from mean imputation [OK]
Solution
Step 1: Evaluate computational needs
Semantic segmentation is generally less computationally intensive than instance or panoptic segmentation.Step 2: Eliminate wrong options
Instance segmentation is more detailed and resource-heavy, panoptic combines both, and object detection is not segmentation.Final Answer:
Option C -> Option CQuick Check:
Semantic = Less computation than instance [OK]
Solution
Step 1: Identify potential causes
Sudden performance drops often relate to changes in data or environment.Step 2: Choose a systematic approach
Checking for changes in data preprocessing is a logical first step to identify if the input data has changed.Final Answer:
Option A -> Option AQuick Check:
Sudden drop = check data changes [OK]
