This is the mail archive of the gsl-discuss@sources.redhat.com mailing list for the GSL project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
>>>>> "Brian" == Brian Gough <bjg@network-theory.co.uk> writes: Brian> Are you doing least-squares fitting of the residuals Brian> between the two curves? If so the nonlinear 'multifit' Brian> functions should handle that better. Yes, actually I've tried that approach as well hoping to use the covariance matrix as a crude sensitivity metric. I get slightly different answers compared to the multimin solution (at the 2% level, which is larger than I expect, but I don't have a good quantitative basis for that expectation yet). Additionally, the covariance matrix makes no sense to me at all. The minimum is in the vicinity of r=17.19, beta=2 and I get r=17.19+/-1909, beta=2+/-0.001. >> Is there some magic to picking a good value for STEP? >> Shouldn't GSL return an error rather than setting all my >> parameters to NaN? Brian> Yes, it should return an error not NaN. There must be an Brian> unchecked division by zero that we need to catch in there Brian> somewhere. Can send your program to the list. Attached is both the multimin program. Getting NaN is easy; just pick a starting point away from the minimum. For example, these two runs: 281 roland> make -k && ./barndoor -v -b 10 -c 5 -r 17 -E 600 --dt 60 -u 0 -w 0 gcc -DHAVE_CONFIG_H -I. -I. -I. -DDEBUG -g -O2 -c barndoor.c gcc -g -O2 -o barndoor barndoor.o -lgsl -lgslcblas -lm iter: 0 x = 17.00000000 2.00000000 f(x) = 38436.8 RMS = 59.1122 |g(x)| = 1512.46 g(x) = -350.614 -1471.26 iter: 1 x = 17.01159087 2.04863797 f(x) = 1821.51 RMS = 12.8682 |g(x)| = 68.4458 g(x) = -16.5877 -66.4053 Minimum found at: iter: 2 x = 17.01491189 2.06257370 f(x) = 7.53164e-08 RMS = 8.27463e-05 |g(x)| = 1.66044e-09 g(x) = -4.07916e-10 -1.60956e-09 282 roland> make -k && ./barndoor -v -b 10 -c 5 -r 20 -E 600 --dt 60 -u 0 -w 0 iter: 0 x = 20.00000000 2.00000000 f(x) = 6.16155e+06 RMS = 748.425 |g(x)| = 204526 g(x) = -40530.4 -200470 iter: 1 x = nan nan f(x) = nan RMS = nan |g(x)| = nan g(x) = nan nan roland -- PGP Key ID: 66 BC 3B CD Roland B. Roberts, PhD RL Enterprises roland@rlenter.com 76-15 113th Street, Apt 3B roland@astrofoto.org Forest Hills, NY 11375
Attachment:
barndoor.c
Description: Double-arm Barndoor Tracker Optimization Code
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |