Data Science FREE Data Science Supervised Learning Algorithms Questions and Answers 2 — Questions and Answers
Question 1: Which supervised learning algorithm uses hyperplanes to separate data into classes and maximizes the margin between them?
- Support Vector Machine (Correct answer)
- K-Nearest Neighbors
- Naive Bayes
- Random Forest
Correct answer: Support Vector Machine
Support Vector Machines find the optimal hyperplane that maximizes the margin between classes in the feature space.
Question 2: In gradient boosting, what does each successive tree attempt to correct?
- The residual errors of the previous ensemble (Correct answer)
- The bias of the first tree only
- The variance of a single decision tree
- The feature importance rankings
Correct answer: The residual errors of the previous ensemble
Each new tree in gradient boosting is trained on the residual errors left by the cumulative prediction of all prior trees.
Question 3: What is the primary assumption made by the Naive Bayes classifier that simplifies its computation?
- Features are conditionally independent given the class label (Correct answer)
- The data follows a uniform distribution
- All features contribute equally to the prediction
- The decision boundary is always linear
Correct answer: Features are conditionally independent given the class label
Naive Bayes assumes that all features are conditionally independent of each other given the class label, which greatly simplifies probability calculations.
Question 4: Which regularization technique in linear regression adds the sum of squared coefficients as a penalty term to the loss function?
- Ridge regression (L2) (Correct answer)
- Lasso regression (L1)
- Elastic Net
- Stepwise regression
Correct answer: Ridge regression (L2)
Ridge regression applies L2 regularization by adding the sum of squared coefficients multiplied by a penalty parameter to the loss function.
Question 5: What problem does the 'kernel trick' solve in Support Vector Machines?
- It enables classification of non-linearly separable data without explicitly mapping to higher dimensions (Correct answer)
- It reduces the number of support vectors needed
- It eliminates the need for regularization parameters
- It automatically selects the best features
Correct answer: It enables classification of non-linearly separable data without explicitly mapping to higher dimensions
The kernel trick allows SVMs to operate in a high-dimensional feature space without explicitly computing the transformation, enabling non-linear decision boundaries.
Question 6: In a decision tree, what does the Gini impurity measure of 0 indicate about a node?
- All samples in the node belong to a single class (Correct answer)
- The node has equal representation of all classes
- The node should be pruned
- The split at that node is invalid
Correct answer: All samples in the node belong to a single class
A Gini impurity of 0 means the node is perfectly pure, containing samples from only one class.
Which supervised learning algorithm uses hyperplanes to separate data into classes and maximizes the margin between them?