Background
Lending services companies allow individual investors to partially fund personal loans as well as buy and sell notes backing the loans on a secondary market.
I used this data to create machine learning models to classify the risk level of given loans. Specifically, you will be comparing the Logistic Regression model and Random Forest Classifier.
This project was completed using the following workflow:
Retrieve the data
The data is located in the Challenge Files Folder:
lending_data.csv
Import the data using Pandas.
Consider the Models
Compare and consider two models on this data: a Logistic Regression, and a Random Forests Classifier.
Fit a LogisticRegression model and RandomForestClassifier model
Create a Logistic Regression model, fit it to the data, and print the model's score. Do the same for a Random Forest Classifier. Choose any starting hyperparameters you like. Which model performed better? How does that compare to beginning predictions? Write down results and thoughts.
Methods used:
Pandas
Train_test_split
LogisticRegression
RandomForestClassifier
StandardScaler
Confusion_matrix