Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2000
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2000

[Date Index] [Thread Index] [Author Index]

Search the Archive

FindMinimum of a compiled function??

  • To: mathgroup at smc.vnet.net
  • Subject: [mg23646] FindMinimum of a compiled function??
  • From: Wijnand Schepens <Wijnand.Schepens at rug.ac.be>
  • Date: Sun, 28 May 2000 23:08:59 -0400 (EDT)
  • Organization: University of Ghent, Belgium
  • Sender: owner-wri-mathgroup at wolfram.com

Hi everybody

I want to minimize a function of many variables a number of times,
starting from
different initial values each time.
There doesn't seem to be a way to pass a compiled function to
FindMinimum, because you have to give explicit names to the arguments. I
know that FindMinimum
tries to compile the function. The problem is that I repeat this
procedure a lot of times, and I don't want FindMinimum to do all the
compiling-work every time over and over.
Does FindMinimum remember the compiled version of a function for
subsequent minimization?
I would think it is more efficient to compile the function once
(possibly the derivatives too), and pass this compiled version to
FindMinimum... But I fear this is impossible...
No?

It's a shame that there isn't a version of FindMinimum which takes a
function working
on a list of real numbers (or a matrix, like in Compile).
This is a VERY common thing to do in global minimization (of continuous
functions), molecular modeling, and all sorts of simulations.
Mathematica's routines isn't fast enough to be competitive with
classical procedural languages.
Especially since so much attention has been paid to speed up Mathematica
vector-routines by packed-array technology, I find it strange that there
is no adapted FindMinimum.
Can onyone explain me why? Is something of the sort planned for future
versions?


In my ideal Mathematica-world there would be a function like Minimize:

fc=Compile[{x,_Real,1}, ...some function of the x[[i]]... ];

xlist=Table[Random[],10];

fc[xlist]
returns real number

Minimize[fc, xlist]
or
Minimize[ {x,_Real,1}, fc, xlist ]
or
variants including (compiled) gradient

Minimize would return {minvalue, xlist} where xlist contains the
coordinated at the minimum

Is this impossible??


Wijnand Schepens

p.s.  do Mathematica-developers pay attention to this mailing-list?
Maybe they only look at the titles and sigh...




  • Prev by Date: Re: Re:NestWhile
  • Next by Date: Re: init.m questions and message windows
  • Previous by thread: Re: Re:NestWhile
  • Next by thread: Re: FindMinimum of a compiled function??