public inbox for gsl-discuss@sourceware.org
 help / color / mirror / Atom feed
* Nonlinear Least Squares Fitting
  2001-12-19 13:20 Nonlinear Least Squares Fitting Andreas Gros
@ 2001-11-16 10:53 ` Andreas Gros
  2001-12-19 13:20 ` Brian Gough
  1 sibling, 0 replies; 4+ messages in thread
From: Andreas Gros @ 2001-11-16 10:53 UTC (permalink / raw)
  To: gsl-discuss

Hello,

I'd like to submit a "bug" in the solver:
gsl_multifit_fdfsolver_lmsder.

In the section "Providing the function to be minimized" where the
function gsl_multifit_function_fdf is described, you mention the
function f that should store the distance between the values
calculated by the algorithm and the provided values. 
As I tested the algorithm I've found, that this distance is not taken
as a "square", instead the algebraic sign of the distance seems to be
of some importance. My results were quite different, whenever I took
(y[i]-Yi) instead of (Yi-y[i]) (as it is shown in the example).

Taking the latter the solver works fine, taking the first distance the
results have been quite funny.

Andreas Gros 


Andreas Gros, Tel.: 0179-1062416
Lotter Str. 99, 49078 Osnabrück
Amalienstr. 8, 97072 Würzburg
http://www.gros-webdesign.de

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Nonlinear Least Squares Fitting
  2001-12-19 13:20 ` Brian Gough
@ 2001-11-16 14:39   ` Brian Gough
  0 siblings, 0 replies; 4+ messages in thread
From: Brian Gough @ 2001-11-16 14:39 UTC (permalink / raw)
  To: Andreas Gros; +Cc: gsl-discuss

Andreas Gros writes:
 >  In the section "Providing the function to be minimized" where the
 > function gsl_multifit_function_fdf is described, you mention the
 > function f that should store the distance between the values
 > calculated by the algorithm and the provided values.  As I tested
 > the algorithm I've found, that this distance is not taken as a
 > "square", instead the algebraic sign of the distance seems to be of
 > some importance. My results were quite different, whenever I took
 > (y[i]-Yi) instead of (Yi-y[i]) (as it is shown in the example).
 >  Taking the latter the solver works fine, taking the first distance
 > the results have been quite funny.

Hi,
The sign of the jacobian needs to match the sign of the function.
If you change one you need to change the other.
I think this will fix your problem.
regards
Brian

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Nonlinear Least Squares Fitting
  2001-12-19 13:20 Nonlinear Least Squares Fitting Andreas Gros
  2001-11-16 10:53 ` Andreas Gros
@ 2001-12-19 13:20 ` Brian Gough
  2001-11-16 14:39   ` Brian Gough
  1 sibling, 1 reply; 4+ messages in thread
From: Brian Gough @ 2001-12-19 13:20 UTC (permalink / raw)
  To: Andreas Gros; +Cc: gsl-discuss

Andreas Gros writes:
 >  In the section "Providing the function to be minimized" where the
 > function gsl_multifit_function_fdf is described, you mention the
 > function f that should store the distance between the values
 > calculated by the algorithm and the provided values.  As I tested
 > the algorithm I've found, that this distance is not taken as a
 > "square", instead the algebraic sign of the distance seems to be of
 > some importance. My results were quite different, whenever I took
 > (y[i]-Yi) instead of (Yi-y[i]) (as it is shown in the example).
 >  Taking the latter the solver works fine, taking the first distance
 > the results have been quite funny.

Hi,
The sign of the jacobian needs to match the sign of the function.
If you change one you need to change the other.
I think this will fix your problem.
regards
Brian

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Nonlinear Least Squares Fitting
@ 2001-12-19 13:20 Andreas Gros
  2001-11-16 10:53 ` Andreas Gros
  2001-12-19 13:20 ` Brian Gough
  0 siblings, 2 replies; 4+ messages in thread
From: Andreas Gros @ 2001-12-19 13:20 UTC (permalink / raw)
  To: gsl-discuss

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 851 bytes --]

Hello,

I'd like to submit a "bug" in the solver:
gsl_multifit_fdfsolver_lmsder.

In the section "Providing the function to be minimized" where the
function gsl_multifit_function_fdf is described, you mention the
function f that should store the distance between the values
calculated by the algorithm and the provided values. 
As I tested the algorithm I've found, that this distance is not taken
as a "square", instead the algebraic sign of the distance seems to be
of some importance. My results were quite different, whenever I took
(y[i]-Yi) instead of (Yi-y[i]) (as it is shown in the example).

Taking the latter the solver works fine, taking the first distance the
results have been quite funny.

Andreas Gros 


Andreas Gros, Tel.: 0179-1062416
Lotter Str. 99, 49078 Osnabrück
Amalienstr. 8, 97072 Würzburg
http://www.gros-webdesign.de

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2001-12-19 13:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-12-19 13:20 Nonlinear Least Squares Fitting Andreas Gros
2001-11-16 10:53 ` Andreas Gros
2001-12-19 13:20 ` Brian Gough
2001-11-16 14:39   ` Brian Gough

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).