Skip to content

shohaha/ML-predicting-credit-risk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Supervised ML- Predicting Credit Risk

Machine Learning Bootcamp Assignment

Build a machine learning model that attempts to predict whether a loan will be approved or not.

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.

Use 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.

Instructions

Retrieve the data

The data is located in the Resources folder.

  • lending_data.csv

Import the data using Pandas.

Consider the models

Create and compare two models on this data: a logistic regression, and a random forests classifier. Before creating, fit, and score the models, make a prediction as to which model you think will perform better. You do not need to be correct! Write down (in markdown cells in your Jupyter Notebook) your prediction, and provide justification for your educated guess.

Fit a LogisticRegression model and RandomForestClassifier model

Create a LogisticRegression model, fit it to the data, and print the model's score. Do the same for a RandomForestClassifier. Choose any starting hyperparameters you like. Which model performed better? How does that compare to your prediction? Write down your results and thoughts.