Answered step by step
Verified Expert Solution
Question
1 Approved Answer
2. In this exercise we consider a problem we have all faced - getting to a restaurant and they tell you the wait time is..
2. In this exercise we consider a problem we have all faced - getting to a restaurant and they tell you the "wait time is.". We want to make a Decision Tree to help decide whether we should wait or not. There are two possible outcomes: wait or leave. We consider 4 attributes to help us make the decision. The attributes are: (i) Wait time, (ii) Is there a bar available to wait at?, (iii) Is there a good alternative available? and (iv) Are you really hungry? Three of these attributes are just "yes" or "no" but the wait time is either 0-10 10-20, 20-30, 30-60 minutes or more than an hour. Our training set is given in the table below # | Wait Time | Bar Available to wait? | Alternative Available? | Hungry? | Outcome WAIT LEAVE WAIT LEAVE AVE WAIT WAIT 10-30 10-30 10-30 >60 0-10 10-30 10-30 10-30 10 30-60 11 30-60 1230-60 LEAVE AVE LEAVE (a) Use the attribute "Wait time" as the root which has 4 possibilities. Because the data set is so small for 2 of these 4 possibilities the outcome is immediately determined. Draw the Decision Tree with this root question and its 4 possibilities; indicate the outcome for the two which are now determined by adding a leaf. (b) From (a) there are only two possibilities where we need to determine the next branch, i.e., which attribute from the remaining 3 attributes (bar available, alternative, hungry) that we need to check. Remember that it may be advantageous to check one attribute for one wait time and another attribute for a different wait time. Summarize your data in the table below for each of the two remaining choices of wait time where you couldn't immediately add a leaf. When you tabulate the results, use a "W for WAIT and a "L" for LEAVE and add the number of results in the training set; for example W-2, L-1 As an example of what I want you to do I will complete one entry in the table. Look at the 10-30 minute wait time for which there are 6 entries. You will only use these 6 entries to summarize the results; I list them below for clarity. # | Wait Time | Bar Available to wait? | Alternative Available? | Hungry? Outcome WAIT 10-30 10-30 10-30 10-30 10-30 10-30 LEAVE WAIT AVE Now from these 6 pieces of data, consider the attribute "Hungry?" where there are two possibilities, "yes" or "no". Of the 6 entries in the training set for the 10-30 wait time, 2 respond "yes"; one of these has the outcome "wait" & one "leave" so we summarize it as W-1,L-1 in the table. ait Time ar Available to wait? Iternative Availab ungry es 0 Yes No 10-30 W-1,L-1 (c) Use your results in (b) to add the next level of leaves to your Decision Tree. Justify your answer using the values in (b). If the outcome is determined without checking any additional attributes, indicate this by adding a leaf 2. In this exercise we consider a problem we have all faced - getting to a restaurant and they tell you the "wait time is.". We want to make a Decision Tree to help decide whether we should wait or not. There are two possible outcomes: wait or leave. We consider 4 attributes to help us make the decision. The attributes are: (i) Wait time, (ii) Is there a bar available to wait at?, (iii) Is there a good alternative available? and (iv) Are you really hungry? Three of these attributes are just "yes" or "no" but the wait time is either 0-10 10-20, 20-30, 30-60 minutes or more than an hour. Our training set is given in the table below # | Wait Time | Bar Available to wait? | Alternative Available? | Hungry? | Outcome WAIT LEAVE WAIT LEAVE AVE WAIT WAIT 10-30 10-30 10-30 >60 0-10 10-30 10-30 10-30 10 30-60 11 30-60 1230-60 LEAVE AVE LEAVE (a) Use the attribute "Wait time" as the root which has 4 possibilities. Because the data set is so small for 2 of these 4 possibilities the outcome is immediately determined. Draw the Decision Tree with this root question and its 4 possibilities; indicate the outcome for the two which are now determined by adding a leaf. (b) From (a) there are only two possibilities where we need to determine the next branch, i.e., which attribute from the remaining 3 attributes (bar available, alternative, hungry) that we need to check. Remember that it may be advantageous to check one attribute for one wait time and another attribute for a different wait time. Summarize your data in the table below for each of the two remaining choices of wait time where you couldn't immediately add a leaf. When you tabulate the results, use a "W for WAIT and a "L" for LEAVE and add the number of results in the training set; for example W-2, L-1 As an example of what I want you to do I will complete one entry in the table. Look at the 10-30 minute wait time for which there are 6 entries. You will only use these 6 entries to summarize the results; I list them below for clarity. # | Wait Time | Bar Available to wait? | Alternative Available? | Hungry? Outcome WAIT 10-30 10-30 10-30 10-30 10-30 10-30 LEAVE WAIT AVE Now from these 6 pieces of data, consider the attribute "Hungry?" where there are two possibilities, "yes" or "no". Of the 6 entries in the training set for the 10-30 wait time, 2 respond "yes"; one of these has the outcome "wait" & one "leave" so we summarize it as W-1,L-1 in the table. ait Time ar Available to wait? Iternative Availab ungry es 0 Yes No 10-30 W-1,L-1 (c) Use your results in (b) to add the next level of leaves to your Decision Tree. Justify your answer using the values in (b). If the outcome is determined without checking any additional attributes, indicate this by adding a leaf
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