Problem with method residualNorm() in the class NonLinearLeastSquare

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Problem with method residualNorm() in the class NonLinearLeastSquare

Silakhdar Krikeb
Hi!
 
Lately I did some optimization work and wrote code using class NonLinearLeastSquare. I discovered that the method residualNorm()  does not return the proper expected result with the optimization method LevenbergMarquardt. After some investigation, I think I solved the problem by adding the following line:
 
P.setFunctionValue(P.costFunction().value(x_));  
 
to the metod LevenbergMarquardt::minimize(Problem&,const EndCriteria&) (levenbergmarquardt.cpp, Ln 95 just after P.setCurrentValue(x_))
 
I also checked the simplex optimization method and I think it does not suffer of this problem.
 
Is there anybody in this forum who can investigate the solution and do the corrections if necessary.
 
My best regards
SK
 
 

 

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev
Reply | Threaded
Open this post in threaded view
|

Re: Problem with method residualNorm() in the class NonLinearLeastSquare

Luigi Ballabio
Klaus,
        I guess you're the expert here. May you have a look at it?

Thanks,
        Luigi

On Thu, 2009-01-29 at 10:43 +0100, Silakhdar Krikeb wrote:

> Lately I did some optimization work and wrote code using class
> NonLinearLeastSquare. I discovered that the method residualNorm()
> does not return the proper expected result with the
> optimization method LevenbergMarquardt. After some investigation, I
> think I solved the problem by adding the following line:
>  
> P.setFunctionValue(P.costFunction().value(x_));  
>  
> to the metod LevenbergMarquardt::minimize(Problem&,const
> EndCriteria&) (levenbergmarquardt.cpp, Ln 95 just after
> P.setCurrentValue(x_))


--

I hate quotations.
-- Ralph Waldo Emerson



------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev