Perform 10-fold cross validation and use logistic regression

Assignment Help Computer Engineering
Reference no: EM133424172

Question 1: Load the dataset into a variable "mydata". Remove any rows that contain missing values on any of the variables.
Change the variable "loan_status" to binary (1 for Fully Paid and 0 for charged off). Change the variable "home_ownership" to a categorical variable (0 for RENT, 1 for MORTGAGE and 2 for OWN). Remove the word "months" in variable "term" and the symbol "%" in the variable "int_rate".

Question 2: Split the dataset into 70% training and 30% testing using the sample() function. We are tying to predict "loan_status" so store the variable value in "response.test" and set the value to null on the test dataset.

Question 3: Run the logistic regression on "trainData" using glm() command with "loan_amnt", "funded_amnt", "int_rate", "term", "annual_inc","dti" and "delinq_2yrs" as input variables. Explain what the coefficient values for the variables "int_rate" and "delinq_2yrs" mean in plain English.

Question 4: Now use the predict() function on the test dataset to predict the probability of outcome. Set the predicted outcome to be 1 if probability is greater than 0.5 or else 0. Use the table() command to compare the predicted outcome and the actual. What are the values of precision, recall and overall accuracy?

Question 5: Now use the trainControl() and train() methods on "mydata" to perform 10-fold cross validation and use logistic regression. What are the values of precision, recall, overall accuracy and AUC? (Hint : You need to install the libraries "caret" and "pROC" before you run the models)

Reference no: EM133424172

Questions Cloud

How can you test connectivity to an smtp server : having trouble connecting to google to perform searches. You will need to test the different layers of connectivity
Explain the mandatory reporting requirements associated : List and explain the Mandatory Reporting Requirements associated with Child Abuse and Neglect Abuse, Neglect, and Exploitation of the Frail Elderly.
What ?nancial debt is : Read the chapter carefully and then think of an example from your everyday life, for example, from your job or school work
Discuss the aca intersate counseling compact : What is transpiring in our professional world. Please provide a brief discussion on the ACA Intersate Counseling Compact.
Perform 10-fold cross validation and use logistic regression : Perform 10-fold cross validation and use logistic regression. What are the values of precision, recall, overall accuracy and AUC
Give an example of a situation in sports where this could be : discrimination against individuals with a disability. Give an example of a situation in sports where this could become an issue or cause a school or team
What are aspects of working with clients of the same race : In marriage and family therapy, what are the positive and negative aspects of working with clients of the same race, religious beliefs, SES, etc.
What potential harm does media have regard to body image : What potential harm does media have with regard to body image and eating disorders for both males and females in society today?
What is the best method for employers and employees : Why they are essential for employee motivation, retention, and company sustainability. What is the best method for employers and employees to achieve a balance

Reviews

Write a Review

Computer Engineering Questions & Answers

  Provide a brief summary of the benefits that organizations

Review the following research paper titled Organisational Information Security Strategy: Review, Discussion and Future ResearchLinks to an external site.

  A short statement that reflects your teams philosophy

A short statement that reflects your team's philosophy or objective for ensuring that you deliver a quality system to your client.

  Describe at least one flaw in the design of wep making

CSE 7349 Southern Methodist University Describe at least one flaw in the design of WEP making it so that WEP should never be used as a means to secure Wireless

  Implementing a language transformer

Implementing a language transformer. All other units have passed the test except for the simplest linear layer. What could be wrong

  Discuss the advantages and disadvantages of firewalls

Discuss the advantages and disadvantages of firewalls with iptables and make suggestions to overcome the disadvantages in your report.

  Calculate the average of the first ten terms sequence

Write a piece of code that calculates the average of the first 10 terms sequence using a for loop, and then prints the resulting average.

  Design and develop a program that creates a complete set

Design and develop a program that creates complete set of multiplication tables where both the multiplicand and the multiplier vary from 1 through 12. The table should display as 144 rows in the list view control.

  Implement the new solution into the legacy environment

CS 102 University College of Northern Denmark, Describe the method you would use to evaluate an existing bare metal environment and Design a new vSphere

  Explain the key difference between viruses and malicious cod

explain the key differences between viruses and other malicious codes and Identify at least three (3) different types of viruses, and describe the main differences between each one.

  Describe on a high level as to how this happens

Let S be the set of positive integers that can be written as a sum of one or more 4's and/or 7's. For example, 7 ? S and 18 ? S (because 18 = 4 + 7 + 7)

  What are a sample of negative effects

Many problems ask for a sparsified version of the object. This has many benefits as noted in the text. The text, however, does not address any negative aspects.

  What conclusion can you make from the given information

You work at a help desk and have just received a call from an employee who says she can't access network. What conclusion can you make from this information?

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd