Total Pageviews

Monday, August 31, 2026

🧠 Artificial Neural Network for Credit Card Approval

🧠 Artificial Neural Network for Credit Card Approval

A simple ANN example using Age, Salary and Credit Score to predict whether a credit-card application should be approved.

1. What is an ANN?

An Artificial Neural Network (ANN) is a machine-learning model inspired by the way biological neurons process information.

In this example, the ANN receives three input features:

Age Salary Credit Score

These values are processed through neurons. Each neuron calculates a weighted sum, adds a bias, and then applies an activation function. The final output represents the probability of credit-card approval.

2. Example Applicant Data

Feature Applicant Value Meaning
Age 30 years Applicant's age
Salary ₹60,000 / month Monthly income
Credit Score 750 Creditworthiness
Educational Example: The numbers and weights below are intentionally simplified so that the ANN mathematics can be followed manually.

3. ANN Structure

INPUT LAYER
Age
30
Salary
60,000
Credit Score
750
OUTPUT LAYER
Approval
Probability

Every connection has a weight. A neuron also has a bias. The network learns suitable weights and biases during training.

4. Step 1 — Normalize the Input

Salary and credit score have much larger numerical values than age. Therefore, normalization is useful before feeding the values into the ANN.

For this classroom example, use these normalized values:

Age = 0.30
Salary = 0.60
Credit Score = 0.75

Therefore:

X₁ = 0.30
X₂ = 0.60
X₃ = 0.75

5. Step-by-Step ANN Mathematics

Click the buttons to reveal each mathematical step.

1 Define the Inputs

Our applicant has three input values:

X₁ = Age = 0.30
X₂ = Salary = 0.60
X₃ = Credit Score = 0.75

These three values enter the input layer of the neural network.

2 Assign Weights and Bias

Suppose the trained network has learned the following simplified weights for hidden neuron H₁:

W₁ = 0.20
W₂ = 0.50
W₃ = 0.30
Bias = 0.10

The weights indicate how strongly each input contributes to the neuron's calculation.

3 Calculate Weighted Sum

The neuron first calculates:

Z = X₁W₁ + X₂W₂ + X₃W₃ + Bias

Substitute the values:

Z = (0.30 × 0.20) + (0.60 × 0.50) + (0.75 × 0.30) + 0.10

Calculate each multiplication:

0.30 × 0.20 = 0.06
0.60 × 0.50 = 0.30
0.75 × 0.30 = 0.225

Therefore:

Z = 0.06 + 0.30 + 0.225 + 0.10

Z = 0.685

4 Apply Activation Function

We can use the Sigmoid activation function:

Sigmoid(z) = 1 / (1 + e-z)

Since:

Z = 0.685

Substitute:

H₁ = 1 / (1 + e-0.685)

Approximately:

e-0.685 ≈ 0.504

H₁ ≈ 1 / (1 + 0.504)

H₁ ≈ 0.665

Therefore, the hidden neuron produces approximately: 0.665.

5 Calculate Output Neuron

Suppose the output neuron receives H₁ = 0.665 and uses:

Output Weight = 1.20
Output Bias = -0.30

The output neuron calculates:

Zout = (H₁ × Output Weight) + Output Bias

Substitute:

Zout = (0.665 × 1.20) - 0.30
Zout = 0.798 - 0.30

Zout = 0.498

6 Calculate Final Approval Probability

Apply the sigmoid function again:

P(Approval) = 1 / (1 + e-0.498)

Approximately:

P(Approval) ≈ 0.622
Approval Probability ≈ 62.2%

If our decision threshold is 50%:

62.2% ≥ 50%
Therefore → APPROVE
✅ Predicted Result: CREDIT CARD APPROVED

6. Complete Mathematical Flow

Input

Age = 0.30, Salary = 0.60, Credit Score = 0.75


Weighted Sum
Z = X₁W₁ + X₂W₂ + X₃W₃ + b
Z = 0.685


Sigmoid Activation
H₁ ≈ 0.665


Output Weighted Sum
Zout = (0.665 × 1.20) - 0.30
Zout = 0.498


Final Sigmoid
P(Approval) ≈ 0.622


62.2% → APPROVED

7. Important ANN Terms

Input Layer Neuron Weight Bias Weighted Sum Activation Function Sigmoid Hidden Layer Output Layer Probability Decision Threshold

Key idea: An ANN combines the input values using learned weights and biases, transforms the result through activation functions, and produces an output that can be interpreted as a prediction.

No comments:

Post a Comment