File size: 6,953 Bytes
7ab391b
 
 
 
 
 
 
 
 
 
 
6c591bd
7ab391b
 
2c49480
2192380
 
 
35f6cd4
2192380
35f6cd4
2192380
35f6cd4
2192380
515aa19
 
 
35f6cd4
515aa19
35f6cd4
515aa19
35f6cd4
2c49480
 
 
 
fd6bbae
 
7ab391b
 
2c49480
 
6c591bd
39c47a5
2c49480
8585a38
6c591bd
39c47a5
 
2c49480
6c591bd
39c47a5
 
 
 
8585a38
 
 
39c47a5
 
 
 
 
499af25
6c591bd
 
39c47a5
5c0514a
 
 
 
 
 
74a222f
5c0514a
 
74a222f
5c0514a
 
 
 
 
 
 
 
 
 
7ab391b
 
74a222f
7ab391b
6c591bd
7ab391b
 
6c591bd
7ab391b
fd6bbae
 
 
 
 
 
 
 
 
5c0514a
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
---

license: cc0-1.0
task_categories:
- tabular-classification
language:
- en
tags:
- Data-science
- Machine-learning
- Risk-prediction
- Finance
pretty_name: "LendingClub Loan Data (2007-2018)"
size_categories:
- 1M<n<10M
configs:
- config_name: default
  data_files:
  - split: train
    path: data/before_feature_engineering/train.parquet
  - split: validation
    path: data/before_feature_engineering/val.parquet
  - split: test
    path: data/before_feature_engineering/test.parquet
  default: true
- config_name: feature_engineered
  data_files:
  - split: train
    path: data/after_feature_engineering/train.parquet
  - split: validation
    path: data/after_feature_engineering/val.parquet
  - split: test
    path: data/after_feature_engineering/test.parquet
- config_name: data_dictionary_summary
  data_files: data_dictionary/data_dictionary_summary.csv
- config_name: missing_values_summary
  data_files: data_dictionary/missing_values_summary.csv
- config_name: missing_and_leakage_manual_review
  data_files: data_dictionary/missing_and_leakage_manual_review.csv
---


![LendingClub Loan Data banner](assets/banner.svg)

# LendingClub Loan Data (2007-2018)

