Question: Write in C program Instructions Credit card approval using decision tree classifier Background A credit card company receives thousands of applications for new cards. Each
Write in C program


Instructions Credit card approval using decision tree classifier Background A credit card company receives thousands of applications for new cards. Each application contains information about an applicant, age O Marital status annual salary outstanding debts credit rating etc. Problem: To evaluate a credit card application into two categories, approved and not approved. Focus: implement a function to evaluate the approval (or not) of a credit card application Instructions 1. Input data: The user will enter the applicant's age, has job, own_house and credit_rating. See sample data below. 2. Based on the user input, implement the decision tree shown below to decide whether to approve the credit card application or not. The program should display yes or no. Use a switch construct where most appropriate. Consider to create a mapping for categorization when using a switch construct. For instance, For Age: 0=young (ages 18-35 years), 1=mid-aged (ages 36-55), 2-old (aged older than 55 years). For Credit Rating: 0=fair, 1=good, 2=excellent Age? Young middle old Has job? Own house? Credit rating? true false No Yes (2/2) true false fair good excellent 1 Yes No No Yes Yes (3/3) (2/2) (1/1) (2/2) (2/2) (3/3) OUTPUT EXAMPLE Test with data from lines 4, 5, 6, 8, 11, 12, and 15 in order to test the output of every single branch of the decision tree. Below is an output example for only lines 4 and 5. ID 1 2 3 4 $ 5 6 7 8 9 10 11 12 13 14 15 Age young young young young young middle middle middlc middle middle old old old old old Has Job Own House Credit Rating approved false false No false false good No true false good true true fair Yes false false No false false fair NO false false good No true true good false true excellent Yes false true excellent Yes false true excellent Yes false true good Yes true false good Yes true false excellent false false fair No ---=== Credit Card Application ===--- Enter your age: 30 Do you have a job? y Do you do you own a house? y Enter the credit rating: Fair approved ------ Credit Card Application -- Enter your age: 30 Do you have a job? n Do you do you own a house? n Enter the credit rating: Fair not approved
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
