Question: ( * COMPLETE ALL PARTS IN PYTHON CODE * ) Dream Housing Finance company deals in all home loans. They have a presence across all
COMPLETE ALL PARTS IN PYTHON CODE Dream Housing Finance company deals in all home loans. They have a presence across all urban, semiurban, and rural areas.
The company wants to automate the loan eligibility process realtime based on customer details provided while filling the online application form. These details are Gender, Marital Status, Education, Number of Dependents, Income, Loan Amount, Credit History, and others. A description of the variables in the data set is as follows:
tableVariable Name,DescriptionGenderMale FemaleMarriedApplicant married YNDependentsNumber of dependentsEducationApplicant Education Graduate Under GraduateSelfEmployed,Selfemployed YNApplicantIncomeApplicant income in $ thousandsLoanAmountLoan amount in $ thousandsLoanAmountTerm,Term of the loan in monthsCreditHistory,credit history meets guidelines YesPropertyArea,UrbanSemiUrban RuralLoanStatus,Loan approved YN
a Create a classification tree for predicting LoanStatus. Use costcomplexity pruning to determine the optimal tree. Include all steps including any useful plots in the decision process and be sure to display your final tree.
b What is the test error associated with your final tree?
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
