---
library_name: sklearn
tags:
- sklearn
- skops
- tabular-classification
- finance
model_format: pickle
model_file: skops-uv7zld8n.pkl
widget:
- structuredData:
AGE:
- 32
- 45
- 25
GENDER:
- m
- f
- f
HOWPAID:
- 'weekly '
- 'weekly '
- 'weekly '
INCOME:
- 21772
- 27553
- 23477
LOANS:
- 1
- 2
- 1
MARITAL:
- 'married '
- divsepwid
- 'single '
MORTGAGE:
- 'y'
- 'y'
- 'n'
NUMCARDS:
- 2
- 6
- 1
NUMKIDS:
- 1
- 4
- 1
STORECAR:
- 3
- 5
- 2
datasets:
- saifhmb/CreditCardRisk
---
# Model description
This is a logistic regression model trained on customers' credit card risk data in a bank using sklearn library.
The model predicts whether a customer is worth issuing a credit card or not. The full dataset can be viewed at the following link: https://huggingface.co/datasets/saifhmb/CreditCardRisk
## Training Procedure
The data preprocessing steps applied include the following:
- Dropping high cardinality features, specifically ID
- Transforming and Encoding categorical features namely: GENDER, MARITAL, HOWPAID, MORTGAGE and the target variable, RISK
- Splitting the dataset into training/test set using 85/15 split ratio
- Applying feature scaling on all features
### Hyperparameters
Click to expand
| Hyperparameter | Value |
|-------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------|
| memory | |
| steps | [('preprocessor', ColumnTransformer(remainder='passthrough',
transformers=[('cat',
Pipeline(steps=[('onehot',
OneHotEncoder(handle_unknown='ignore'))]),
['GENDER', 'MARITAL', 'HOWPAID', 'MORTGAGE'])])), ('classifier', LogisticRegression())] |
| verbose | False |
| preprocessor | ColumnTransformer(remainder='passthrough',
transformers=[('cat',
Pipeline(steps=[('onehot',
OneHotEncoder(handle_unknown='ignore'))]),
['GENDER', 'MARITAL', 'HOWPAID', 'MORTGAGE'])]) |
| classifier | LogisticRegression() |
| preprocessor__n_jobs | |
| preprocessor__remainder | passthrough |
| preprocessor__sparse_threshold | 0.3 |
| preprocessor__transformer_weights | |
| preprocessor__transformers | [('cat', Pipeline(steps=[('onehot', OneHotEncoder(handle_unknown='ignore'))]), ['GENDER', 'MARITAL', 'HOWPAID', 'MORTGAGE'])] |
| preprocessor__verbose | False |
| preprocessor__verbose_feature_names_out | True |
| preprocessor__cat | Pipeline(steps=[('onehot', OneHotEncoder(handle_unknown='ignore'))]) |
| preprocessor__cat__memory | |
| preprocessor__cat__steps | [('onehot', OneHotEncoder(handle_unknown='ignore'))] |
| preprocessor__cat__verbose | False |
| preprocessor__cat__onehot | OneHotEncoder(handle_unknown='ignore') |
| preprocessor__cat__onehot__categories | auto |
| preprocessor__cat__onehot__drop | |
| preprocessor__cat__onehot__dtype |
Pipeline(steps=[('preprocessor',ColumnTransformer(remainder='passthrough',transformers=[('cat',Pipeline(steps=[('onehot',OneHotEncoder(handle_unknown='ignore'))]),['GENDER', 'MARITAL','HOWPAID', 'MORTGAGE'])])),('classifier', LogisticRegression())])In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook.
Pipeline(steps=[('preprocessor',ColumnTransformer(remainder='passthrough',transformers=[('cat',Pipeline(steps=[('onehot',OneHotEncoder(handle_unknown='ignore'))]),['GENDER', 'MARITAL','HOWPAID', 'MORTGAGE'])])),('classifier', LogisticRegression())])
ColumnTransformer(remainder='passthrough',transformers=[('cat',Pipeline(steps=[('onehot',OneHotEncoder(handle_unknown='ignore'))]),['GENDER', 'MARITAL', 'HOWPAID', 'MORTGAGE'])])
['GENDER', 'MARITAL', 'HOWPAID', 'MORTGAGE']
OneHotEncoder(handle_unknown='ignore')
['AGE', 'INCOME', 'NUMKIDS', 'NUMCARDS', 'STORECAR', 'LOANS']
passthrough
LogisticRegression()