CAIC Machine Learning & Data Science 2 — Questions and Answers
Question 1: Which technique is used to reduce the number of input features by combining them into fewer dimensions while preserving variance?
- L2 regularization
- Principal Component Analysis (Correct answer)
- Dropout
- Batch normalization
Correct answer: Principal Component Analysis
PCA projects data onto orthogonal axes (principal components) that capture the most variance, effectively reducing dimensionality.
Question 2: A dataset has 95% negative samples and 5% positive samples. Which metric is LEAST informative for evaluating a classifier on this dataset?
- F1-score
- Accuracy (Correct answer)
- ROC-AUC
- Precision-Recall AUC
Correct answer: Accuracy
Accuracy is misleading on imbalanced datasets because a model predicting all negatives achieves 95% accuracy without learning anything meaningful.
Question 3: What does the term 'bias-variance tradeoff' describe in machine learning?
- The balance between training speed and model accuracy
- The tension between underfitting (high bias) and overfitting (high variance) (Correct answer)
- The tradeoff between precision and recall
- The balance between data quantity and model complexity
Correct answer: The tension between underfitting (high bias) and overfitting (high variance)
High bias models underfit by making oversimplified assumptions, while high variance models overfit by being too sensitive to training data noise.
Question 4: In gradient boosting, each successive tree is trained to predict what?
- The original target labels
- The residual errors of the previous ensemble (Correct answer)
- The feature importances of prior trees
- The out-of-bag sample predictions
Correct answer: The residual errors of the previous ensemble
Gradient boosting fits each new tree to the residuals (errors) left by the current ensemble, iteratively reducing prediction error.
Question 5: Which cross-validation strategy is most appropriate when the dataset has a temporal ordering and future data must not leak into training?
- Stratified k-fold
- Leave-one-out
- Time series split (walk-forward validation) (Correct answer)
- Shuffle split
Correct answer: Time series split (walk-forward validation)
Time series split ensures training always uses only past data and validation uses future data, preventing temporal leakage.
Question 6: What is the primary purpose of the 'elbow method' in k-means clustering?
- To detect outliers in the dataset
- To select the optimal number of clusters k (Correct answer)
- To initialize cluster centroids
- To normalize feature scales
Correct answer: To select the optimal number of clusters k
The elbow method plots inertia versus k and looks for the point where adding more clusters yields diminishing returns.
Question 7: A model trained on data from 2020–2022 is deployed in 2025 and its performance degrades. What phenomenon describes this?
- Overfitting
- Concept drift (Correct answer)
- Underfitting
- Feature leakage
Correct answer: Concept drift
Concept drift occurs when the statistical relationship between input features and the target variable changes over time after deployment.
Which technique is used to reduce the number of input features by combining them into fewer dimensions while preserving variance?