Post Reply 
(42S) HP 42S/ DM42: Nelder Mead Optimization
05-02-2020, 12:38 PM
Post: #8
RE: HP 42S/ DM42: Nelder Mead Optimization
I hope you’re not bothered by my questions, your program is really interesting and I am investigating the N-M optimization, thanks to you.
I used it for the following formula for FU:
Code:

-3(x+3)^2+5x^3+1/2*(x-1)^4+1/2*y^2
See graphics:
   

Gives nice results when starting from (-3,0):
With original length set to .2 the simplex gets stuck in the wrong valley, and the result (-3.811,0) is a local minimum.
If original length is set to .5 then the steps are bigger enough for the simplex to « find » the right valley in (1.312,0).

Then I entered a small pitfall in FU:
Code:

-3(x+3)^2+5x^3+1/2*(x-1)^4+x*sqrt(x+5)+1/2*y^2
See graphics:
   

As you guess I had to insert a simple rule to avoid values of x below -5, giving 50 as a result (dummy management of out of function’s domain values).
With length of .2 or .5 starting in (-3,0) I get stuck in the wrong valley (-3.778,0).
Using length of 1 and starting from (-2,0) I find the right minimum. I will investigate more, but I think it is the good way to manage the domain in a tricky way.
Using length of 2 and starting from -3 I suppose the simplex gets stuck on the Z=50 wall, missing the exit...

Once again thanks for this interesting program.
Regards,
Thibault
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: HP 42S/ DM42: Nelder Mead Optimization - pinkman - 05-02-2020 12:38 PM



User(s) browsing this thread: 1 Guest(s)