- #1

squaremeplz

- 124

- 0

## Homework Statement

I am trying to train a neural network using the following training set:

(4,6)

(9,10)

(1,2)

(6,2)

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.

## Homework Equations

weight update rule:

w_new = w_old + (-learning rate) * (error) * (input)

## The Attempt at a Solution

So, let's say I randomly initialize the weights and get w1 = 3 and w0 = 4

For the first example,

(4,6)

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.

For example:

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!