[![License: CC0-1.0](https://img.shields.io/badge/License-CC0%201.0-lightgrey)](https://creativecommons.org/publicdomain/zero/1.0/) [![BuildersLab](https://img.shields.io/badge/BuildersLab-builderslab.dev-F05A24)](https://builderslab.dev/) [![LinkedIn](https://img.shields.io/badge/LinkedIn-BuildersLab-0A66C2?logo=linkedin&logoColor=white)](https://www.linkedin.com/company/builderslabdev) [![GitHub repo](https://img.shields.io/badge/GitHub-Credit--Risk--Default-181717?logo=github)](https://github.com/BuildersLab/Credit-Risk-Default) [![Live Demo](https://img.shields.io/badge/Streamlit-Live%20Demo-FF4B4B?logo=streamlit&logoColor=white)](https://portfolio-risk-prediction.streamlit.app/)

Personal loan applications and originations from LendingClub (2007-2018), sourced from Kaggle. Used by [BuildersLab](https://github.com/BuildersLab)'s **Credit Risk Default** project to build an explainable model that predicts **loan application defaults**, not a credit card product, for a fictional bank case study.

- **Project repo:** https://github.com/BuildersLab/Credit-Risk-Default
- **Live demo:** https://portfolio-risk-prediction.streamlit.app/
- **Source:** [Kaggle: All Lending Club loan data](https://www.kaggle.com/datasets/wordsforthewise/lending-club) (`wordsforthewise/lending-club`)
- **License:** CC0 1.0 Universal (Public Domain)

## About the project

[BuildersLab](https://builderslab.dev/) is a community that turns learners into builders through real projects, not just tutorials. It gives students and early-career people real-world experience, mentorship, and guidance so they can grow from learners into confident builders ready for the first day of their careers.

This dataset backs **Credit Risk Default**: an explainable credit-risk platform that predicts the probability a personal loan will default, using only borrower and loan characteristics available at origination, and surfaces the result through an interactive review dashboard for credit officers. NorthBay Bank is a fictional company created for this exercise.

### Team

| Name | Role |
|---|---|
| Nafisat Ibrahim | Project Lead & Data Scientist |
| Marienne Dosso | Data Scientist |
| Bintou Ba | Data Scientist |

## Dataset Splits

Two versions of the same train/validation/test splits are available as separate configs:

- **`default`** (used automatically if you don't pass a config name): the cleaned,
  target-filtered, leakage-removed, imputed dataset from
  [`notebooks/00_cleaning.ipynb`](https://github.com/BuildersLab/Credit-Risk-Default/blob/nafisat/notebooks/00_cleaning.ipynb),
  before feature engineering. Files under `data/before_feature_engineering/`.
- **`feature_engineered`**: the same splits after

  [`notebooks/02_feature_engineering.ipynb`](https://github.com/BuildersLab/Credit-Risk-Default/blob/nafisat/notebooks/02_feature_engineering.ipynb)

  (engineered features added, several raw columns consolidated or dropped).

  Files under `data/after_feature_engineering/`.



```python

from datasets import load_dataset



before = load_dataset("BuildersLab/loan-application-dataset")                        # default config

after  = load_dataset("BuildersLab/loan-application-dataset", "feature_engineered")  # after feature engineering

```



## Data Dictionary



Reference files under `data_dictionary/`, produced while cleaning and engineering the LendingClub data (see [`notebooks/00_cleaning.ipynb`](https://github.com/BuildersLab/Credit-Risk-Default/blob/nafisat/notebooks/00_cleaning.ipynb) and [`notebooks/02_feature_engineering.ipynb`](https://github.com/BuildersLab/Credit-Risk-Default/blob/nafisat/notebooks/02_feature_engineering.ipynb)), not Kaggle's raw column list. Each has a different schema, so each CSV is declared as its own config above (see `configs:` in the metadata) rather than being auto-merged.



- **`data_dictionary_summary.csv`**: one row per column: `Variable`, `Description`

  (LendingClub's official column definition), `Missing Values` (count),

  `Percentage (%)`, and `Missingness Label` (e.g. "Very High (95-100%)").

- **`missing_values_summary.csv`**: missing-value counts and percentages per column,

  used to identify and drop columns with structural missingness before modeling.

- **`missing_and_leakage_manual_review.csv`**: the full manual review of all 151

  original columns, `Keep` (boolean), `Reason`, and whether each column is

  available at time of application (pre-loan) versus only during the loan

  lifecycle (post-origination). This is the source review behind the leakage

  and structural-missingness decisions in `00_cleaning.ipynb`.

- **`missing_values_decisions.xlsx`**: per-column imputation decision for the 87

  columns that survive the leakage/keep review (median fill, median plus a

  missing-flag column, mode plus flag, or drop rows), with the mechanism and

  reasoning behind each call.

- **`feature_engineering_data_dictionary.xlsx`**: 4-sheet workbook covering the
  `feature_engineered` split from `02_feature_engineering.ipynb`: a data
  dictionary, dictionary plus per-column statistics (min/max/mean/std/percentiles
  for numeric columns, unique/top/freq for categorical columns, missing value
  count for all), a full feature x feature correlation matrix, and feature x
  `default` target correlation.

## Outputs

Analysis artifacts produced by the notebooks, not part of the model-ready dataset
itself, live under `outputs/`. Currently the feature x feature correlation matrix
(`feature_correlation_matrix.csv`) and its heatmap (`feature_correlation_matrix.png`)
from `02_feature_engineering.ipynb`; later notebooks will add artifacts like SHAP
plots and evaluation curves here too.