Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Step 2 . Load the R library required to create a neural network model. Step 3 . Use the following two commands to create data
Step Load the R library required to create a neural network model.
Step Use the following two commands to create data frames containing the normalized independent variable values for the training and scoring data sets.
chTrainNorm data.framescalechTrain:
chScoreNorm data.framescalechScore:
Step The independent variable values that were normalized using the scale function in step will be used to train the neural network model. Issue the command:
attachchTrainNorm
Step Set the seed value to
Step You will train a neural network model to predict the CreditRisk dependent variable in the chTrain data frame, using the independent variables in the normalized chTrainNorm data frame. The hidden layers size attribute is set to which uses the generally accepted formula:
independent variables dependent variable levels; which is
Issue the command:
chNNModel nnetasfactorchTrain$CreditRisk ~ CreditScoreLatePaymentsMonthsInJobDebtIncomeRatioLoanAmtLiquidAssetsNumCreditLines, datachTrainNorm, size maxit
Step Use the predict function to apply your neural network model chNNModel to the normalized scoring data frame chScoreNorm to predict CreditRisk classes for each observation. Store these predictions in a data frame with a relevant name.
Step Use the predict function to apply your neural network model chNNModel to the normalized scoring data frame chScoreNorm to predict CreditRisk confidence percentages postprobabilities for each observation. Store these predictions in a data frame with a relevant name.
Step Create a data frame with a relevant name that contains the step class predictions, the step confidence percentages, and the unnormalized scoring data chScore View this data frame in RStudio, then answer the following questions.
Using the neural networks predictions as generated using the steps outlined in this exercise, how many loan applicants will have their loans denied?
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started