Problem 3: In the following figure, 2-class (circle or triangle) classification is being considered based on two input features \( f_{1} \) and \( f_{2} \). Our goal is to construct a decision tree using the algorithm described in the class/notes for the data above. For that purpose, pick the decision boundary which falls halfway between each pair of adjacent points in each dimension, and which produces the minimum average entropy of each split. a. How many total splits - horizontal as well as vertical - are there if we pick the decision boundaries which fall halfway between each pair of adjacent points in each dimension? b. Compute the average entropy of each split. c. Construct the resultant tree that you obtain. d. Mark the regions in the final diagram by labeling them correctly at the end of leaf nodes as well. e. Write down the label (circle or triangle) in front of the following \( \mathrm{x}_{\text {new }} \) if wee apply your constructed decision tree classification algorithm (a) \( \mathbf{x}_{\text {new }}=\left[\begin{array}{ll}0 & 0\end{array}\right]^{T} \) (b) \( \mathbf{x}_{\text {new }}=\left[\begin{array}{ll}-1 & 2\end{array}\right]^{T} \) (c) \( \mathrm{x}_{\text {new }}=[-1.5-1.5]^{T} \)
Added by Darnell C.
Close
Step 1
For \( f_1 \): -2, -1, 0, 1, 2, 3 For \( f_2 \): -3, -2, -1, 0, 1, 2, 3 Show more…
Show all steps
Your feedback will help us improve your experience
Danielle Ashley and 91 other AP CS educators are ready to help you.
Ask a new question
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Key Concepts
Recommended Videos
3. (25 points) Decision Tree Table 1 below contains a small training set. Each line includes an individual's education, occupation choice, years of experience, and an indication of salary. Your task is to create a complete decision tree including the number of low's & high's , entropy at each step and the information gain for each feature examined at each node in the tree. Instance Education Level Career Years of Experience Salary 1 High School Management Less than 3 Low 2 High School Management 3 to 10 Low 3 College Management Less than 3 High 4 College Service More than 10 Low 5 High School Service 3 to 10 Low 6 College Service 3 to 10 High 7 College Management More than 10 High 8 College Service Less than 3 Low 9 High School Management More than 10 High 10 High School Service More than 10 Low Table 1: Decision Tree Training Data Please turn in a diagram similar to: Top 6,4, .97 Education gain = <to be calculated> 1. High School 4,1, <to be calculated> Experience gain = <to be calculated> etc. etc. Prune the tree you obtained using the validation data given in Table 2. Show your work. Instance Education Level Career Years of Experience Salary 1 High School Management More than 10 High 2 College Management Less than 3 Low 3 College Service 3 to 10 Low Table 2: Validation Data
Karan D.
Consider the training data shown in the following for a binary classification problem. Type of Iris is the response variable, Sepal Length is the splitting variable. Instance Type of Iris Sepal Length (in cm) 1 Setosa 4.5 2 Setosa 4.7 3 Setosa 4.8 4 Setosa 5.3 5 Setosa 5.5 6 Virginica 5.1 7 Virginica 5.7 8 Virginica 6.9 9 Virginica 7.6 10 Virginica 7.7 Given the following two possible splits, Split one: Child node 1: Sepal Length ≤ 4.8 Child node 2: Sepal Length > 4.8 Split Two: Child node 1: Sepal Length ≤ 5.5 Child node 2: Sepal Length > 5.5 Please do the following: (a) (10 points) Calculate the entropy of the two splits. Which split is better according to entropy? (b) (10 points) Calculate the Gini index of the two splits. Which split is better according to Gini?
Madhur L.
The following table summarizes a data set with three attributes A, B, C and two class labels +, -. Build a two-level decision tree i.e. splitting conditions at level 0 (root node) and level 1 (if required) using Gini index as the measure of impurity.
Banhishikha S.
Recommended Textbooks
Computer Science and Information Technology
Introduction to Programming Using Python
Computer Science - An Overview
18,000,000+
Students on Numerade
Trusted by students at 8,000+ universities
Watch the video solution with this free unlock.
EMAIL
PASSWORD