Re: using downhill simplex routine from 'numerical recipes'
- From: spellucci@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx (Peter Spellucci)
- Date: Mon, 4 Apr 2005 10:46:29 +0000 (UTC)
In article <7540103.1112397570864.JavaMail.jakarta@xxxxxxxxxxxxxxxxxxxxxx>,
jj <jungmin113@xxxxxxxxx> writes:
>i am getting some where positively ....
>
>here is my one problem.
>
>i want my first variable away from 0.0.
>(as i said it is in the range of 0.5-1.5 and sometimes it goes to 1.0-05 or something like that.)
>
>is there a quick fix?
>
>like i put y(1) = 10d14 when p(1) < 0.001 ?
>
>if so where is the right place to put it without disturbing whole procedure?
no. the downhill simplex as you name it does not allow any bounds on the
variables. in order to prevent it and stay positive is to add a term
-log(abs(p(i)+"some very small positive value") - min{p(i),0}*"some very large
positve value"
(this in order to get the log well defined for whatever the method might do with
p(i)) where p(i) is the relevant parameter
this makes the objective function large for all values near zero or negative and
should prevent the simplex to move in the wr9ong direction.
the problem is that you cannot control the movement of the simplex, there is no
test of well definedness of the objective function in it etc.
hth
peter
.
- References:
- Prev by Date: Re: Neumann BC implementation on 2d rectangular grid
- Next by Date: Re: Neumann BC implementation on 2d rectangular grid
- Previous by thread: Re: using downhill simplex routine from 'numerical recipes'
- Next by thread: Directional derivative using finite differences
- Index(es):