---
title: "ANN and back propagation"
subject: "Data Mining"
chapter: 3
key: "semester_7/data_mining:ann-backpropagation"
source: https://www.bctengineer.com/q/semester_7/data_mining/ann-backpropagation
site: BCT Engineering
---

# ANN and back propagation

Data Mining · Chapter 3: Classification

- Asked in: year not given
- Video: [#1 Solved Example Back Propagation Algorithm Multi-Layer Perceptron Network by Dr. Mahesh Huddar](https://www.youtube.com/watch?v=tUoUdOdTkRw) — Mahesh Huddar
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_7/data_mining/ann-backpropagation
- Whole chapter: https://www.bctengineer.com/md/semester_7/data_mining/chapter-3

## Question

Define Artificial Neural Network (ANN). Explain Back Propagation Algorithm for training an ANN.

## Short answer

An ANN is a network of connected neurons with weights learned by adjusting them. Backpropagation uses gradient descent, propagating errors backward from output to hidden layers to minimize mean squared error.

## Answer

An **Artificial Neural Network (ANN)** is a set of connected input/output units (neurons) with weights on the connections, arranged in layers. It learns by adjusting the weights so that the network predicts the correct class label. A neuron computes the net input Iⱼ = Σᵢ wᵢⱼOᵢ + θⱼ and the output Oⱼ = 1/(1 + e^(−Iⱼ)) (sigmoid).

```text
Input layer   Hidden layer   Output layer
  (x1) ---w--> (h1) ---w--->
  (x2) ---w--> (h2) ---w---> (y)
  (x3) ---w--> (h3) ---w--->
```

#### Backpropagation algorithm
Backpropagation learns by repeatedly processing the training tuples and comparing the network output with the known target value. The weights are changed to **minimise the mean squared error**, working **backwards** from the output layer to the first hidden layer, using gradient descent.

1. **Initialise** all weights and biases with small random numbers (e.g. −1 to 1), and choose the learning rate l.
2. **Forward pass**: feed a tuple to the input units (output = input); compute the net input and output Oⱼ of each hidden and output unit.
3. **Backward pass (error calculation)**:
   - Output unit j with target Tⱼ: Errⱼ = Oⱼ(1 − Oⱼ)(Tⱼ − Oⱼ)
   - Hidden unit j: Errⱼ = Oⱼ(1 − Oⱼ) Σₖ Errₖ wⱼₖ
4. **Update** weights and biases:
   - Δwᵢⱼ = l · Errⱼ · Oᵢ,  wᵢⱼ = wᵢⱼ + Δwᵢⱼ
   - Δθⱼ = l · Errⱼ,  θⱼ = θⱼ + Δθⱼ
5. **Terminate** when all Δw in the previous epoch were very small, or the percentage of misclassified tuples is below a threshold, or a maximum number of epochs is reached. Otherwise repeat from step 2 for the next tuple (case updating) or after all tuples (epoch updating).

The learning rate l (between 0 and 1) helps avoid getting stuck at a local minimum and controls the speed of convergence: if it is too small, learning is very slow; if it is too large, the weights oscillate. Input values are normalised to the range 0-1 before training.

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. The error for an output unit j is:
   A. Oj(1 - Oj)(Tj - Oj)
   B. (Tj - Oj)^2
   C. Oj(Tj - Oj)
   D. Oj(1 - Oj) times sum of Errk wjk
   Answer: A. This uses the sigmoid derivative times target minus output. (Key point: Output error)

2. The error for a hidden unit j is:
   A. Oj(1 - Oj)(Tj - Oj)
   B. Tj - Oj
   C. Sum of Oj
   D. Oj(1 - Oj) times sum over k of Errk wjk
   Answer: D. Hidden error is back-propagated from the next layer's errors weighted by connecting weights. (Key point: Hidden error)

3. The weight update rule is:
   A. Delta wij = l . Errj . Oj
   B. Delta wij = l . Errj . Oi
   C. Delta wij = Errj / l
   D. Delta wij = Oi - Oj
   Answer: B. The change is learning rate times error of the receiving unit times output of the sending unit. (Key point: Weight update)

4. What happens if the learning rate is too large?
   A. It gets stuck at once with no change
   B. It always reaches the global minimum
   C. Training oscillates
   D. Weights stay at initial values
   Answer: C. A too large rate oscillates; too small is slow. (Key point: Learning rate)

## Related in Data Mining

- [Short note: Neural network, perceptron rule](https://www.bctengineer.com/question.md?key=semester_7%2Fdata_mining%3Aneural-network-perceptron-note) — Data Mining, chapter 3

## Related in other subjects

- [Neural network; back-propagation](https://www.bctengineer.com/question.md?key=semester_6%2Fartificial_intelligence%3Aneural-network-bp-algorithm) — Artificial Intelligence, chapter 6
- [Neural network, back-propagation, perceptron](https://www.bctengineer.com/question.md?key=semester_6%2Fartificial_intelligence%3Ann-bp-perceptron) — Artificial Intelligence, chapter 6
- [Back propagation algorithm](https://www.bctengineer.com/question.md?key=semester_6%2Fartificial_intelligence%3Aback-propagation-algorithm) — Artificial Intelligence, chapter 6, asked 3×
- [Role of perceptron in neural network](https://www.bctengineer.com/question.md?key=semester_6%2Fartificial_intelligence%3Aperceptron-role) — Artificial Intelligence, chapter 6, asked 2×
