DSE Data Science 2 — Questions and Answers
Question 1: Which technique is used to reduce the dimensionality of data while preserving as much variance as possible?
- Linear Discriminant Analysis
- Principal Component Analysis (Correct answer)
- K-Means Clustering
- Logistic Regression
Correct answer: Principal Component Analysis
PCA transforms data into orthogonal components ordered by the amount of variance they explain.
Question 2: In a confusion matrix, what does a False Negative represent?
- Model predicted positive and was correct
- Model predicted negative and was correct
- Model predicted positive but was wrong
- Model predicted negative but the actual was positive (Correct answer)
Correct answer: Model predicted negative but the actual was positive
A False Negative occurs when the model predicts the negative class but the true label is positive.
Question 3: What is the purpose of regularization in machine learning models?
- Speed up training time
- Increase model complexity
- Prevent overfitting by penalizing large coefficients (Correct answer)
- Normalize input features to zero mean
Correct answer: Prevent overfitting by penalizing large coefficients
Regularization adds a penalty term to the loss function to discourage overly complex models.
Question 4: Which of the following best describes the bias-variance tradeoff?
- High bias causes overfitting; high variance causes underfitting
- High bias causes underfitting; high variance causes overfitting (Correct answer)
- Both bias and variance decrease as model complexity increases
- Bias and variance are independent of model complexity
Correct answer: High bias causes underfitting; high variance causes overfitting
Simple models have high bias (underfitting) while complex models have high variance (overfitting).
Question 5: What does the term 'feature engineering' refer to in data science?
- Selecting the best algorithm for a task
- Creating or transforming input variables to improve model performance (Correct answer)
- Tuning hyperparameters of a model
- Evaluating model accuracy on test data
Correct answer: Creating or transforming input variables to improve model performance
Feature engineering involves creating new features or modifying existing ones to help the model learn better.
Question 6: In the context of gradient descent, what is the learning rate?
- The proportion of training data used each epoch
- The number of iterations to train the model
- A scalar that controls the step size during parameter updates (Correct answer)
- The ratio of correctly predicted samples
Correct answer: A scalar that controls the step size during parameter updates
The learning rate determines how large each update step is when minimizing the loss function.
Question 7: Which cross-validation strategy is most appropriate when data is time-ordered and temporal leakage must be avoided?
- K-Fold cross-validation
- Stratified K-Fold cross-validation
- Leave-One-Out cross-validation
- Time Series Split cross-validation (Correct answer)
Correct answer: Time Series Split cross-validation
Time Series Split ensures training folds always precede validation folds to prevent future data leaking into training.
Which technique is used to reduce the dimensionality of data while preserving as much variance as possible?