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