quasi-newton


sham_IIT
03-25-2007, 03:22 AM
I'm facing problem in using Quasi-Newton method. I'm using the code (from numerical recipes in C++) of 'dfpmin' which calls 'lnsrch'. The function is a simple two variable function: Min F = 100(x2 - x1^2)^2 + (1-x1)^2. The starting point is X{-1, 1} with F = 4. The optimized answer should be X{0.99, 0.99} with F = 0. But I'm getting X{ - 0.99, 0.989} with F = 3.98. In 1st iteration 'lnsrch' is returning from the condition f <= fold + ALF*alam*slope and in 2nd iteration 'lnsrch' is returning from alam < alamin and 'dfpmin' from test < TOLX. After this it is not proceeding further. Can anybody please help me out as in where i'm doing wrong? Please its urgent. If anybody worked on quasi-newton please help.
Thank you :) .

sham_IIT
03-27-2007, 06:09 AM
the problem has been solved

thank you

wei_2007
04-12-2007, 04:14 PM
Dear Sham,

I am facing the similar problem with quasi newton. It is quite urgent. I am glad to learn that you found a way to fix this problem. I would highly appreciate if you share some ideas about the fix. Thanks.

sham_IIT
05-11-2007, 03:36 AM
Actually earlier i did some mistake in void dfunc().....but after editing them i got the answer {1,1}........the program perfectly runs fine.....using dfpmin which calls lnsrch...given in the nr book........i hope you are not making any kind of small mistakes in DP func() or void dfunc().......otherwise dfpmin and lnsrch codes are perfectly fine.......

sham_IIT
05-11-2007, 03:54 AM
In the Quasi-Newton method dfpmin minimize the function....suppose there is a function to be maximized......where the changes should be done in dfpmin and lnsrch???.........i tried only by multiplying the max function by negative to make it min function.....but its not giving me proper answer.......can anybody please help....
thank you

varung
08-02-2007, 02:16 PM
if you multiply the function value by -1, you must also multiply the derivative.

sham_IIT
08-03-2007, 09:41 AM
thanks...

actually i multiplied the function with -1 and then found the derivative.....that means already derivative has been multiplied....still not getting the values......