Assessing recorded credit-card payment default
Credit-risk teams need to understand both ranking performance and the consequences of a decision threshold. This example estimates the recorded default outcome from account limits, repayment history, bills and payments.
1. Business decision
Credit analysts can study the relationship between recorded client information and payment default. An internal benchmark supports model comparison; an operational lending policy requires separate assessment.
Payment outcome
The positive label is default=1.
Client information
Categorical fields expand into the final network input schema.
Policy assessment
Review calibration, subgroup behaviour and decision costs before operational use.
2. Data set
The example uses the UCI Default of Credit Card Clients dataset. The saved project contains 30,000 records and expands categorical inputs before training. The positive class is default=1. Some encoded cells require mean replacement when the project is loaded.
The downloadable project, saved report and supplied source CSV define the exact version used here. Repository: original dataset/source record.
| Subset | Records |
|---|---|
| Training | 18000 |
| Validation / selection | 6000 |
| Testing | 6000 |
| Unused | 0 |
| Variable | Role | Type | Encoding | Unit |
|---|---|---|---|---|
| limit_balance | Input | Numeric | As supplied | |
| gender | Input | Binary | female; male | As supplied |
| education_level | Input | Categorical | graduate_school; high_school; others; university | As supplied |
| marital_status | Input | Categorical | married; others; single | As supplied |
| age | Input | Numeric | As supplied | |
| repayment_status_lag_1 | Input | Numeric | As supplied | |
| repayment_status_lag_2 | Input | Numeric | As supplied | |
| repayment_status_lag_3 | Input | Numeric | As supplied | |
| repayment_status_lag_4 | Input | Numeric | As supplied | |
| repayment_status_lag_5 | Input | Numeric | As supplied | |
| repayment_status_lag_6 | Input | Numeric | As supplied | |
| bill_state_amount_lag_1 | Input | Numeric | As supplied | |
| bill_state_amount_lag_2 | Input | Numeric | As supplied | |
| bill_state_amount_lag_3 | Input | Numeric | As supplied | |
| bill_state_amount_lag_4 | Input | Numeric | As supplied | |
| bill_state_amount_lag_5 | Input | Numeric | As supplied | |
| bill_state_amount_lag_6 | Input | Numeric | As supplied | |
| payment_amount_lag_1 | Input | Numeric | As supplied | |
| payment_amount_lag_2 | Input | Numeric | As supplied | |
| payment_amount_lag_3 | Input | Numeric | As supplied | |
| payment_amount_lag_4 | Input | Numeric | As supplied | |
| payment_amount_lag_5 | Input | Numeric | As supplied | |
| payment_amount_lag_6 | Input | Numeric | As supplied | |
| default | Target | Binary | 0; 1 | As supplied |
Interactive chart: default pie chart. Enable JavaScript to explore it.
Interactive chart: default Pearson correlations chart. Enable JavaScript to explore it.
3. Model
The final model has 28 encoded input features and 1 outputs. The following dimensions describe the final saved network.
| Layer | Input shape | Output shape | Activation |
|---|---|---|---|
| Scaling | 28 | 28 | — |
| Dense | 28 | 8 | Tanh |
| Dense | 8 | 1 | Sigmoid |
Output semantics: the sigmoid score increases toward 1; 0 is the other class. Calibration has not been evaluated, so scores are not presented as calibrated probabilities.

4. Training strategy
The saved training configuration uses WeightedSquaredError with QuasiNewton. Training minimizes the recorded objective; the validation subset monitors generalization during fitting. The testing subset is used for the evaluation below.
Interactive chart: Quasi-Newton method error history. Enable JavaScript to explore it.
Quasi-Newton method results
| Measure | Value |
|---|---|
| Epochs number | 209 |
| Elapsed time | 00:00:02 |
| Stopping criterion | Maximum validation error increases |
| Training error | 0.58 |
| Validation error | 0.61 |
5. Model selection
The following search results are recorded in the saved report. Selection used the validation subset. These are the selected settings within the tested search; they do not establish a globally optimal model.
Interactive chart: Growing neurons training/selection errors plot. Enable JavaScript to explore it.
Growing neurons results
| Measure | Value |
|---|---|
| Optimal neurons number | 8 |
| Optimum training error | 0.5691 |
| Optimum selection error | 0.6016 |
| Epochs number | 10 |
| Stopping criterion | Maximum neurons reached |
| Elapsed time | 00:00:29 |

