help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Question about fmins!


From: Michael Creel
Subject: Re: Question about fmins!
Date: Tue, 12 Jun 2007 09:54:08 +0200
User-agent: Thunderbird 1.5.0.12 (X11/20070604)

I ran across some Python bindings to the Fortran lbfgsb code by Nocedal and co-authors (http://www.ece.northwestern.edu/~nocedal/lbfgsb.html), at http://setiathome.ssl.berkeley.edu/~aparsons/python/aipy.lbfgsb.html

As far as I know, lbfgsb is about the state-of-the-art for minimization of differentiable functions of high-dimensional parameters, subject to bounds. Maybe someone who has experience with Octave/Fortran would like to try to make some bindings?

Otherwise, samin in octave-forge does bounds, without using derivatives. It's a stochastic method. In spite of that, it is pretty quick for many problems. Etienne's suggestion is probably the first thing to try, though.
M.

address@hidden wrote:
  Hello,

On Mon, June 11, 2007 01:33, rambovn wrote:
#
# Hi,
# I am newbie in octave so I have many questions :)
# Now I am want to find the minimum of a function of several variables. # I am 
trying with fmins but the results are not like I expected :,( # I
want to limit the result for example: My function have x , y as variables, # 
and I want that x value is in the range from 0 to 1, and y is positive.
How # can I do that with fmins? Or is there any other function in octave that 
can # do it for me?

I don't know that Octave has a constrained multi-variable function (does anyone 
know otherwise?), but you can transform your function, say 'f',
defined on [0,1] x [0,+infty] so it's domain is [-infty,+infty] x 
[-infty,+infty].

function z = g (xy)
  z = f (1/2 + tanh (x(1))/2, exp (x(2));
end

That's a well-known trick, see an optimization textbook. Then, with a little 
luck (your mileage may vary, as with all local minimization methods)

  xy_0 = fmins (g, xy_init)

should give you x_min = 1/2 + tanh (xy_0(1))/2 and y_min = exp (xy_0(2)).

  Hth,

  Etienne

# Thank you very much for any help.
# Regards
# Anh
# --
# View this message in context: 
http://www.nabble.com/Question-about-fmins%21-tf3900212.html#a11056777 # Sent 
from the Octave - General mailing list
archive at Nabble.com. #
# _______________________________________________
# Help-octave mailing list
# address@hidden
# https://www.cae.wisc.edu/mailman/listinfo/help-octave
#




reply via email to

[Prev in Thread] Current Thread [Next in Thread]