Q41.Marks: +2.0UGC NET Paper 2: Computer Science and Application 26th June 2025 Shift 1
Consider the following table defining the sample inputs and corresponding target values for a perceptron model.
Sample No
x1
x2
target
w1
w2
S1
0
0
0
0
0
S2
0
1
1
S3
1
0
1
S4
1
1
1
What shall be the value of updated weights after applying all the samples S1 to S4 (in the order S1, S2, S3, S4) to this model. Given that the initial weights w1=0, w * 2 = 0 , learning rate =0.1 and no bias is involved in the perceptron. The activation function for this perceptron is given below
y_observed = { 1 if yin > 0
0 if yin < 0
1.w1= 0.1 , w2 = 0.1✓ Correct
2.w1 = 0.0 , w2 = 0.2
3.w1 = 0.0 , w2 = 0.1
4.w1 = 0.2 ,w2 = 0.2
Solution
The correct answer isOption 1) w1 = 0.1, w2 = 0.1
Given
Training samples (x1, x2 → target): S1:(0,0→0), S2:(0,1→1), S3:(1,0→1), S4:(1,1→1)
Initial weights: w1=0, w2=0; learning rate α=0.1; no bias.
Activation: y = 1 if yin > 0, else y = 0 (for yin ≤ 0 we take 0).
Perceptron update (sequential/online): w ← w + α (t − y) x i.e., wk,new = wk,old + α (t − y) xk.
Step-by-step training over S1 → S4
Sample
(x1,x2)
Target t
yin = w·x
y
Update
(w1,w2) after
S1
(0,0)
0
0
0
No change (x=0)
(0, 0)
S2
(0,1)
1
0
0
w ← w + 0.1(1−0)(0,1) = (0,0.1)
(0, 0.1)
S3
(1,0)
1
0
0
w ← (0,0.1) + 0.1(1−0)(1,0) = (0.1,0.1)
(0.1, 0.1)
S4
(1,1)
1
0.1+0.1=0.2
1
No change (t−y = 0)
(0.1, 0.1)
Result: After one pass over S1→S4, the updated weights are w1 = 0.1 and w2 = 0.1.
Sanity check
With w = (0.1, 0.1), yin for S2/S3/S4 is 0.1, 0.1, 0.2 respectively > 0 ⇒ y=1 (matches targets); for S1 yin=0 ⇒ y=0 (matches target). Hence the final weights classify all four samples correctly.