SlideShare a Scribd company logo
1 of 1
Download to read offline
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. (2
Points)
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. (1 Point)
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. (2 Points)
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? (2 Points)
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) (3 Points)

More Related Content

Similar to Load the dataset into a variable �mydata�. Remove any rows that cont.pdf

Structural sizing and shape optimisation of a load cell
Structural sizing and shape optimisation of a load cellStructural sizing and shape optimisation of a load cell
Structural sizing and shape optimisation of a load celleSAT Journals
 
Classification modelling review
Classification modelling reviewClassification modelling review
Classification modelling reviewJaideep Adusumelli
 
Churn Analysis in Telecom Industry
Churn Analysis in Telecom IndustryChurn Analysis in Telecom Industry
Churn Analysis in Telecom IndustrySatyam Barsaiyan
 
Moderation and Meditation conducting in SPSS
Moderation and Meditation conducting in SPSSModeration and Meditation conducting in SPSS
Moderation and Meditation conducting in SPSSOsama Yousaf
 
Phase 2 of Predicting Payment default on Vehicle Loan EMI
Phase 2 of Predicting Payment default on Vehicle Loan EMIPhase 2 of Predicting Payment default on Vehicle Loan EMI
Phase 2 of Predicting Payment default on Vehicle Loan EMIVikas Virani
 
Customer Satisfaction Data - Multiple Linear Regression Model.pdf
Customer Satisfaction Data -  Multiple Linear Regression Model.pdfCustomer Satisfaction Data -  Multiple Linear Regression Model.pdf
Customer Satisfaction Data - Multiple Linear Regression Model.pdfruwanp2000
 
AIRLINE FARE PRICE PREDICTION
AIRLINE FARE PRICE PREDICTIONAIRLINE FARE PRICE PREDICTION
AIRLINE FARE PRICE PREDICTIONIRJET Journal
 
1 CMIS 102 Hands-On Lab Week 8 Overview Th.docx
1  CMIS 102 Hands-On Lab  Week 8 Overview Th.docx1  CMIS 102 Hands-On Lab  Week 8 Overview Th.docx
1 CMIS 102 Hands-On Lab Week 8 Overview Th.docxhoney725342
 
SupportVectorRegression
SupportVectorRegressionSupportVectorRegression
SupportVectorRegressionDaniel K
 
Exploring Support Vector Regression - Signals and Systems Project
Exploring Support Vector Regression - Signals and Systems ProjectExploring Support Vector Regression - Signals and Systems Project
Exploring Support Vector Regression - Signals and Systems ProjectSurya Chandra
 
Supervised Learning.pdf
Supervised Learning.pdfSupervised Learning.pdf
Supervised Learning.pdfgadissaassefa
 
Guide for building GLMS
Guide for building GLMSGuide for building GLMS
Guide for building GLMSAli T. Lotia
 
What Is Random Forest Classification And How Can It Help Your Business?
What Is Random Forest Classification And How Can It Help Your Business?What Is Random Forest Classification And How Can It Help Your Business?
What Is Random Forest Classification And How Can It Help Your Business?Smarten Augmented Analytics
 
SRGM with Imperfect Debugging by Genetic Algorithms
SRGM with Imperfect Debugging by Genetic AlgorithmsSRGM with Imperfect Debugging by Genetic Algorithms
SRGM with Imperfect Debugging by Genetic Algorithmsijseajournal
 

Similar to Load the dataset into a variable �mydata�. Remove any rows that cont.pdf (20)

Structural sizing and shape optimisation of a load cell
Structural sizing and shape optimisation of a load cellStructural sizing and shape optimisation of a load cell
Structural sizing and shape optimisation of a load cell
 
Classification modelling review
Classification modelling reviewClassification modelling review
Classification modelling review
 
Churn Analysis in Telecom Industry
Churn Analysis in Telecom IndustryChurn Analysis in Telecom Industry
Churn Analysis in Telecom Industry
 
Moderation and Meditation conducting in SPSS
Moderation and Meditation conducting in SPSSModeration and Meditation conducting in SPSS
Moderation and Meditation conducting in SPSS
 
