Accuracy – answer TP+TN/TP+FN+FP+TN
Calculating the percentage of correct predictions
Precision – answer TP/TP+FP
Measures the exactness of the model
Recall – answer TP/TP+FN
Measures the completeness of the model
Confusion Matrix-Definition – answer performance measurement for machine learning
classification problems where output can be two or more classes
*two by two table that contained FOUR outcomes
Logistic Regression - answer Statistical analysis method to predict a binary outcome,
such as yes and no, based on prior observations of a dataset
-2 possible outcomes, yes/no, true/false
Steps to follow for building a Logistic Regression Model - answer1. Importing the
dataset
2. Using the CSV file
3. Importing the libraries
4. Splitting the dataset into Train & Test
5. Apply the logistic regression model
6. Validate the model
WE NEED TO SPLIT THE DATA INTO TWO DATASETS - answersplit<-
sample.split(Loan_ds$approved.splitRatio= 0.7)
TrainData<-subset(Loan_ds, split== "TRUE")
TestData<-subset(Loan_ds, split=="FALSE")
Generate logistic regression model is glm() function - answerlogmodel1<-
glm(approved~credit.score, data= TrainData, family="binomial")
summary(logellmodel1) - printing the model
**Binomial" to tell R is a logistic regression model**
Need to get prediction results
"Response" telling r to return the probability results - answerprob_train<-
predict(logmodel1,TrainData, type="response")
The benefits of buying summaries with Stuvia:
Guaranteed quality through customer reviews
Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.
Quick and easy check-out
You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.
Focus on what matters
Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!
Frequently asked questions
What do I get when I buy this document?
You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.
Satisfaction guarantee: how does it work?
Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.
Who am I buying these notes from?
Stuvia is a marketplace, so you are not buying this document from us, but from seller julianah420. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for $13.49. You're not tied to anything after your purchase.