redblackbird's picture
Update README.md
8058f0a verified
---
license: mit
---
# Flawed Simulated Loan Approval Chance Predictor
This model exists to be used within a course to demonstrate model inversion attacks.
To interact with this model:
1. Download the .pkl file
2. In the same directory the .pkl file is in, create a python script.
3. Within the python file, include the following:
```python
import pandas as pd
import joblib
#load the model with this function!
def load_model():
return joblib.load('model.pkl')
model = load_model()
#City_codes range from 0-4, Income and CreditScore fields are also required.
user_input = pd.DataFrame({'City_Code': 0, 'Income': 20000, 'CreditScore': 100}, index=[0])
# predict the probability of a loan [[rejection, approval]] based on inputs
probas = model.predict_proba(user_input)
# print the output. Will be in the form [[rejection chance, approval chance]]
print(probas)
```
4. Run the script to view the output. Will be in the form \[\[rejection chance, approval chance\]\]
Leave questions in the community section.