R Markdown
## 1. Fill-in-the-blank: The __________________ measures how much more organized the input values become when we divide them up using a given feature
## Answer: Information gain
## 2. Fill-in-the-blank: One of the information theoretic metrics used for identifying the most informative features for a decision tree is ...
##
## Answer: enthropy
## 3. Explain information gain.
##
## Answer: measures how much more organized the input values become when we divide them up using a given feature
## 4. Fill-in-the-blank: The degree to which a subset of examples contains only a single class is known as __________________.
## Answer: purity
##
## 5. Decision trees are usually faced with the challenge to identify which feature is greater than 10. True or False.
## Answer: False
## 6. What does the argument, “lwd = “ indicate?
## Answer: used to specify the line width
## 7. Fill-in-the-blank: Tree-based modeling techniques can be used to solve ____________.
## Answer: empower predictive models with high accuracy, stability and ease of interpretation.
## 8. Tree-based models can address both _____________ and _____________ tasks.
## Answer: regression and classification
## 9. List four other key characteristics of tree-based models.
## Answer: interpretability, efficiency, and flexibility
##
## 10. Will tree-based models achieve top predictive performance on classification or regression tasks?
## Answer: No, they will not achieve top predictive performance
## 11. What is a tree-based model in terms of a hierarchy construction?
## Answer: begins at the root node ( a rectangular shaped decision structure), where it is then passed through decision nodes that require choices to be made based on the attributes of the job. These choices split the data across branches that indicate potential outcomes of a decision, depicted as “yes” or “no” outcomes, though in some cases there may be more than two possibilities.
## Answer: In the case a final decision can be made, the tree is terminated by leaf nodes (also known as terminal nodes) that denote the action that should be taken as a result of the series of decisions
## 12. Where do we find the predictions of the tree-based model?
## Answer: the leaf nodes provide the expected result given the series of events in the tree
## 13. The tree-based model is made up of branches and nodes. What is the top node called?
## Answer: Root node
## 14. Fill-in-the-blank: As you follow a path from the top node to the leaf node, the path carries you through a conjunction of ____________ ___________ that leads to the prediction.
## Answer: Features such as Yes and No outcomes
## 15. Give two examples of tree-based models.
## Answer: Decision Trees and Random Forest models
## 16. (a) The breast cancer dataset is found in
## which package?
## Answer: Mass package
## (b) The Boston Housing dataset is found in which package?
## Answer: Mass R package
## 18. Fill-in-the-blank: Each node of the tree
## has a ___________ ____________ on one of the predictors. (e.g., size < 2.5)
## Answer: Leaf or value
## 19. In tree-based modeling, trees are built
using an algorithm that builds trees recursively (a recursive partitioning algorithm). This algorithm has three key issues. List these issues.
## Answer: handling continuous attributes,
overfitting and determining how deeply to grow the decision tree
## 20. TRUE or FALSE: Both the classification and the regression trees are grown using the recursive partitioning algorithm.
## Answer True
## 21. Classification trees typically use criteria related to the minimization of the error rate. Regression trees typically use the least squares error criterion that minimizes the mean squared error of the tree.
## List three criteria that classification trees use with respect to minimizing the error rate.
## Answer: Classification error rate:
## proportion of instances misclassified over
## the whole set of instances.
## 22. The Gini Index equations are used for what task?
## Answer: measures the degree or probability of a particular variable being wrongly classified when it is randomly chosen
## 23. When working with regression trees, what
## method should we use for selecting the best
## logical test?
## Answer: Least squares criterion
## 24. Explain the difference between classes and class levels in a decision tree.
## Answer: A decision tree is a representation for classifying examples. For this section, assume that all of the input features have finite discrete domains, and there is a single target feature called the
"classification". Each element of the domain of the classification is called a class.
## 25. When determining the optimal feature to split upon, what does the R algorithm calculate?
## Answer Information gain … look at entrophy