Assignment #7 - Decision Tree [ANSWER SHEET]

docx

School

Temple University *

*We aren’t endorsed by this school

Course

2502

Subject

Computer Science

Date

Dec 6, 2023

Type

docx

Pages

2

Uploaded by EarlAtom10263

Report
Answer Sheet for Assignment: Decision Trees in Python Name Jesse Keaton Fill in the answer sheet below. Question Answer Part 1. Decision Tree in Python (Minimum Split = 55) 1 How often will this tree make a correct prediction (include decimals)? Provide your answer for both the training set and the validation set. Training set: 78.96174863387978 % Validation set: 0.7264957264957265 % 2 How likely is a customer to pay back their loan if they are married, have one child, and make less than $30,000 in income? (NOTE: When asked “how likely…” cite the percentage!) 83% 3 How likely is a customer to pay back their loan if they are not married, have one child, and a mortgage regardless of age? 51.5% 4 How likely is a customer to pay back their loan if they are not married, have 2 children, and make $50,000 in income? 32.5% 5 Describe the profile of the least likely customer to successfully repay their loan. Someone that is married, has no children but has a savings account, and is older than 26.5 6 Describe the profile of the most likely customer to successfully repay their loan. Someone that is not married, has less than 1.5 children, and does not have a mortgage (Minimum Split = 45) 7 How often will this new tree make a correct prediction (include decimals)? Provide your answer for both the training set and the validation set. Training: 81.14754098360656% Validation:73.50427350427351% 8 Is this model better or worse than the According to the validation set values of each Page 1
first model at predicting who will repay their loan? Explain how changing the complexity factor affected the tree using no more than two sentences . tree, we can see that the tree using 45 as its min split is slighty better. It has a chance of being correct of 73.5%, compared to 72.6% 9 How likely is a customer to pay back their loan if they are married, have two children and make $35,000 per year? 64.5% 10 Does having a saving account increase or decrease the likelihood that a customer will pay back their loan? It actually decreases the likelihood. Part 2 Compute and Evaluate Decision Trees (this part is based on a different dataset, see the instructions file) 11 What is the correct classification rate for Tree #1? 77% 12 What is the correct classification rate for Tree #2? 75% 13 Which decision tree (Tree #1 versus Tree #2) has higher classification accuracy? Tree 1 has a higher correct classification rate, therefore it has higher accuracy Page 2
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help