Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chapter 4 - How is weight_delta computed ? #49

Open
ghost opened this issue Aug 17, 2020 · 6 comments
Open

Chapter 4 - How is weight_delta computed ? #49

ghost opened this issue Aug 17, 2020 · 6 comments

Comments

@ghost
Copy link

ghost commented Aug 17, 2020

Hello,

I have finished the Chapter 4. But I have a question regarding weight_delta. It has a value of delta * input.
In the book it says that weight_delta is the derivative of the error, right ?
On page 60 for example, the error is error = ((0.5*weight ) - 0.8) ** 2

When I give this error function to Wolfram Alpha, it gives me the derivative of 0.5 * x - 0.8 (where x = weight).
So, in general, the derivative of error should be input * weight - goal_pred.

So, why they use delta * input for weight_delta if weight_delta is the derivative ???

@ghost ghost changed the title Chapter Chapter 4 - How is weight_delta computed ? Aug 17, 2020
@batman47steam
Copy link

I think the derivative is 2 * ((0.5weight) - 0.8) * 0.5, that is 2 * 0.5 * ((0.5weight) - 0.8) , so the result is 0.5*x - 0.8

@batman47steam
Copy link

the general forum for this : 2 * ((input*weight) - goal_pred) * input.
in nerualnetwork people may dont care about the exactly coefficient of derivative, so just omit 2 and leave the key part of the derivative

@jpstrube
Copy link

Hmm, if error = (input * weight - goal_pred) ** 2
should derivative not be 2 * (input * weight - goal_pred)?
Since in this example input = 2, it's the same but I'm also confused...

@batman47steam
Copy link

batman47steam commented Nov 7, 2020

Hmm, if error = (input * weight - goal_pred) ** 2
should derivative not be 2 * (input * weight - goal_pred)?
Since in this example input = 2, it's the same but I'm also confused...

the derivative should be 2 * weight * (input * weight-goal_pred),that's the chain rule, you also should do derivative to input * weight
image

@1vash
Copy link

1vash commented Oct 23, 2021

As far as I'm concerned, weights_delta in 4th Chapter are calculated via delta rule

Just to clarify:
The Delta rule is an update rule for single layer NN. It makes use of Gradient Descent.
Backpropagation is an update rule for multi layer NN based on Gradient Descent.

@chirapok
Copy link

But if we are using direction_and_amount = (pred - goal_pred) * input * 2 (e.g., not omitting the two), the model converges much faster?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants