Reference no: EM131016595
Objectives of this project
Use Random Forests, Neural Networks and Support Vector Machines to predict loan status (default or not).
Understand the difference between in-sample fitting and out-of-sample predictive performance.
Use two cross-validation methods to assess analytic model performance.
1) Load the Loan.csv data set into R. It lists the outcome of 850 loans. The data variables include loan status, credit grade (from excellent to poor), loan amount, loan age (in months), borrower's interest rate and the debt to income ratio. Code loan status as a binary outcome (0 for current loans, 1 for late or default loans). Display the column names from the loan data set. Fit the loan data set using random forest function. Copy the trained random forest model and the confusion matrix from R and paste it below.
2) Randomly select 750 out of 850 loans as your training sample. Use the remaining 100 loans as your test set. Train the 2nd random forest model using the training set. Apply the 2nd model to the test set to predict loan status. Compare your predictions to the true loan statuses (using table function). Display the confusion matrix below. Based on this confusion matrix, what's the overall misclassification rate? [10 points]
3) Fit the loan data set using an artificial neural network. Use six neurons in the hidden layer of the ANN. Set maxit to 1000. Use table function to compare in-sample predictions to the true loan statuses. Display the confusion matrix below.
4) Use the training sample (750 randomly selected loans) to build the 2nd artificial neural network. Use six neurons in the hidden layer of the ANN. Set maxit to 1000. Use table function to compare out-of-sample predictions to the true loan statuses (use the remaining 100 loans as your test set). Display the confusion matrix below.
5) Use the training sample (750 randomly selected loans) to build a model of support vector machine. Use table function to compare the SVM's out-of-sample predictions to the true loan statuses (use the remaining 100 loans as your test set). Display the confusion matrix below.
6) Randomly shuffle the loan data set. Run 10-fold cross-validation to evaluate the out-of-sample performance of Random Forest, ANN and SVM. Based on your cross-validation results, which model has the best out-of-sample performance? Please briefly explain why.
7) Run leave-one-out cross-validation to evaluate the performance of random forest algorithm in predicting loan status. Why does it take much longer to run leave-one-out cross-validation than to run ten-fold cross-validation? Based on the result of your leave-one-out cross-validation, how many loans are misclassified by the random forest model?
Attachment:- Loan.csv
How might a global capital market function differently
: How might a global capital market function differently from the present-day international market? (hint: some factors to consider are interest rates, currencies, regulations, and financial crisis for some countries)
|
Which of the following is not an example of demonstrative
: Which of the following is not an example of demonstrative evidence
|
Advantage of the discount
: Wild Inc. receives a bill from Easton Inc. for $10,000. Easton has credit terms of 4/10, net 30. If Wild takes advantage of the discount, how much cash do they pay to Easton?
|
Discuss the purpose or intent of the journal article
: Discuss the purpose or intent of the journal article - Identify and briefly describe the research methods used by the authors
|
Display the column names from the loan data set
: Randomly shuffle the loan data set. Run 10-fold cross-validation to evaluate the out-of-sample performance of Random Forest, ANN and SVM. Based on your cross-validation results, which model has the best out-of-sample performance? Please briefly ex..
|
What is the prevalence of colon cancer
: Set up and fill in the two by two table using these data. What is the prevalence of colon cancer in the study population? Compare the cumulative incidence of mortality in the optimistic group to the cumulative incidence of mortality in the pessimist..
|
Calculate the npv and irr of the project
: The opportunity cost of capital for Williams Corp. is 10.2% and their marginal income tax rate is 35%. Calculate the NPV and IRR of the project. Should Williams invest in the new plant?
|
Which items might substitute for another item
: Explain the characteristics for each phase of the product's life cycle. How can each phase of the life cycle impact the product's brand? You must use the text and at least one additional scholarly source.
|
Examine family relationships and communication patterns
: Examine the impact of functional patterns and role structure on the family. Examine family relationships and communication patterns. Identify influences on family health promotion
|