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

Conjugate gradient minimizers do not work with some quadratic cost functions #8

Open
obromios opened this issue Jun 17, 2021 · 0 comments

Comments

@obromios
Copy link

obromios commented Jun 17, 2021

I am having difficulty getting the Minimization::PolakRibiere and Minimization::FletcherReeves minimizers work with a simple cost function of the form
proc{ |x| (x[0] - @p[0])**2 / s0**2 + (x[1] - @p[1])**2 / s1**2 + (x[2] - @p[2])**2 / s2**2 }
If s1=s2=s3 this works, but does not work for example if s0=1, s1=2, s2=1. I attach below an augmentation of the repository's minimization_conjugate_gradient_polak_ribiere_spec.rb file that demonstrate the problem (the tests at lines 60 and 66). The test uses the PolakRibiere, but the same problem occurs with FletcherReeves.
so_issue_spec.rb.zip

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

1 participant