Neural Networks

  • #1
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, lets 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!
 

Answers and Replies

Related Threads on Neural Networks

Replies
0
Views
818
  • Last Post
Replies
0
Views
702
  • Last Post
Replies
1
Views
4K
  • Last Post
Replies
5
Views
2K
Replies
2
Views
366
  • Last Post
Replies
7
Views
2K
  • Last Post
Replies
9
Views
1K
Replies
2
Views
1K
Replies
2
Views
2K
Replies
4
Views
2K
Top