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

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

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