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, semi-urban, and rural areas.
The company wants to automate the loan eligibility process (real-time) 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:
\table[[Variable Name,Description],[Gender,Male/ Female],[Married,Applicant married (Y/N)],[Dependents,Number of dependents],[Education,Applicant Education (Graduate/ Under Graduate)],[Self_Employed,Self-employed (Y/N)],[ApplicantIncome,Applicant income (in $ thousands)],[LoanAmount,Loan amount (in $ thousands)],[Loan_Amount_Term,Term of the loan (in months)],[Credit_History,credit history meets guidelines Yes)],[Property_Area,Urban/Semi-Urban/ Rural],[Loan_Status,Loan approved (Y/N)]]
a. Create a classification tree for predicting Loan_Status. Use cost-complexity 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?
( * COMPLETE ALL PARTS IN PYTHON CODE * ) Dream

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!