Phase 2 of Predicting Payment default on Vehicle Loan EMI
Phase 2 of Predicting Payment default on Vehicle Loan EMIPhase 2 of Predicting Payment default on Vehicle Loan EMI
Phase 2 of Predicting Payment default on Vehicle Loan EMI
 
Customer Satisfaction Data - Multiple Linear Regression Model.pdf
Customer Satisfaction Data -  Multiple Linear Regression Model.pdfCustomer Satisfaction Data -  Multiple Linear Regression Model.pdf
Customer Satisfaction Data - Multiple Linear Regression Model.pdf
 
AIRLINE FARE PRICE PREDICTION
AIRLINE FARE PRICE PREDICTIONAIRLINE FARE PRICE PREDICTION
AIRLINE FARE PRICE PREDICTION
 
X18145922 statistics ca2 final
X18145922   statistics ca2 finalX18145922   statistics ca2 final
X18145922 statistics ca2 final
 
1 CMIS 102 Hands-On Lab Week 8 Overview Th.docx
1  CMIS 102 Hands-On Lab  Week 8 Overview Th.docx1  CMIS 102 Hands-On Lab  Week 8 Overview Th.docx
1 CMIS 102 Hands-On Lab Week 8 Overview Th.docx
 
Input output
Input outputInput output
Input output
 
Telecom customer churn prediction
Telecom customer churn predictionTelecom customer churn prediction
Telecom customer churn prediction
 
SupportVectorRegression
SupportVectorRegressionSupportVectorRegression
SupportVectorRegression
 
Exploring Support Vector Regression - Signals and Systems Project
Exploring Support Vector Regression - Signals and Systems ProjectExploring Support Vector Regression - Signals and Systems Project
Exploring Support Vector Regression - Signals and Systems Project
 
Supervised Learning.pdf
Supervised Learning.pdfSupervised Learning.pdf
Supervised Learning.pdf
 
Guide for building GLMS
Guide for building GLMSGuide for building GLMS
Guide for building GLMS
 
Control statements in c
Control statements in cControl statements in c
Control statements in c
 
Input output
Input outputInput output
Input output
 
What Is Random Forest Classification And How Can It Help Your Business?
What Is Random Forest Classification And How Can It Help Your Business?What Is Random Forest Classification And How Can It Help Your Business?
What Is Random Forest Classification And How Can It Help Your Business?
 
Credit scoring i financial sector
Credit scoring i financial  sector Credit scoring i financial  sector
Credit scoring i financial sector
 
SRGM with Imperfect Debugging by Genetic Algorithms
SRGM with Imperfect Debugging by Genetic AlgorithmsSRGM with Imperfect Debugging by Genetic Algorithms
SRGM with Imperfect Debugging by Genetic Algorithms
 

More from balrajashok

Los procedimientos anal�ticos son procedimientos sustantivos que pue.pdf
Los procedimientos anal�ticos son procedimientos sustantivos que pue.pdfLos procedimientos anal�ticos son procedimientos sustantivos que pue.pdf
Los procedimientos anal�ticos son procedimientos sustantivos que pue.pdfbalrajashok
 
Los plurales de algunos t�rminos m�dicos pueden ser dif�ciles de con.pdf
Los plurales de algunos t�rminos m�dicos pueden ser dif�ciles de con.pdfLos plurales de algunos t�rminos m�dicos pueden ser dif�ciles de con.pdf
Los plurales de algunos t�rminos m�dicos pueden ser dif�ciles de con.pdfbalrajashok
 
Los miembros deben usar el marco conceptual AICPA para la independen.pdf
Los miembros deben usar el marco conceptual AICPA para la independen.pdfLos miembros deben usar el marco conceptual AICPA para la independen.pdf
Los miembros deben usar el marco conceptual AICPA para la independen.pdfbalrajashok
 
Los patrones caracter�sticos del ciclo econ�mico de valle, expansi�n.pdf
Los patrones caracter�sticos del ciclo econ�mico de valle, expansi�n.pdfLos patrones caracter�sticos del ciclo econ�mico de valle, expansi�n.pdf
Los patrones caracter�sticos del ciclo econ�mico de valle, expansi�n.pdfbalrajashok
 
