Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Constraints to parameters in FindFit?

488 views
Skip to first unread message

Jill Foley

unread,
Oct 8, 2004, 3:04:07 AM10/8/04
to

Hi All,

I am using FindFit to fit a series of peaks to some data. I would like
to be able to constrain some of the parameters of my fit to correspond
to physical reality. For example, some peaks should have a negative
amplitude, others positive, where the amplitudes are the parameters
that Mathematica is finding in FindFit. The peaks are all very near
each other, so without any constraint, it is making the wrong ones
negative. I'd like to specify that a given parameter should always be
negative. I am already giving an initial guess of the proper sign, but
it doesn't fix the problem.

Please advise - Thanks!

Jill.

Janos D. Pinter

unread,
Oct 9, 2004, 4:25:46 AM10/9/04
to

Jill Foley, PhD
Princeton Plasma Physics Lab
tel. (609) 243-0000
fax (609) 243- 0000
E-mail: <efo...@princeton.edu>


Jill,

You should use NMinimize, or one of the third party optimization packages,
instead of FindFit (an unconstrained local optimizer). In the fcts and
packages referred to, you can specify constraints on the dec vars.

I am the principal developer of MathOptimizer and MathOptimizer
Professional: you can see those at WR's site, also directly available from
my company. For theoretical background, please see my book 'Global
Optimization in Action' as well as my more recent papers.

Best regards,
Janos
_________________________________________________

Janos D. Pinter, PhD, DSc
President & Research Scientist, PCS Inc.
Adjunct Professor, Dalhousie University

129 Glenforest Drive, Halifax, NS, Canada B3M 1J2
Telephone: +1-(902)-443-5910
Fax: +1-(902)-431-5100; +1-(902)-443-5910
E-mail: jdpi...@hfx.eastlink.ca
Web: www.pinterconsulting.com www.dal.ca/~jdpinter
Software products: http://www.pinterconsulting.com/Software_Sum_Info.pdf

Peter Valko

unread,
Oct 9, 2004, 4:30:50 AM10/9/04
to
For sign restiction an old trick is to use instead of paramold the
expression Exp[paramnew] or -Exp[paramnew] in your model, and search
for paramnew (instead of paramold).

P.


Jill Foley <efo...@princeton.edu> wrote in message news:<ck5e57$oio$1...@smc.vnet.net>...

Maxim A. Dubinnyi

unread,
Oct 10, 2004, 2:01:16 AM10/10/04
to
Hi,

If "Par" is always positive, write it as Par->Exp[TmpPar]
and seek for "TmpPar" instead of Par. Use Par->-Exp[TmpPar]
for negative parameters.

:)

Sincerelly,

Maxim A. Dubinnyi

Janos D. Pinter

unread,
Oct 10, 2004, 2:02:16 AM10/10/04
to

Jill et al.,

In general, you do need global optimization to solve constrained model
calibration problems.

In the monograph
http://www.springeronline.com/sgw/cda/frontpage/0,0,4-0-22-33656158-0,0.html?referer=www.springeronline.com/isbn/0-7923-3757-3
I discuss several related case studies. The short tutorial book
http://www.lionhrtpub.com/books/globaloptimization.html includes a demo
example that is [sounds] very similar to Jill's model. Please also see
e.g., Globally optimized calibration of nonlinear models: techniques,
software, and applications. Optimization Methods and Software 18 (2003) (3)
335-355.

Regards,
Janos Pinter

At 05:18 AM 10/9/2004, Peter Valko wrote:
>For sign restiction an old trick is to use instead of paramold the
>expression Exp[paramnew] or -Exp[paramnew] in your model, and search
>for paramnew (instead of paramold).
>
>P.
>
>
>Jill Foley <efo...@princeton.edu> wrote in message
>news:<ck5e57$oio$1...@smc.vnet.net>...

0 new messages