Downloads · 30 days
0
redblackbird/flawed_loan_approval_model
flawed_loan_approval_model is a machine learning model from redblackbird. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as mit.
This model exists to be used within a course to demonstrate model inversion attacks.
Downloads · 30 days
0
Access
Public
Updated Aug 7, 2024
Repo size
4.5 GB
Likes
0
Public
Click a slice to open those files.
.pkl2.4 GB · 100%
From the Hugging Face model README
This model exists to be used within a course to demonstrate model inversion attacks.
To interact with this model:
Download the .pkl file
In the same directory the .pkl file is in, create a python script.
Within the python file, include the following:
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)
Leave questions in the community section.