Decision Trees Quiz Questions

1. Which of the following is a common method for splitting nodes in a decision tree?

view answer: A. Gini impurity
Explanation: Gini impurity is a common method for splitting nodes in a decision tree, as it measures the degree of impurity in a node based on the distribution of class labels.
2. What is the main disadvantage of decision trees in machine learning?

view answer: A. They are prone to overfitting
Explanation: Decision trees are prone to overfitting, especially when they grow too deep, as they can learn the noise in the data and lose their generalization capabilities.
3. What is the purpose of pruning in decision trees?

view answer: A. To reduce the depth of the tree and prevent overfitting
Explanation: Pruning is a technique used in decision trees to reduce the depth of the tree and prevent overfitting by removing branches that do not contribute significantly to the tree's predictive performance.
4. Which of the following is a popular algorithm for constructing decision trees?

view answer: A. ID3
Explanation: ID3 (Iterative Dichotomiser 3) is a popular algorithm for constructing decision trees, which uses information gain as the splitting criterion.
5. What is the main difference between classification and regression trees (CART)?

view answer: A. Classification trees predict categorical variables, while regression trees predict continuous variables
Explanation: The main difference between classification and regression trees (CART) is that classification trees predict categorical variables, while regression trees predict continuous variables.
6. What is the primary purpose of the Random Forest algorithm?

view answer: A. To combine multiple decision trees to improve prediction performance
Explanation: The primary purpose of the Random Forest algorithm is to combine multiple decision trees to improve prediction performance by reducing overfitting and increasing the model's robustness.
7. What is the main advantage of using bagging with decision trees?

view answer: A. It reduces overfitting by averaging the predictions of multiple trees
Explanation: Bagging, or Bootstrap Aggregating, reduces overfitting in decision trees by averaging the predictions of multiple trees, each trained on a different subset of the training data, leading to a more robust and accurate ensemble model.
8. What is the primary difference between bagging and boosting in the context of decision trees?

view answer: A. Bagging trains multiple trees independently, while boosting trains trees sequentially
Explanation: The primary difference between bagging and boosting is that bagging trains multiple trees independently, while boosting trains trees sequentially, with each tree focusing on correcting the errors made by the previous tree.
9. What is the primary purpose of the AdaBoost algorithm?

view answer: A. To combine multiple decision trees to improve prediction performance
Explanation: The primary purpose of the AdaBoost (Adaptive Boosting) algorithm is to combine multiple decision trees to improve prediction performance by training the trees sequentially, with each tree focusing on correcting the errors made by the previous tree.
10. Which of the following is a popular method for splitting nodes in a regression tree?

view answer: C. Mean squared error
Explanation: Mean squared error (MSE) is a popular method for splitting nodes in a regression tree, as it measures the average squared difference between the actual values and the predicted values in a node.
11. What is a decision boundary in the context of decision trees?

view answer: A. A hyperplane that separates different classes in the feature space
Explanation: A decision boundary is a hyperplane that separates different classes in the feature space, corresponding to the rules and splits in a decision tree.
12. What is entropy in the context of decision trees?

view answer: A. A measure of disorder or impurity in a node
Explanation: In decision trees, entropy is a measure of disorder or impurity in a node, representing the uncertainty associated with the class labels in the node.
13. Which of the following is a common stopping criterion for growing a decision tree?

view answer: D. Both A and B
Explanation: Common stopping criteria for growing a decision tree include reaching a maximum depth and achieving a minimum information gain, both of which can help prevent overfitting.
14. In the context of decision trees, what is "one-hot encoding" used for?

view answer: B. To convert categorical variables into binary variables
Explanation: One-hot encoding is a technique used in decision trees to convert categorical variables into binary variables, allowing the tree to split on these features more effectively.
15. How do decision trees handle continuous variables?

view answer: A. By discretizing the continuous variables into intervals
Explanation: Decision trees handle continuous variables by discretizing them into intervals, which allows the tree to split on these features effectively.
16. What is the main disadvantage of using a large maximum depth for a decision tree?

