BookmarkSubscribeRSS Feed
madix
Obsidian | Level 7

Hello,

 

I am doing a quasi newton optimization method but I have a problem. The optimization stop before I find the global minimum.

 

I wonder if I could use a termination criterion of 1e-4 in order to stop the optimization after getting an objective function as small as I want and if it is possible, how to do it?

 

Here is my code

proc iml;

         

     use a;

     read all var _NUM_ into data;

     close a;

 

     * Chargement des fonctions ;

     reset storage = &lib..Functions;

     load module=(function1 function2);  

    

     parameters = j(5, 1, .) ;

     parameters[1] = 1.1 ;    

     parameters[2] = 5;       

    parameters[3] = 2;       

     parameters[4] = 1.5;

     parameters[5]= 0.9;      

 

     con = {-10 1E-6 -10 1E-6 1E-6, 10 10 10 10 1}

     opt = {1 4} ;       

    

    

     *Quasi-Newton Method ;

     call NLPQN(rc, parameters, "function1", theta, opt, con);

    

 

quit ;

 Moreover, this is the value of the objective function I get. You can see it is quite neer from each other at 10-4

test.PNG

Thank you for helping

1 REPLY 1
Ksharp
Super User

Post it at IML forum,since it is real IML code. and could try another initial value .

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 666 views
  • 0 likes
  • 2 in conversation