This is the mail archive of the
gsl-discuss@sources.redhat.com
mailing list for the GSL project.
Re: gsl_multifit
- To: Kai Trukenmueller <trukenm at ag2 dot mechanik dot tu-darmstadt dot de>
- Subject: Re: gsl_multifit
- From: Brian Gough <bjg at network-theory dot co dot uk>
- Date: Tue, 16 Oct 2001 22:40:55 +0100 (BST)
- Cc: gsl-discuss at sources dot redhat dot com
- References: <20011016225100.A6728@abb121.ram1st.wh.tu-darmstadt.de>
Kai Trukenmueller writes:
> The problem A*x=b with A not square leeds to x = (A^T *A)^-1 A^T *b
> at least analytically. That should be equivalent to a
> multidimensional fitting, as in `gsl_multifit_linear'. I
> implemented an example and it works good.
> Than I compared it to a simple octave (a free matlab clone)
> routine, using x=A\b;
> The results are the same (as it should be), but it surprised me a
> lot, that the octave-script works _much_ faster for high dimensions
> than the compiled C programm. It seems, that these algorithems are
> better.
> Is that a known problem, or did I use the wrong routines. Is
> there any better way for solving A x = b?
That sounds like the correct routine. Can you send your program and
benchmarks. I have not compared the two myself. I would expect
Octave to be faster because it uses LAPACK -- the question is how
much. I have not done any optimization in GSL yet, so there is room
to improve things. If you are interested in profiling the code you
can compile GSL for use with gprof, as described in the GCC manual.
regards
Brian Gough