A transparent test-set comparator is the majority-class rule, with accuracy 78.2%. This is a baseline for interpretation, not an alternative model fitted on the test labels.
6. Testing analysis
The final classifier is evaluated on 6,000 testing records. The confusion counts below were reproduced from the saved model. Rows are actual classes and columns are predicted classes. The decision threshold is 0.5 on the score for 1.
Test class prevalence is shown by the support counts. Accuracy is 76.8% and macro F1 is 0.694. ROC AUC is 0.779. The native ROC optimal threshold is descriptive of this test set and is not an independently validated operating policy.
| Actual / predicted | 0 | 1 | Total |
|---|---|---|---|
| 0 | 3778 | 914 | 4692 |
| 1 | 479 | 829 | 1308 |
| Class | Test cases | Sensitivity / recall | Specificity | Precision / PPV | F1 |
|---|---|---|---|---|---|
| 0 | 4692 | 80.5% | 63.4% | 88.7% | 0.844 |
| 1 | 1308 | 63.4% | 80.5% | 47.6% | 0.543 |
Interactive chart: ROC chart. Enable JavaScript to explore it.
Interactive chart: Cumulative gain chart. Enable JavaScript to explore it.
7. Model deployment
Validated inputs → saved preprocessing → neural network → score or estimate → domain review. The ZIP contains the original project, source CSV, schema, test metrics and standalone interactive chart exports. The project hash in the schema identifies this exact version.
Directional response at a fixed reference point
Inspect the saved reference point
| Measure | Variable | Value |
|---|---|---|
| 1 | limit_balance | 50000 |
| 2 | gender | female |
| 3 | education_level | graduate_school |
| 4 | marital_status | single |
| 5 | age | 25 |
| 6 | repayment_status_lag_1 | 1 |
| 7 | repayment_status_lag_2 | 2 |
| 8 | repayment_status_lag_3 | 2 |
| 9 | repayment_status_lag_4 | 2 |
| 10 | repayment_status_lag_5 | 2 |
| 11 | repayment_status_lag_6 | 2 |
| 12 | bill_state_amount_lag_1 | 47054 |
| 13 | bill_state_amount_lag_2 | 48008 |
| 14 | bill_state_amount_lag_3 | 48913 |
| 15 | bill_state_amount_lag_4 | 49847 |
| 16 | bill_state_amount_lag_5 | 50840 |
| 17 | bill_state_amount_lag_6 | 49502 |
| 18 | payment_amount_lag_1 | 2000 |
| 19 | payment_amount_lag_2 | 2000 |
| 20 | payment_amount_lag_3 | 2000 |
| 21 | payment_amount_lag_4 | 1900 |
| 22 | payment_amount_lag_5 | 1900 |
| 23 | payment_amount_lag_6 | 1600 |
Interactive chart: default – repayment_status_lag_1 directional output. Enable JavaScript to explore it.
Explore the exported model
This research demonstration runs locally in your browser. Values outside the training range are outside the validated domain and are rejected. A valid input range does not guarantee that a combination is physically or operationally plausible.
This is a research demonstration, not a validated decision policy.
8. Evidence and limitations
Internal benchmark performance does not establish a suitable lending policy. Use an out-of-time population, review affordability and protected attributes, test calibration and subgroup errors, and retain human review. A model trained on existing customers may not represent new applicants.
No external validation or independent calibration study is included. Preprocessing statistics and model choices should be refitted within a prospective or grouped validation design. Correlations and directional responses describe associations, not causes. Human review is required before an operational decision.
Confidence intervals, subgroup performance, calibration curves and decision-cost validation are not established by these tasks. Predictive values apply to the observed test class distribution and may change when prevalence shifts.



