Skip to content
Learning

Target customers for a banking product using machine learning

Evaluating response to a banking campaign

Campaign capacity is limited. This example uses customer and contact information to rank the likelihood of the recorded conversion outcome, then examines the trade-off between missed conversions and unnecessary contacts.

4,120Source records
17Final input features
824Test observations
0.731Test ROC AUC

1. Business decision

A campaign response model can help organize customer analysis when its inputs are available at the time of contact. The saved schema omits call duration, which would only be known after a call.

Before contact

Use customer and campaign information in the prepared schema.

Response ranking

Examine how subscription outcomes vary with the model score.

Contact decisions

Combine response evidence with separately measured costs and intervention effects.

Marketing analyticsCampaign planningCustomer operations
Past campaign outcomes depend on who was contacted and when. A new campaign needs temporal validation, verified contact-time feature availability, calibration and an experiment measuring incremental conversions. Codes such as job and education are numeric in this supplied project; their order is a modelling assumption.

2. Data set

This prepared version of the UCI Bank Marketing data contains 4,120 records. The local schema excludes call duration. Several fields contain missing values and use the application's mean imputation; this preprocessing was not fitted exclusively on the training subset.

The downloadable project, saved report and supplied source CSV define the exact version used here. Repository: original dataset/source record.

SubsetRecords
Training2472
Validation / selection824
Testing824
Unused0
VariableRoleTypeEncodingUnit
ageInputNumericAs supplied
jobInputNumericAs supplied
marital_statusInputCategoricaldivorced; married; singleAs supplied
educationInputNumericAs supplied
defaultInputBinary0; 1As supplied
balanceInputNumericAs supplied
housingInputBinary0; 1As supplied
loanInputBinary0; 1As supplied
contact_typeInputBinary0; 1As supplied
dayInputNumericAs supplied
monthInputNumericAs supplied
campaing_contactsInputNumericAs supplied
last_contactInputNumericAs supplied
previous_contactsInputNumericAs supplied
previous_conversionInputBinary0; 1As supplied
conversionTargetBinary0; 1As supplied

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

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

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

conversion 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 17 encoded input features and 1 outputs. The following dimensions describe the final saved network.

LayerInput shapeOutput shapeActivation
Scaling1717—
Dense173Tanh
Dense31Sigmoid

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.

Evaluating response to a banking campaign: initial Neural Designer architecture
Architecture used for this model; no architecture-selection experiment is recorded. 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 number184
Elapsed time00:00:01
Stopping criterionMinimum loss decrease
Training error0.522
Validation error0.536

5. Model selection

No model selection experiment is recorded in this supplied project. The displayed architecture is the trained model used for testing; earlier article claims about a different selected architecture do not apply to this version.

A transparent test-set comparator is the majority-class rule, with accuracy 88.3%. This is a baseline for interpretation, not an alternative model fitted on the test labels.

6. Testing analysis

The final classifier is evaluated on 824 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 70.5% and macro F1 is 0.571. ROC AUC is 0.731. The native ROC optimal threshold is descriptive of this test set and is not an independently validated operating policy.

Actual / predicted01Total
0521207728
1366096
ClassTest casesSensitivity / recallSpecificityPrecision / PPVF1
072871.6%62.5%93.5%0.811
19662.5%71.6%22.5%0.331

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

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

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
1age33
2job2
3marital_statusmarried
4education3
5default0
6balance79
7housing1
8loan0
9contact_type0
10day22
11month10
12campaing_contacts2
13last_contact335
14previous_contacts2
15previous_conversion0

Interactive chart: conversion – age directional output. Enable JavaScript to explore it.

conversion – age 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

Past campaign outcomes depend on who was contacted and when. A new campaign needs temporal validation, verified contact-time feature availability, calibration and an experiment measuring incremental conversions. Codes such as job and education are numeric in this supplied project; their order is a modelling assumption.

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