Data Science Supervised Learning Models 3 — Questions and Answers
Question 1: What is the bias-variance tradeoff?
- A balance between underfitting and overfitting errors (Correct answer)
- A tradeoff between speed and memory
- A choice between L1 and L2 penalties
- A method to balance classes
Correct answer: A balance between underfitting and overfitting errors
High bias underfits while high variance overfits; the tradeoff seeks minimal total error.
Question 2: In k-nearest neighbors, what happens as k increases?
- The decision boundary becomes smoother (Correct answer)
- The model overfits more
- Training time grows exponentially
- Features are dropped
Correct answer: The decision boundary becomes smoother
Larger k averages over more neighbors, smoothing the boundary and reducing variance.
Question 3: Which ensemble method builds trees sequentially, each correcting the previous one's errors?
- Gradient boosting (Correct answer)
- Random forest
- Bagging
- Voting classifier
Correct answer: Gradient boosting
Gradient boosting fits each new tree to the residual errors of the prior ensemble.
Question 4: What does a high recall but low precision indicate?
- Many false positives but few false negatives (Correct answer)
- Many false negatives
- Perfect classification
- No predictions made
Correct answer: Many false positives but few false negatives
High recall catches most positives, but low precision means many predicted positives are wrong.
Question 5: Why is feature scaling important for SVM and KNN?
- They rely on distance calculations sensitive to feature magnitude (Correct answer)
- They cannot handle text
- They require integer inputs
- They ignore feature values
Correct answer: They rely on distance calculations sensitive to feature magnitude
Distance-based models let large-magnitude features dominate unless features are scaled.
Question 6: What is the role of the learning rate in gradient descent?
- It controls the step size of weight updates (Correct answer)
- It sets the number of features
- It defines the loss function
- It counts training samples
Correct answer: It controls the step size of weight updates
The learning rate scales how far weights move along the gradient each iteration.
Question 7: Which model assumes feature independence given the class label?
- Naive Bayes (Correct answer)
- Random forest
- Neural network
- SVM
Correct answer: Naive Bayes
Naive Bayes assumes conditional independence of features, simplifying the joint probability.
What is the bias-variance tradeoff?