Challenges
Perceptron: one update step
Artificial Intelligence
Easy
Perceptron
Solves: 7
Perceptron: one update step
Author: CyberSamSU
Points
15
Perceptron — is the simplest artificial neuron. It multiplies inputs by weights and adds them, then outputs 0 or 1 through a step function:
z = w1*x1 + w2*x2 + b
y = 1 agar z >= 0, aks holda 0
If the prediction y differs from the true label t, the weights are updated according to the perceptron learning rule (with learning rate lr):
w_i <- w_i + lr*(t - y)*x_i
b <- b + lr*(t - y)
Find the values after one update step for the following sample:
| Parameter | Value |
|---|---|
x1, x2 | 0, 1 |
w1, w2 (boshlang'ich) | -2, 0 |
b (boshlang'ich) | -3 |
t (haqiqiy yorliq) | 1 |
lr (o'quv tezligi) | 1 |
First calculate z and y with the current weights, then apply the update formula. Write the answer in the format w1_yangi,w2_yangi,b_yangi, with commas, without spaces (for example 2,-1,0).
To submit a flag, log in.