I am trying to train a neural network using the following training set:
So, if I enter input 4, it should give me 6. If I enter 9, output should be 10.
If I enter 3.5, it should approximate an output based on the training examples.
weight update rule:
w_new = w_old + (-learning rate) * (error) * (input)
The Attempt at a Solution
So, lets say I randomly initialize the weights and get w1 = 3 and w0 = 4
For the first example,
The input will be (4,1) because of the intercept.
4*3 + 4*1 = 16
The difference between the target value and the actual output is 10.
Now, I just need help with the weight update rule because I am not sure how to proceed.
Can I subtract 4 from the error because of the intercept to get error = 6
learning rate = -.1
w_new = 3 + (-.1)*(6)*(4)
w_new = .6
Then to test this I get:
4*.6 + 4*1 = 6.4
Any help greatly appreciated!