Skip to content

We used various techniques to train and evaluate a model based on loan risk. We used a dataset of historical lending activity from a peer-to-peer lending services company to build a model that can identify the creditworthiness of borrowers.

Notifications You must be signed in to change notification settings

alaa-aleryani/Credit_Risk_Classification

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 

Repository files navigation

Credit Risk Classification

In this Challenge, we used various techniques to train and evaluate a model based on loan risk. We used a dataset of historical lending activity from a peer-to-peer lending services company to build a model that can identify the creditworthiness of borrowers.

Instructions

The instructions for this Challenge are divided into the following subsections:

  • Split the Data into Training and Testing Sets
  • Create a Logistic Regression Model with the Original Data
  • Write a Credit Risk Analysis Report

Split the Data into Training and Testing Sets

  1. Read the lending_data.csv data from the Resources folder into a Pandas DataFrame.
  2. Create the labels set (y) from the “loan_status” column, and then create the features (X) DataFrame from the remaining columns.
  3. Split the data into training and testing datasets by using train_test_split.

NOTE: A value of 0 in the “loan_status” column means that the loan is healthy. A value of 1 means that the loan has a high risk of defaulting.

Create a Logistic Regression Model with the Original Data

  1. Fit a logistic regression model by using the training data (X_train and y_train).
  2. Save the predictions for the testing data labels by using the testing feature data (X_test) and the fitted model.
  3. Evaluate the model’s performance by doing the following:
    • Generate a confusion matrix.
    • Print the classification report.

Write a Credit Risk Analysis Report

  1. An overview of the analysis: Explain the purpose of this analysis.
  2. The results: Using a bulleted list, describe the accuracy score, the precision score, and recall score of the machine learning model.
  3. A summary: Summarize the results from the machine learning model. Include your justification for recommending the model for use by the company.

About

We used various techniques to train and evaluate a model based on loan risk. We used a dataset of historical lending activity from a peer-to-peer lending services company to build a model that can identify the creditworthiness of borrowers.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published