view answer: A. It leads to overfitting
Explanation: Using a large maximum depth for a decision tree can lead to overfitting, as the tree may learn the noise in the data and lose its generalization capabilities.
17. Which of the following techniques can be used to reduce overfitting in decision trees?

view answer: D. All of the above
Explanation: Pruning, bagging, and boosting are all techniques that can be used to reduce overfitting in decision trees by controlling the complexity of the tree or combining the predictions of multiple trees.
18. What is the primary purpose of the Gradient Boosting Machine (GBM) algorithm?

view answer: A. To combine multiple decision trees to improve prediction performance
Explanation: The primary purpose of the Gradient Boosting Machine (GBM) algorithm is to combine multiple decision trees to improve prediction performance by training the trees sequentially, with each tree focusing on correcting the errors made by the previous tree using gradient descent.
19. Which of the following is NOT a common use case for decision trees?

view answer: C. Image recognition
Explanation: Image recognition is not a common use case for decision trees, as decision trees are generally less effective at handling high-dimensional data, such as images, compared to other machine learning techniques like convolutional neural networks.
20. Which of the following is a disadvantage of using decision trees for regression tasks?

view answer: D. Both B and C
Explanation: Decision trees are prone to overfitting and are sensitive to small changes in the data, which can make them less reliable for regression tasks compared to other machine learning techniques.
21. In the context of decision trees, what does "feature importance" refer to?

view answer: A. The contribution of a feature to the overall performance of the tree
Explanation: Feature importance in decision trees refers to the contribution of a feature to the overall performance of the tree, typically measured by its impact on the impurity reduction across all splits in the tree.
22. Which of the following is a disadvantage of using decision trees for classification tasks?

view answer: B. Decision trees are prone to overfitting
Explanation: Decision trees are prone to overfitting, especially when they grow too deep, as they can learn the noise in the data and lose their generalization capabilities.
23. Which of the following is an ensemble learning technique that uses decision trees as base learners?

view answer: A. Random Forest
Explanation: Random Forest is an ensemble learning technique that uses decision trees as base learners, combining their predictions to improve overall performance, reduce overfitting, and increase model robustness.
24. How can decision trees be made more robust to noise in the data?

view answer: C. By using ensemble techniques like bagging or boosting
Explanation: Decision trees can be made more robust to noise in the data by using ensemble techniques like bagging or boosting, which combine the predictions of multiple trees to improve performance and reduce overfitting.
25. What is the primary difference between a decision tree and a decision stump?

view answer: A. A decision tree has multiple levels, while a decision stump has only one level
Explanation: The primary difference between a decision tree and a decision stump is that a decision tree has multiple levels, while a decision stump has only one level, making it a simple, one-split tree.
26. Which of the following algorithms can be used for both classification and regression tasks?

view answer: D. All of the above
Explanation: Decision trees, k-Nearest Neighbors, and Support Vector Machines can all be used for both classification and regression tasks by adapting their prediction mechanisms to accommodate different types of target variables.
27. In a decision tree, what is the purpose of the leaf nodes?

view answer: A. To represent the class label or value to be predicted
Explanation: In a decision tree, the purpose of the leaf nodes is to represent the class label (in classification tasks) or value (in regression tasks) to be predicted, based on the path from the root node to the leaf node.
28. What is a common technique used to reduce the variance of a decision tree?

view answer: B. Bagging
Explanation: Bagging, or Bootstrap Aggregating, is a common technique used to reduce the variance of a decision tree by averaging the predictions of multiple trees, each trained on a different subset of the training data, leading to a more robust and accurate ensemble model.
29. What is a decision tree in the context of machine learning?

view answer: B. A tree-like structure used to make predictions based on input features
Explanation: A decision tree is a tree-like structure used in machine learning to make predictions based on input features by recursively splitting the data into subsets based on feature values.
30. What is the primary advantage of using decision trees in machine learning?

view answer: B. They are easy to interpret and visualize
Explanation: Decision trees are easy to interpret and visualize, making them a popular choice for situations where interpretability is important, such as medical diagnosis or credit risk assessment.

© aionlinecourse.com All rights reserved.