Los pa�ses de bajos ingresos tienen un INB per c�pita de $1,005 o me.pdf
Los pa�ses de bajos ingresos tienen un INB per c�pita de $1,005 o me.pdfLos pa�ses de bajos ingresos tienen un INB per c�pita de $1,005 o me.pdf
Los pa�ses de bajos ingresos tienen un INB per c�pita de $1,005 o me.pdfbalrajashok
 
Los museos p�blicos a veces piden a los patrocinadores que donen una.pdf
Los museos p�blicos a veces piden a los patrocinadores que donen una.pdfLos museos p�blicos a veces piden a los patrocinadores que donen una.pdf
Los museos p�blicos a veces piden a los patrocinadores que donen una.pdfbalrajashok
 
Los loci A y B tienen una frecuencia de recombinaci�n del 5 por cien.pdf
Los loci A y B tienen una frecuencia de recombinaci�n del 5 por cien.pdfLos loci A y B tienen una frecuencia de recombinaci�n del 5 por cien.pdf
Los loci A y B tienen una frecuencia de recombinaci�n del 5 por cien.pdfbalrajashok
 
Los mercados sociales act�an como ______________ en l�nea aprovechan.pdf
Los mercados sociales act�an como ______________ en l�nea aprovechan.pdfLos mercados sociales act�an como ______________ en l�nea aprovechan.pdf
Los mercados sociales act�an como ______________ en l�nea aprovechan.pdfbalrajashok
 
Los ingresos de una entidad normalmente se miden por los valores de .pdf
Los ingresos de una entidad normalmente se miden por los valores de .pdfLos ingresos de una entidad normalmente se miden por los valores de .pdf
Los ingresos de una entidad normalmente se miden por los valores de .pdfbalrajashok
 
Los impuestos a la propiedad sobre las instalaciones de fabricaci�n .pdf
Los impuestos a la propiedad sobre las instalaciones de fabricaci�n .pdfLos impuestos a la propiedad sobre las instalaciones de fabricaci�n .pdf
Los impuestos a la propiedad sobre las instalaciones de fabricaci�n .pdfbalrajashok
 
Los hombres tienen m�s probabilidades de sufrir una enfermedad o tra.pdf
Los hombres tienen m�s probabilidades de sufrir una enfermedad o tra.pdfLos hombres tienen m�s probabilidades de sufrir una enfermedad o tra.pdf
Los hombres tienen m�s probabilidades de sufrir una enfermedad o tra.pdfbalrajashok
 
Los helechos, un tipo de planta, pasan por una alternancia de genera.pdf
Los helechos, un tipo de planta, pasan por una alternancia de genera.pdfLos helechos, un tipo de planta, pasan por una alternancia de genera.pdf
Los helechos, un tipo de planta, pasan por una alternancia de genera.pdfbalrajashok
 
Los ganglios linf�ticos funcionan como puntos de encuentro entre las.pdf
Los ganglios linf�ticos funcionan como puntos de encuentro entre las.pdfLos ganglios linf�ticos funcionan como puntos de encuentro entre las.pdf
Los ganglios linf�ticos funcionan como puntos de encuentro entre las.pdfbalrajashok
 
Los estudios de casos de gesti�n de proyectos se basan en el PMI 201.pdf
Los estudios de casos de gesti�n de proyectos se basan en el PMI 201.pdfLos estudios de casos de gesti�n de proyectos se basan en el PMI 201.pdf
Los estudios de casos de gesti�n de proyectos se basan en el PMI 201.pdfbalrajashok
 
Los estados financieros de todo el gobierno benefician a los usuar.pdf
Los estados financieros de todo el gobierno benefician a los usuar.pdfLos estados financieros de todo el gobierno benefician a los usuar.pdf
Los estados financieros de todo el gobierno benefician a los usuar.pdfbalrajashok
 
Los especialistas en marketing incorporan mensajes encubiertos en an.pdf
Los especialistas en marketing incorporan mensajes encubiertos en an.pdfLos especialistas en marketing incorporan mensajes encubiertos en an.pdf
Los especialistas en marketing incorporan mensajes encubiertos en an.pdfbalrajashok
 
Los estados financieros de Rukavina Corporation son los siguientes .pdf
Los estados financieros de Rukavina Corporation son los siguientes .pdfLos estados financieros de Rukavina Corporation son los siguientes .pdf
Los estados financieros de Rukavina Corporation son los siguientes .pdfbalrajashok
 
