New to me but I've just had a look,  in J602.

As you said,  there seem to be a number of issues:
1)  your provided function needs to return a scalar result.
   (+/@*:) 2 3
4 9
   (+/@:*:) 2 3
13
So ssq should be +/@:*:

2) The locale for deoptim starts as pdeoptim
One way round appears to be to do
    deoptim 'ssq_base_';_3 3
======================
Generation: 1
Best Value: 0.5667
Best Var set:
_0.2958 _0.6922
======================
Generation: 50
Best Value: 0.0000
Best Var set:
0.0000 0.0000
======================
Generation: 100
Best Value: 0.0000
Best Var set:
0.0000 0.0000
+------------------------+-----------+----
|1.06998e_15 _3.06813e_15|1.05583e_29|2020|
|                        |           |    |
.......

Perhaps that's enough to get you going.

As for lbfgs,  it's in my addons\math folder
under J602.  but not under J701.  Perhaps the
addons gurus can tell you why.

Mike

On 07/09/2012 5:35 AM, Piet de Jong wrote:
I 'm trying to use the   "deoptim" math addon package.

However can't figure it out.    Tried the following trite example to
understand how things work.


    NB.   Minimize the sum of squares within the range _3 to 3

    require 'math/deoptim'

    ssq=:+/@*:
    deoptim 'ssq';_3 3

This fails for  a variety of reasons which I cannot seem to grasp/fix up.

Can anyone help?  Once I can figure out a simple example like this I
think I will be able to
implement it on non trite examples.

Also what has happened to the LBFGS minimization routine?
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm


----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to