PDA

View Full Version : JMSL BoundedLeastSquares with Jacobian



wwong
10-01-2007, 03:29 PM
Hello there.

I've been working on data fitting using the BoundedLeastSquares without providing a Jacobian, and it's been finding good solutions most of the time. It takes a while to find a solution though. To speed things up, I tried supplying the Jacobian. Unfortunately, now the solutions aren't as good because it frequently terminates early with a message to the effect of "com.imsl.math.BoundedLeastSquares: Scaled step tolerance satisfied; the current point may be an approximate local solution, or the algorithm is making very slow progress and is not near a solution, or "scaledStepTol" is too big.". The size of the problem is around 1000 functions (one function per data point) and a cap of around 300 variables. Are there things I can do with the tolerance settings or scale settings to improve the results? I would imagine that providing the Jacobian would come up with a solution as good as the one without the Jacobian, but faster.

Thanks.

Warren

Richard Hanson
10-02-2007, 08:21 AM
Supplying the Jacobian ought not to hurt performance or convergence. In fact this matrix is being computed and used but divided differences are taken for each column. When you provide only residual values to the routine, this is not obvious.

Be sure your Jacobian is correct. Compare each column with a central divided difference. There should be at least half-precision agreement, in norm, for each column. Try this first and then respond here, if necessary.

wwong
10-02-2007, 10:02 AM
Hi again.

Thanks. That helped track down my problem. It turned out I had an error in my Jacobian for one of the variables.