Los elementos de la agencia aparente son A confianza en la repre.pdf
Los elementos de la agencia aparente son A confianza en la repre.pdfLos elementos de la agencia aparente son A confianza en la repre.pdf
Los elementos de la agencia aparente son A confianza en la repre.pdfbalrajashok
 
Los empleados primero�. Ese es el valor cultural m�s importante y cr.pdf
Los empleados primero�. Ese es el valor cultural m�s importante y cr.pdfLos empleados primero�. Ese es el valor cultural m�s importante y cr.pdf
Los empleados primero�. Ese es el valor cultural m�s importante y cr.pdfbalrajashok
 
Los enfoques de Teaming que se usan en los grupos de LinkedIn normal.pdf
Los enfoques de Teaming que se usan en los grupos de LinkedIn normal.pdfLos enfoques de Teaming que se usan en los grupos de LinkedIn normal.pdf
Los enfoques de Teaming que se usan en los grupos de LinkedIn normal.pdfbalrajashok
 

More from balrajashok (20)

Los procedimientos anal�ticos son procedimientos sustantivos que pue.pdf
Los procedimientos anal�ticos son procedimientos sustantivos que pue.pdfLos procedimientos anal�ticos son procedimientos sustantivos que pue.pdf
Los procedimientos anal�ticos son procedimientos sustantivos que pue.pdf
 
Los plurales de algunos t�rminos m�dicos pueden ser dif�ciles de con.pdf
Los plurales de algunos t�rminos m�dicos pueden ser dif�ciles de con.pdfLos plurales de algunos t�rminos m�dicos pueden ser dif�ciles de con.pdf
Los plurales de algunos t�rminos m�dicos pueden ser dif�ciles de con.pdf
 
Los miembros deben usar el marco conceptual AICPA para la independen.pdf
Los miembros deben usar el marco conceptual AICPA para la independen.pdfLos miembros deben usar el marco conceptual AICPA para la independen.pdf
Los miembros deben usar el marco conceptual AICPA para la independen.pdf
 
Los patrones caracter�sticos del ciclo econ�mico de valle, expansi�n.pdf
Los patrones caracter�sticos del ciclo econ�mico de valle, expansi�n.pdfLos patrones caracter�sticos del ciclo econ�mico de valle, expansi�n.pdf
Los patrones caracter�sticos del ciclo econ�mico de valle, expansi�n.pdf
 
Los pa�ses de bajos ingresos tienen un INB per c�pita de $1,005 o me.pdf
Los pa�ses de bajos ingresos tienen un INB per c�pita de $1,005 o me.pdfLos pa�ses de bajos ingresos tienen un INB per c�pita de $1,005 o me.pdf
Los pa�ses de bajos ingresos tienen un INB per c�pita de $1,005 o me.pdf
 
Los museos p�blicos a veces piden a los patrocinadores que donen una.pdf
Los museos p�blicos a veces piden a los patrocinadores que donen una.pdfLos museos p�blicos a veces piden a los patrocinadores que donen una.pdf
Los museos p�blicos a veces piden a los patrocinadores que donen una.pdf
 
Los loci A y B tienen una frecuencia de recombinaci�n del 5 por cien.pdf
Los loci A y B tienen una frecuencia de recombinaci�n del 5 por cien.pdfLos loci A y B tienen una frecuencia de recombinaci�n del 5 por cien.pdf
Los loci A y B tienen una frecuencia de recombinaci�n del 5 por cien.pdf
 
Los mercados sociales act�an como ______________ en l�nea aprovechan.pdf
Los mercados sociales act�an como ______________ en l�nea aprovechan.pdfLos mercados sociales act�an como ______________ en l�nea aprovechan.pdf
Los mercados sociales act�an como ______________ en l�nea aprovechan.pdf
 
Los ingresos de una entidad normalmente se miden por los valores de .pdf
Los ingresos de una entidad normalmente se miden por los valores de .pdfLos ingresos de una entidad normalmente se miden por los valores de .pdf
Los ingresos de una entidad normalmente se miden por los valores de .pdf
 
