Answered step by step
Verified Expert Solution
Question
1 Approved Answer
The following shows a history of users with attributes CS Major (i.e., majored in computer science), Age, and Income. We also indicate whether they will
The following shows a history of users with attributes CS Major (i.e., majored in computer science), Age, and Income. We also indicate whether they will buy Bitcoin or not in the last column.
No. | CS Major | Age | Income | BuyBitcoin |
1 | yes | old | fair | yes |
2 | yes | middle | fair | yes |
3 | no | young | fair | yes |
4 | no | young | high | yes |
5 | yes | old | low | no |
6 | yes | young | low | no |
7 | no | young | fair | no |
8 | no | middle | low | no |
We want to train a C4.5 decision tree classifier to predict whether a new user will buy Bitcoin or not. We define the value of attribute BuyBitcoin to be the label of a record.
- Please construct a C4.5 decision tree according to the above example. In the decision tree, whenever (1) a node contains at least 80% records with the same label, or (2) a node contains at most 2 records, we stop further processing this node for splitting. Note that you should show the calculation of every attributes impurity gain at each step of the tree construction.
- Consider a new young user studying CS whose income is fair. Please predict whether this new user will buy Bitcoin or not using the decision tree you trained.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started