algorithmsbooks / optimization

Errata for Algorithms for Optimization book
68 stars 16 forks source link

dot and ⋅ in Conjugate Gradient Descent algorithm implementation #91

Closed coopshea closed 1 year ago

coopshea commented 1 year ago

Hi, I could be totally off here, but I think the following line in step! for conjugate gradient descent could be a little inconsistent:

β = max(0, dot(g′, g′-g)/(g⋅g))

There is both the dot() and the ⋅ in the same line, which threw me off a little bit. Are these the same?

tawheeler commented 1 year ago

Hello Coopshea,

That is correct, they are the same. We use ⋅ throughout the book for its conciseness, but in this case I felt g′⋅(g′-g) was hard to read. I'll check with Mykel and we'll see if we want to switch.

mykelk commented 1 year ago

Hmm... I'm good with that switch!

coopshea commented 1 year ago

Cool!

Love the book by the way.

Coop

Regards, Cooper


From: Mykel Kochenderfer @.> Sent: Monday, April 24, 2023 8:29:35 AM To: algorithmsbooks/optimization @.> Cc: Cooper Owen Shea @.>; Author @.> Subject: Re: [algorithmsbooks/optimization] dot and ⋅ in Conjugate Gradient Descent algorithm implementation (Issue #91)

Hmm... I'm good with that switch!

— Reply to this email directly, view it on GitHubhttps://github.com/algorithmsbooks/optimization/issues/91#issuecomment-1520393833, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AQ75VORE46ESHYHAEZUWE63XC2L57ANCNFSM6AAAAAAXJWDLKA. You are receiving this because you authored the thread.Message ID: @.***>

tawheeler commented 1 year ago

Done! Thanks Cooper.