Question: use R Studio a. Make sure you install and lihrary below five packages: - AppliedPredictiveModeling - caret - proC - klaR - Hmisc Homework 3

use R Studio
use R Studio a. Make sure you install and lihrary below five
packages: - AppliedPredictiveModeling - caret - proC - klaR - Hmisc Homework

a. Make sure you install and lihrary below five packages: - AppliedPredictiveModeling - caret - proC - klaR - Hmisc Homework 3 b. Import ClientCredit_M.rlst to RStudio c. Convert the imported dataset to data frame d. Convert categorical variables (gender, education, marriage, status_l. status_2, stanus_3, status_4, stanes_5, status_6, default) to factor. Then, please proceed to explore answers for below questions. (1) Check if there are any missing values in the dataset, and return those client records that contain missing data. ( 1 point) (2) Create the predictors and outcome subset, respectively. Also, perform data splitting- training (80%) and test set (20%). (2 points) (3) Locate the missing values in the train and test set respectively, then impute missing data with the median value of the feature column. ( 2 points) Note: ofter imputing missing data, you can ase colSams0 to recheck and confirm no more missing valuex. (4) Check if there are any near-zero variance predictors in the training data. If any are found, remove them; otherwise, no need to remove anything. (1 point) (5) Build and compare three (linear \& nonlinear) classification models- Logistic Regression, Naive Bayes (NB), and KNN model respectively. (2 points) Note: your can use "k-1:35" when timing the KNN model. lgnore warnings with the NB model. Given the large dalaset, it may take a while to rum the models, especially with the KNN model. (6) Which model would you choose? Use your chosen model to predict the default likelihood of a new client with characteristics summarized below. (2 points) gender: Sfole chlueation: Hax Bacholor degree marriage:: marricd Age: 40 credir_line: 5000 repayment status in the laxt mondh (statur_l): on time repayment status two months ago (status_2): on time repayment status three months ago (status_3): delayed repayment status four months ago (status_4): delayed repayment status five months ago (status_5): on time repayment status six months ago (status_6): delayed bill statement amount in the last month (bill_1): 2400 bill statement amount two months ago (bill_2): 3260 bill statement amount three months ago (bill_3): 2880 bill statement amount four months ago (bill_4): 4500 bill statement amount five months ago (bill_5): 3600 bill statement amount six months ago (bill_6): 2350 amount of payment made by client in the last month (payment_1): 800 amount of payment made by client two months ago (payment_2): 1000 amount of payment made by client three months ago (payment_3): 600 amount of payment made by client four months ago (payment_4): 1200 amount of payment made by client five months ago (payment_5): 1000 amount of payment made by client six months ago (payment_6): 500

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 Databases Questions!