Consider the following dataset (outcome variable: Defaulted borrower) Dataset for building a decision tree ID | Home owner | Martial status | Annual income | Defaulted borrower 1 | Yes | Single | 125K | No 2 | No | Married | 100K | No 3 | No | Single | 70K | No 4 | Yes | Married | 120K | No 5 | No | Divorced | 95K | Yes 6 | No | Married | 60K | No 7 | Yes | Divorced | 220K | No 8 | No | Single | 85K | Yes 9 | No | Married | 75K | No 10 | No | Single | 90K | Yes (a). Develop a full decision tree (i.e., a full decision tree means all the leaf nodes contain data instances that come from the same class) using information gain. Please do manual calculation. Make detailed notes of the splitting process and the information gains generated by the splits you have selected to build the tree. (b). What is the testing error given the following testing data? ID | Home owner | Martial status | Annual income | Defaulted borrower 11 | No | Single | 150K | Yes 12 | No | Married | 120K | No 13 | Yes | Divorced | 180K | No 14 | Yes | Married | 90K | Yes
Added by Kevin A.
Close
Step 1
There are 5 "No" and 5 "Yes" instances in the dataset. So, the entropy of the target variable is: Entropy(Defaulted borrower) = - (5/10) * log2(5/10) - (5/10) * log2(5/10) = 1 Show more…
Show all steps
Your feedback will help us improve your experience
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
A new applicant, age 45, is applying for a loan. Using the table below, what is the estimated probability the loan will be approved? k = 4. Record Age Marital Loan Risk Default 1 34 Single $5,000.00 High Yes 2 24 Married $15,000.00 Low No 3 49 Single $7,000.00 Medium Yes 4 32 Other $10,000.00 Medium No 5 44 Married $12,000.00 High Yes 6 53 Single $9,000.00 Low NO Multiple Choice The probable default rate is 75%, the loan will be declined. The probable success rate is 75%, the loan will be approved. The probable success rate is 30%, the loan will be approved. The probable default rate is 25%, the loan will be declined. To examine classification for k-fold cross-validation and naïve Bayes, two packages contain the necessary functions for partitioning the data. These are: Multiple Choice caret & klaR caret & Crisp klarR & SEMMA predictive & caret Decision trees produced by the CART algorithm are binary, meaning that there are two branches for each decision node. True or False Based on the Gini index, 0.10 implies a higher degree of purity because it is closer to 0 than 0.5. True or False Before constructing a decision tree, one of the first steps is identifying possible splits of the predictor variable. True or False
Krishna G.
PART A: Consider the following model of wage determination: wage = β0 + β1educ + β2exper + β3married + ε where: wage = hourly earnings in dollars educ = years of education exper = years of experience married = dummy equal to 1 if married, 0 otherwise Using data from the file ps2.dta, which contains wage data for a number of workers from across the United States, estimate the model shown above by OLS using the regress command in Stata. As always, be sure to include your Stata output (show the regression command used and the complete regression output). Why are we unable to determine which of the included variables is the most important determinant of wages by simply looking at the size (and perhaps significance) of the estimated coefficients (even if we were confident that these estimates reflected unbiased causal impacts)? PART B: Estimate the model again in Stata, but now include the "beta" option and explain how the additional information provided helps to provide insight into this issue discussed in part (c). As part of your answer, provide a clear interpretation of the new Stata output corresponding to the educ variable.
Dominador T.
Recommended Textbooks
Elementary Statistics a Step by Step Approach
The Practice of Statistics for AP
Introductory Statistics
Transcript
Watch the video solution with this free unlock.
EMAIL
PASSWORD