[Scilab-users] Error in Nelder-Mead functions

Mike Page Mike at Page-One.Waitrose.com
Wed Mar 13 16:05:33 CET 2013


I have just checked on Scilab 5.3.2 and found this works on that version, so
it looks like a bug.

Mike.


-----Original Message-----
From: users-bounces at lists.scilab.org
[mailto:users-bounces at lists.scilab.org]On Behalf Of Mike Page
Sent: 13 March 2013 13:52
To: users at lists.scilab.org
Subject: [Scilab-users] Error in Nelder-Mead functions


Hi,

I am trying to use the Nelder Mead optimisation functions to fit a
biological model to some experimental data.  I am using Scilab 5.4.0 on Win
XP.

The search halts with the error:

 !--error 21
Invalid index.
at line      78 of function neldermead_updatesimp called by :
at line      26 of function neldermead_autorestart called by :
at line      22 of function neldermead_search called by :
at line      37 of function CpeFit called by :
at line      13 of function TestFit called by :
TestFit

This line in neldermead_updatesimp seems to be "str = string ( simplex0 )".

If I turn on verbose mode, the problem happens here:

<snip>
Function Evaluation #42, index=2, x= [134014.18 0.0001 0.7648109 134014.18
0.0000012 0.7648109 134014.18 0.0000506 0.7648109 97.463]
Function Evaluation #43, index=2, x= [134014.18 0.0001 0.7648109 134014.18
0.0000012 0.7648109 134014.18 0.0000012 0.7648603 97.463]
Function Evaluation #44, index=2, x= [134014.18 0.0001 0.7648109 134014.18
0.0000012 0.7648109 134014.18 0.0000012 0.7648109 97.462951]
Before scaling:
Optim Simplex Object:
=====================
nbve: 11
n: 10
x: 11-by-10 matrix
fv: 11-by-1 matrix
 !--error 21
<snip>

The Nelder Mead setup is as follows:

    nm = neldermead_new ();
    nm = neldermead_configure (nm, "-method", "box");
//    nm = neldermead_configure (nm, "-verbose", 1);
    nm = neldermead_configure (nm, "-numberofvariables", 10);
    nm = neldermead_configure (nm, "-maxfunevals", 1000);
    nm = neldermead_configure (nm, "-maxiter", 1000);
    nm = neldermead_configure (nm, "-restartflag", %t);
    nm = neldermead_configure (nm, "-boxtermination", %t);
    nm = neldermead_configure (nm, "-function", CpeLossFunc);
    nm = neldermead_configure (nm, "-boundsmin", ...
        [1.0E3; 1.0E-9; 0.1; 1.0E3; 1.0E-9; 0.1; 1.0E3; 1.0E-9; 0.1; 10.0]);
    nm = neldermead_configure (nm, "-boundsmax", ...
        [10.0E6; 100.0E-6; 0.9; 10.0E6; 100.0E-6; 0.9; 10.0E6; 100.0E-6;
0.9; 10.0E3]);
    nm = neldermead_configure (nm, "-x0", Values);
    nm = neldermead_search (nm);
    Values = neldermead_get (nm, "-xopt");
    disp (neldermead_get (nm, "-status"));
    nm = neldermead_destroy (nm);

Anyone have any ideas what is wrong?

Cheers,
Mike.

_______________________________________________
users mailing list
users at lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


-----
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2013.0.2904 / Virus Database: 2641/6168 - Release Date: 03/12/13




More information about the users mailing list