help-octave
[Top][All Lists]
Advanced

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

Re: Optimizing unknown function with incomplete set of variables.


From: Olaf Till
Subject: Re: Optimizing unknown function with incomplete set of variables.
Date: Thu, 22 Dec 2016 10:05:13 +0100
User-agent: Mutt/1.5.23 (2014-03-12)

On Wed, Dec 21, 2016 at 09:00:31PM -0800, hale812 wrote:
> I am building a set of filters combined in a circuit with no explicit
> relation for cut-off frequencies.
> 
> Instead, I am building a cost function F with a set of parameters F(var1,
> var2, freq1, freq2,....)
> Basically, the cost F is a sum of all partial costs univariate of partial
> filters by the *absolute* value. F=∑(|Fi|). So I expect the problem converge
> with F=0|Fi=0.
> 
> freq1, freq2 and everything coming after them are CONSTANTS passed by a
> problem generator.
> 
> var1, var1 are to be found.
> It is possible to guess initial values of var1 and var2 basing on partial
> analysis of F components.
> 
> I am stuck with Octave standard tool set. Seems like most tools treat
> strictly canonical polynomial problems, simple first-order sum of scalars.
> There is minimization tool that treat F(x) with x as all-variables vector.
> 
> And I did not find a way to optimize/minimize/ my problem with both
> variables and constants passed to F.
> 
> Can you please help me with a way to solve this?

For an example for passing constants to F, see section 11.11.2 of
Octave documentation, e.g by typing 'doc ("Anonymous Functions")' from
the Octave prompt and navigating to "Anonymous Functions".

If all Fi can assume the value of zero, you could replace F with a
function which returns a vector of all Fi (not their absolute value)
and use the zero finder 'fsolve'.

For the case a zero finder is not applicable:

It is often problematic to optimize absolute values, because of the
discontinuities they introduce. Consider taking the square
instead. Then you can use 'sqp' in core Octave or 'nonlin_min' in
optim, but it is probably better to let F return a vector of the
squares and use 'nonlin_residmin' in optim.

Depending on your problem there may be further possibilities, too.

Olaf

-- 
public key id EAFE0591, e.g. on x-hkp://pool.sks-keyservers.net

Attachment: signature.asc
Description: Digital signature


reply via email to

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