CAIC Machine Learning & Data Science 3 — Questions and Answers
Question 1: Which ensemble method trains multiple models in parallel on random subsets of the training data and aggregates their predictions?
- Boosting
- Stacking
- Bagging (Correct answer)
- Bayesian averaging
Correct answer: Bagging
Bagging (Bootstrap Aggregating) trains independent learners on bootstrapped samples and combines them via voting or averaging to reduce variance.
Question 2: What does the ROC curve plot?
- Precision vs. Recall at different thresholds
- True Positive Rate vs. False Positive Rate at different thresholds (Correct answer)
- Training loss vs. Validation loss over epochs
- Model accuracy vs. Dataset size
Correct answer: True Positive Rate vs. False Positive Rate at different thresholds
The ROC curve shows the tradeoff between sensitivity (TPR) and specificity (1-FPR) across all classification thresholds.
Question 3: Which regularization technique randomly sets a fraction of neuron activations to zero during each training step?
- L1 regularization
- Weight decay
- Dropout (Correct answer)
- Early stopping
Correct answer: Dropout
Dropout randomly deactivates neurons during training, forcing the network to learn redundant representations and reducing co-adaptation.
Question 4: In a confusion matrix for binary classification, which formula correctly computes Precision?
- TP / (TP + FN)
- TP / (TP + FP) (Correct answer)
- TN / (TN + FP)
- (TP + TN) / (TP + TN + FP + FN)
Correct answer: TP / (TP + FP)
Precision measures what fraction of predicted positives are actually positive: TP divided by all predicted positives (TP + FP).
Question 5: What is the key difference between supervised and unsupervised learning?
- Supervised learning uses neural networks; unsupervised uses decision trees
- Supervised learning requires labeled training data; unsupervised discovers patterns without labels (Correct answer)
- Supervised learning is faster to train than unsupervised learning
- Supervised learning works only on tabular data; unsupervised works on images
Correct answer: Supervised learning requires labeled training data; unsupervised discovers patterns without labels
Supervised learning learns a mapping from inputs to known labels, while unsupervised learning finds hidden structure in unlabeled data.
Question 6: Which metric measures the average magnitude of errors in the same units as the target variable, without squaring them?
- Mean Squared Error (MSE)
- Root Mean Squared Error (RMSE)
- Mean Absolute Error (MAE) (Correct answer)
- R-squared
Correct answer: Mean Absolute Error (MAE)
MAE computes the mean of absolute differences between predictions and actuals, keeping error in the original unit scale without amplifying outliers.
Question 7: What is 'feature engineering' in the context of machine learning?
- Selecting the best algorithm for a given dataset
- Transforming raw data into informative input representations for a model (Correct answer)
- Tuning hyperparameters using grid search
- Splitting data into training and test sets
Correct answer: Transforming raw data into informative input representations for a model
Feature engineering involves creating, transforming, or selecting variables from raw data to improve model performance.
Which ensemble method trains multiple models in parallel on random subsets of the training data and aggregates their predictions?