Los impuestos a la propiedad sobre las instalaciones de fabricaci�n .pdf
Los impuestos a la propiedad sobre las instalaciones de fabricaci�n .pdfLos impuestos a la propiedad sobre las instalaciones de fabricaci�n .pdf
Los impuestos a la propiedad sobre las instalaciones de fabricaci�n .pdf
 
Los hombres tienen m�s probabilidades de sufrir una enfermedad o tra.pdf
Los hombres tienen m�s probabilidades de sufrir una enfermedad o tra.pdfLos hombres tienen m�s probabilidades de sufrir una enfermedad o tra.pdf
Los hombres tienen m�s probabilidades de sufrir una enfermedad o tra.pdf
 
Los helechos, un tipo de planta, pasan por una alternancia de genera.pdf
Los helechos, un tipo de planta, pasan por una alternancia de genera.pdfLos helechos, un tipo de planta, pasan por una alternancia de genera.pdf
Los helechos, un tipo de planta, pasan por una alternancia de genera.pdf
 
Los ganglios linf�ticos funcionan como puntos de encuentro entre las.pdf
Los ganglios linf�ticos funcionan como puntos de encuentro entre las.pdfLos ganglios linf�ticos funcionan como puntos de encuentro entre las.pdf
Los ganglios linf�ticos funcionan como puntos de encuentro entre las.pdf
 
Los estudios de casos de gesti�n de proyectos se basan en el PMI 201.pdf
Los estudios de casos de gesti�n de proyectos se basan en el PMI 201.pdfLos estudios de casos de gesti�n de proyectos se basan en el PMI 201.pdf
Los estudios de casos de gesti�n de proyectos se basan en el PMI 201.pdf
 
Los estados financieros de todo el gobierno benefician a los usuar.pdf
Los estados financieros de todo el gobierno benefician a los usuar.pdfLos estados financieros de todo el gobierno benefician a los usuar.pdf
Los estados financieros de todo el gobierno benefician a los usuar.pdf
 
Los especialistas en marketing incorporan mensajes encubiertos en an.pdf
Los especialistas en marketing incorporan mensajes encubiertos en an.pdfLos especialistas en marketing incorporan mensajes encubiertos en an.pdf
Los especialistas en marketing incorporan mensajes encubiertos en an.pdf
 
Los estados financieros de Rukavina Corporation son los siguientes .pdf
Los estados financieros de Rukavina Corporation son los siguientes .pdfLos estados financieros de Rukavina Corporation son los siguientes .pdf
Los estados financieros de Rukavina Corporation son los siguientes .pdf
 
Los elementos de la agencia aparente son A confianza en la repre.pdf
Los elementos de la agencia aparente son A confianza en la repre.pdfLos elementos de la agencia aparente son A confianza en la repre.pdf
Los elementos de la agencia aparente son A confianza en la repre.pdf
 
Los empleados primero�. Ese es el valor cultural m�s importante y cr.pdf
Los empleados primero�. Ese es el valor cultural m�s importante y cr.pdfLos empleados primero�. Ese es el valor cultural m�s importante y cr.pdf
Los empleados primero�. Ese es el valor cultural m�s importante y cr.pdf
 
Los enfoques de Teaming que se usan en los grupos de LinkedIn normal.pdf
Los enfoques de Teaming que se usan en los grupos de LinkedIn normal.pdfLos enfoques de Teaming que se usan en los grupos de LinkedIn normal.pdf
Los enfoques de Teaming que se usan en los grupos de LinkedIn normal.pdf
 

Recently uploaded

Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseAnaAcapella
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxRamakrishna Reddy Bijjam
 
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdfVishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdfssuserdda66b
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSCeline George
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfPoh-Sun Goh
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxAreebaZafar22
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Association for Project Management
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and ModificationsMJDuyan
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.pptRamjanShidvankar
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxDr. Sarita Anand
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxVishalSingh1417
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - Englishneillewis46
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptxMaritesTamaniVerdade
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...ZurliaSoop
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxAmanpreet Kaur
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17Celine George
 

Recently uploaded (20)

Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdfVishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 

Load the dataset into a variable �mydata�. Remove any rows that cont.pdf

  • 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. (2 Points) 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. (1 Point) 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. (2 Points) 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? (2 Points) 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) (3 Points)