Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

You are given Risk.txt data. Please complete the following problems using this data Please read Risk.txt data. Please check the structure of the data and

You are given Risk.txt data. Please complete the following problems using this data

  1. Please read Risk.txt data.
  2. Please check the structure of the data and type of each column
  3. Please show histogram of INCOME
  4. Please show bar chart for GENDER and MARITAL
  5. Please show normalized overlay chart for GENDER and MARITAL using the target variable RISK (see ggplot2 examples).
  6. Please examine the above normalized overlay charts and comment on the relationship between GENDER and RISK and between MARITAL and RISK in a word document.
  7. Please create training and test data.
  8. Please build a decision tree model using the training data (hint: do not use ID field as an input)
  9. Please plot the decision tree model
  10. Please convert the decision tree model to rule set (IF THEN). Please write the rule set in the word document
  11. Please use the decision tree model to make prediction on the test data.
  12. Please compare the error rates on the training data and test data. Do you see an overfitting problem? Why? Please write your comparison and conclusion in the word document.
  13. the risk.txt file is as below:
    ID AGE INCOME GENDER MARITAL NUMKIDS NUMCARDS HOWPAID MORTGAGE STORECAR LOANS RISK 100756 44 59944 m married 1 2 monthly y 2 0 good risk 100668 35 59692 m married 1 1 monthly y 1 0 bad loss 100418 34 59508 m married 1 1 monthly y 2 1 good risk 100416 34 59463 m married 0 2 monthly y 1 1 bad loss 100590 39 59393 f married 0 2 monthly y 1 0 good risk 100657 41 59276 m married 1 2 monthly y 1 1 good risk 100702 42 59201 m married 0 1 monthly y 2 0 good risk 100319 31 59193 f married 1 2 monthly y 1 1 good risk 100666 28 59179 m married 1 1 monthly y 2 1 bad loss 100389 30 59036 m married 1 1 monthly y 2 1 good risk 100758 38 58914 m married 0 1 monthly y 1 1 bad profit 100695 36 58878 f married 1 1 monthly y 1 0 bad profit 100698 42 58785 f married 0 2 monthly y 1 0 good risk 100769 44 58529 m married 0 1 monthly y 1 0 bad loss 100376 33 58505 f married 0 2 monthly y 1 0 good risk 100796 45 58381 m married 1 1 monthly y 1 0 good risk 100414 34 58026 m married 0 1 monthly y 2 0 good risk 100354 32 57718 m married 1 2 monthly y 1 1 bad profit 100452 35 57689 m married 1 1 monthly y 2 1 good risk 100567 38 57683 f married 1 1 monthly y 2 1 bad loss 100728 28 57623 m married 1 1 monthly y 1 1 bad loss 100725 43 57598 f married 1 1 monthly y 1 1 good risk 100665 41 57520 f married 1 1 monthly y 1 0 bad loss 100730 43 57388 f married 0 1 monthly y 1 0 bad loss 100766 44 57376 m married 0 2 monthly y 2 1 good risk 100524 37 57004 f married 1 1 monthly y 2 0 good risk 100412 34 56891 m married 1 1 monthly y 2 1 bad profit 100374 33 56849 m married 1 1 monthly y 1 1 good risk 100566 38 56590 m married 0 2 monthly y 1 0 bad loss 100591 39 56523 m married 1 1 monthly y 2 0 good risk 100421 34 56486 m married 0 1 monthly y 1 1 bad profit 100670 41 56470 m married 0 2 monthly y 1 0 bad loss 100379 33 56087 m married 1 2 monthly y 1 1 bad profit 100292 30 56087 f married 0 1 monthly y 1 1 bad profit 100326 31 55897 m married 1 2 monthly y 2 0 good risk 100497 36 55777 f married 1 2 monthly y 2 0 bad loss 100568 38 55752 m married 0 2 monthly y 2 1 good risk 100294 30 55642 f married 1 2 monthly y 1 0 good risk 100570 38 55565 m married 1 2 monthly y 1 0 good risk 

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Systems On GPUs In Databases

Authors: Johns Paul ,Shengliang Lu ,Bingsheng He

1st Edition

ISBN: 1680838482, 978-1680838480

More Books

Students also viewed these Databases questions