DSE Knowledge 3 — Questions and Answers
Question 1: Which algorithm is a non-parametric, instance-based learning method that classifies new points based on the majority label among their nearest neighbors?
- Logistic Regression
- K-Nearest Neighbors (KNN) (Correct answer)
- Naive Bayes
- Support Vector Machine
Correct answer: K-Nearest Neighbors (KNN)
KNN stores training examples and classifies new instances by a vote among the k closest training points in feature space.
Question 2: What is the difference between precision and recall in a classification context?
- Precision measures true negatives; recall measures true positives
- Precision is TP/(TP+FP); recall is TP/(TP+FN) (Correct answer)
- Precision is TP/(TP+FN); recall is TP/(TP+FP)
- They are the same metric computed on different datasets
Correct answer: Precision is TP/(TP+FP); recall is TP/(TP+FN)
Precision measures how many predicted positives are actually positive, while recall measures how many actual positives were correctly identified.
Question 3: Which data structure does a decision tree use to partition feature space?
- Weighted graph
- Recursive binary splits based on feature thresholds (Correct answer)
- Hash map of feature-label pairs
- Linear boundary in high-dimensional space
Correct answer: Recursive binary splits based on feature thresholds
Decision trees recursively split the data using axis-aligned thresholds on individual features, creating a hierarchical partition of the input space.
Question 4: What is 'feature engineering' in a data science workflow?
- Selecting the best machine learning algorithm for a task
- Creating, transforming, or selecting input variables to improve model performance (Correct answer)
- Tuning hyperparameters using grid search
- Evaluating model fairness across demographic groups
Correct answer: Creating, transforming, or selecting input variables to improve model performance
Feature engineering involves creating or transforming raw variables to make patterns more learnable by a model.
Question 5: In a confusion matrix for binary classification, what does a False Negative (FN) represent?
- Model predicted positive; actual class is positive
- Model predicted negative; actual class is positive (Correct answer)
- Model predicted positive; actual class is negative
- Model predicted negative; actual class is negative
Correct answer: Model predicted negative; actual class is positive
A False Negative occurs when the model predicts the negative class but the true label is positive, meaning a real positive was missed.
Question 6: Which regularization technique adds the sum of absolute values of coefficients to the loss function?
- Ridge (L2)
- Elastic Net
- Lasso (L1) (Correct answer)
- Dropout
Correct answer: Lasso (L1)
Lasso (L1) regularization penalizes the sum of absolute coefficient values, which can shrink some coefficients to exactly zero for feature selection.
Question 7: What is the Central Limit Theorem's key implication for data science practice?
- All datasets are normally distributed
- The sampling distribution of the mean approaches normality as sample size grows, regardless of the population distribution (Correct answer)
- Larger datasets always produce better models
- Variance decreases linearly with sample size
Correct answer: The sampling distribution of the mean approaches normality as sample size grows, regardless of the population distribution
The CLT states that sample means become approximately normally distributed with large enough samples, enabling parametric inference even for non-normal populations.
Which algorithm is a non-parametric, instance-based learning method that classifies new points based on the majority label among their nearest neighbors?