help-octave
[Top][All Lists]
Advanced

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

RE: call octave from C for nonlinear optimization


From: THOMAS Paul Richard
Subject: RE: call octave from C for nonlinear optimization
Date: Wed, 12 Nov 2003 11:08:34 +0100

Paul,

A significant part of my thesis work depended on MINUIT.  I thoroughly
recommend it.

In case Michael doesn't pick it up, he will find the documentation and
downloads at: http://c-minuit.sourceforge.net/ This version includes the
fortran source, together with an interface to C. It includes an example.  I
would be a bit cautious about saying that writing the objective function in
C would be too much of an overhead; it might be but it depends on how much
the objective function has to do.  Minuit does a fair amount of work as
well!


Paul Thomas

-----Message d'origine-----
De : address@hidden
[mailto:address@hidden
Envoyé : mardi 11 novembre 2003 02:52
À : Michael Creel; address@hidden
Objet : Re: call octave from C for nonlinear optimization


On 10 Nov 2003 at 15:58, Michael Creel wrote:

> Hello,
> I'm interested in using optimizers written in C (or fortran) to optimize 
> objective functions defined using Octave .m files. So far I can call the
.m 
> files, so this looks feasible. For example, the attached files (thanks P. 
> Kienzle and other posters for the basis for this) files allow me to use 
> Poisson.m to define the likelihood function value supposing a Poisson 
> density.  So, this looks pretty simple. My plan is to extend this to pass
the 
> obj. fun. value to an optimizer in C. 
> 
> Since the loops in the optimization program will be in C, and the
objective 
> function defined in Octave will contain no loops, I _suppose_ this will be

> faster than plain Octave.

I, too, suspect that the overhead of Octave will kill the 
performance of a minimizer written in C.  It would be nice 
to use Octave where it is particularly useful (playing with 
different algorithms) but still get the performance when
you need it by recoding the objective function in C.
You could certainly write your objective function in C
by having it take and return octave values, and your
minimizer would be none the wiser. The question is 
whether marshalling the parameters from the minimizer 
into octave values and out again is terribly expensive,
and if we would need to pass the underlying objective
function handle directly rather than going through the 
octave value interface.

> The motivation is that I believe I can find robust, fast, general purpose 
> optimizers written in C, so I'd like to use them.

Please do report on any such minimizers you find.  
E.g., I notice that MINUIT, the CERNLIB minimizer 
has been released under the GPL.

Paul Kienzle
address@hidden



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.536 / Virus Database: 331 - Release Date: 03/11/03
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.536 / Virus Database: 331 - Release Date: 03/11/03
 



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

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