1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: Neural Networks

  1. Feb 3, 2013 #1
    1. The problem statement, all variables and given/known data

    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.

    2. Relevant equations

    weight update rule:

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

    3. 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.

    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!
  2. jcsd
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook

Can you offer guidance or do you also need help?
Draft saved Draft deleted