Skip to content
Learning

Assess the risk of default payments using machine learning

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.

30,000Source records
28Final input features
6,000Test observations
0.779Test ROC AUC

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.

Credit riskModel validationPortfolio analytics
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.

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.

SubsetRecords
Training18000
Validation / selection6000
Testing6000
Unused0
VariableRoleTypeEncodingUnit
limit_balanceInputNumericAs supplied
genderInputBinaryfemale; maleAs supplied
education_levelInputCategoricalgraduate_school; high_school; others; universityAs supplied
marital_statusInputCategoricalmarried; others; singleAs supplied
ageInputNumericAs supplied
repayment_status_lag_1InputNumericAs supplied
repayment_status_lag_2InputNumericAs supplied
repayment_status_lag_3InputNumericAs supplied
repayment_status_lag_4InputNumericAs supplied
repayment_status_lag_5InputNumericAs supplied
repayment_status_lag_6InputNumericAs supplied
bill_state_amount_lag_1InputNumericAs supplied
bill_state_amount_lag_2InputNumericAs supplied
bill_state_amount_lag_3InputNumericAs supplied
bill_state_amount_lag_4InputNumericAs supplied
bill_state_amount_lag_5InputNumericAs supplied
bill_state_amount_lag_6InputNumericAs supplied
payment_amount_lag_1InputNumericAs supplied
payment_amount_lag_2InputNumericAs supplied
payment_amount_lag_3InputNumericAs supplied
payment_amount_lag_4InputNumericAs supplied
payment_amount_lag_5InputNumericAs supplied
payment_amount_lag_6InputNumericAs supplied
defaultTargetBinary0; 1As supplied

Interactive chart: default pie chart. Enable JavaScript to explore it.

default pie chart. Exported with Neural Designer from the saved task report.

Interactive chart: default Pearson correlations chart. Enable JavaScript to explore it.

default Pearson correlations chart. Exported with Neural Designer from the saved task report.
This is internal validation using the saved record-level split. Grouped or temporal independence has not been established. Mean across used rows, matching TabularDataset::scrub_missing_values; preprocessing is not isolated to training.

3. Model

The final model has 28 encoded input features and 1 outputs. The following dimensions describe the final saved network.

LayerInput shapeOutput shapeActivation
Scaling2828—
Dense288Tanh
Dense81Sigmoid

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.

Assessing recorded credit-card payment default: initial Neural Designer architecture
Initial architecture before selection. Diagram labels show original variables; categorical expansion and the numeric layer dimensions are documented in the model table.

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 error history. Exported with Neural Designer from the saved task report.

Quasi-Newton method results

MeasureValue
Epochs number209
Elapsed time00:00:02
Stopping criterionMaximum validation error increases
Training error0.58
Validation error0.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 training/selection errors plot. Exported with Neural Designer from the saved task report.

Growing neurons results

MeasureValue
Optimal neurons number8
Optimum training error0.5691
Optimum selection error0.6016
Epochs number10
Stopping criterionMaximum neurons reached
Elapsed time00:00:29
Assessing recorded credit-card payment default: selected Neural Designer architecture
Final architecture used for testing. Diagram labels show original variables; categorical expansion and the numeric layer dimensions are documented in the model table.

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 / predicted01Total
037789144692
14798291308
ClassTest casesSensitivity / recallSpecificityPrecision / PPVF1
0469280.5%63.4%88.7%0.844
1130863.4%80.5%47.6%0.543

Interactive chart: ROC chart. Enable JavaScript to explore it.

ROC chart. Exported with Neural Designer from the saved task report.

Interactive chart: Cumulative gain chart. Enable JavaScript to explore it.

Cumulative gain chart. Exported with Neural Designer from the saved task report. This native curve is expressed in positive/negative rates. It is a discrimination view, not a validated fraction-of-customers campaign gain.

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
MeasureVariableValue
1limit_balance50000
2genderfemale
3education_levelgraduate_school
4marital_statussingle
5age25
6repayment_status_lag_11
7repayment_status_lag_22
8repayment_status_lag_32
9repayment_status_lag_42
10repayment_status_lag_52
11repayment_status_lag_62
12bill_state_amount_lag_147054
13bill_state_amount_lag_248008
14bill_state_amount_lag_348913
15bill_state_amount_lag_449847
16bill_state_amount_lag_550840
17bill_state_amount_lag_649502
18payment_amount_lag_12000
19payment_amount_lag_22000
20payment_amount_lag_32000
21payment_amount_lag_41900
22payment_amount_lag_51900
23payment_amount_lag_61600

Interactive chart: default – repayment_status_lag_1 directional output. Enable JavaScript to explore it.

default – repayment_status_lag_1 directional output. Exported with Neural Designer from the saved task report. Other inputs are held at the saved reference point. This is a model response, not a causal effect.

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.

References