Data Science Data Science MCQ 2 — Questions and Answers
Question 1: Which technique is most appropriate for reducing the dimensionality of a dataset while preserving as much variance as possible?
- Principal Component Analysis (Correct answer)
- K-means clustering
- Logistic regression
- Random oversampling
Correct answer: Principal Component Analysis
PCA projects data onto orthogonal components ordered by the variance they capture.
Question 2: In a confusion matrix, what does precision measure?
- True positives divided by all predicted positives (Correct answer)
- True positives divided by all actual positives
- Correct predictions divided by total predictions
- True negatives divided by all negatives
Correct answer: True positives divided by all predicted positives
Precision is TP / (TP + FP), the fraction of positive predictions that are correct.
Question 3: Which method helps prevent overfitting by penalizing large model coefficients?
- L2 (Ridge) regularization (Correct answer)
- Increasing the learning rate
- Adding more features
- Removing the validation set
Correct answer: L2 (Ridge) regularization
Ridge regularization adds a penalty proportional to the squared magnitude of coefficients.
Question 4: What is the primary purpose of cross-validation?
- To estimate model performance on unseen data more reliably (Correct answer)
- To increase the size of the training set
- To remove outliers automatically
- To select the learning rate
Correct answer: To estimate model performance on unseen data more reliably
Cross-validation rotates train/test splits to give a more robust performance estimate.
Question 5: Which distance metric is most commonly used by default in K-means clustering?
- Euclidean distance (Correct answer)
- Manhattan distance
- Cosine similarity
- Hamming distance
Correct answer: Euclidean distance
K-means minimizes within-cluster sum of squared Euclidean distances.
Question 6: A model performs well on training data but poorly on test data. This is a sign of what?
- Overfitting (Correct answer)
- Underfitting
- Class imbalance
- Data leakage from test to train
Correct answer: Overfitting
Overfitting occurs when a model memorizes training noise and fails to generalize.
Question 7: Which of the following is a supervised learning task?
- Predicting house prices from labeled sales data (Correct answer)
- Grouping customers into segments without labels
- Reducing dimensions with t-SNE
- Detecting communities in a graph
Correct answer: Predicting house prices from labeled sales data
Supervised learning uses labeled outputs, such as known house prices, to train a model.
Which technique is most appropriate for reducing the dimensionality of a dataset while preserving as much variance as possible?