🧠 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 ScoreThese 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 |
3. ANN Structure
30
60,000
750
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:
Salary = 0.60
Credit Score = 0.75
Therefore:
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₂ = 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.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:
Substitute the values:
Calculate each multiplication:
0.60 × 0.50 = 0.30
0.75 × 0.30 = 0.225
Therefore:
Z = 0.685
4 Apply Activation Function
We can use the Sigmoid activation function:
Since:
Substitute:
Approximately:
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 Bias = -0.30
The output neuron calculates:
Substitute:
Zout = 0.498
6 Calculate Final Approval Probability
Apply the sigmoid function again:
Approximately:
If our decision threshold is 50%:
Therefore → APPROVE
6. Complete Mathematical Flow
↓
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 ThresholdKey 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