Skip to Main Content Skip to Search
Login
File Exchange
MATLAB Newsgroup
Link Exchange
  Blogs  
 Contest 
MathWorks.com

Thread Subject: start point for the function "lsqnonlin"

Subject: start point for the function "lsqnonlin"

From: ophelia

Date: 01 Mar, 2008 11:24:02

Message: 1 of 7

Hi everyone,

I use "Lsqnonlin" to solve my optimazation problem, but the
result is so sensitive to the start point x0, that a little
difference of start point eg. 0.8111 und 0.8112 will lead to
a very different result.

Maybe I can use "lsqnonlin" once more to find the
appropriate start point, or I can set x0=0.8:0.00001:1. but
I think it's probably not a good solution.does anybody know,
how I can find the best start point quickly?

TAHNK YOU SO MUCH!!!!

Ophelia

Subject: Re: start point for the function

From: John D'Errico

Date: 01 Mar, 2008 12:13:02

Message: 2 of 7

"ophelia " <joozooo@hotmail.com> wrote in message
<fqbeci$dem$1@fred.mathworks.com>...
> Hi everyone,
>
> I use "Lsqnonlin" to solve my optimazation problem, but the
> result is so sensitive to the start point x0, that a little
> difference of start point eg. 0.8111 und 0.8112 will lead to
> a very different result.
>
> Maybe I can use "lsqnonlin" once more to find the
> appropriate start point, or I can set x0=0.8:0.00001:1. but
> I think it's probably not a good solution.does anybody know,
> how I can find the best start point quickly?


Gosh, don'tcha think that if there were an
easy way that would always work to quickly
find the best starting value, somebody would
have written it into these codes by now? In
fact, there is a very simple solution, but we
have just kept it completely hidden from all
the novice optimizers. We won't tell you what
it is, just to make you sweat a little. (Keep this
secret!) Yeah, right.

% gcp = get current post
Set(gcp,'Sarcasm','off')

Most of the time when some one complains
about the sensitivity of an optimizer to their
starting values, it is because they have
formulated a very nasty, ill-posed problem.
In fact, no matter what algorithm you choose,
it will always be possible for someone to
formulate a problem that will be tough to
solve, and sadly, someone will always want
desperately to solve it.

I can't know why it is that your particular
problem is so sensitive to its starting values.
Perhaps you have something discrete inside
your function. This will blow any optimizer
out of the water, at least any optimizer that
presumes an objective that is continuous
and differentiable.

I talk about the idea of a "basin of attraction"
in my optimization tips and tricks document.
You might find the topic interesting. A basin
of attraction is the set of all points that when
used as starting values for a given optimizer,
on a given objective function, the optimizer
will converge to a given local optimum. Many
problems have multiple local optima, so they
have multiple basins of attraction. Unfortunately,
a basin of attraction may have a strange shape.
It need not even be a connected set.

http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?
objectId=8553&objectType=FILE

HTH,
John

Subject: Re: start point for the function

From: John D'Errico

Date: 01 Mar, 2008 12:25:03

Message: 3 of 7

"John D'Errico" <woodchips@rochester.rr.com> wrote in message
> In fact, there is a very simple solution, but we
> have just kept it completely hidden from all
> the novice optimizers. We won't tell you what
> it is, just to make you sweat a little. (Keep this
> secret!) Yeah, right.

Drat! I let it out. SFOOP (the Secret Fraternity Of
Optimization Professionals) will be soooo mad
at me. They make you swear, with your hand
on a copy of Numerical Recipes, NEVER to tell
that secret. And now I've let it out. I'm in big
trouble now. Maybe they won't notice.

John

Subject: Re: start point for the function

From: D. Ismay

Date: 01 Mar, 2008 14:20:56

Message: 4 of 7

John D'Errico wrote:
[...]
> Drat! I let it out.

...in One Fell SFOOP, no less.

Subject: Re: start point for the function

From: Steven Lord

Date: 01 Mar, 2008 16:02:09

Message: 5 of 7


"John D'Errico" <woodchips@rochester.rr.com> wrote in message
news:fqbh8e$7qi$1@fred.mathworks.com...
> "ophelia " <joozooo@hotmail.com> wrote in message
> <fqbeci$dem$1@fred.mathworks.com>...

*snip*

> I talk about the idea of a "basin of attraction"
> in my optimization tips and tricks document.
> You might find the topic interesting. A basin
> of attraction is the set of all points that when
> used as starting values for a given optimizer,
> on a given objective function, the optimizer
> will converge to a given local optimum. Many
> problems have multiple local optima, so they
> have multiple basins of attraction. Unfortunately,
> a basin of attraction may have a strange shape.
> It need not even be a connected set.
>
> http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?
> objectId=8553&objectType=FILE

Indeed. One simply example is the PEAKS surface. Type "peaks" without the
quotes at the prompt to see it. If you start an optimization that tries to
"flow downhill" around (-1, 1) or (-1 0) then you reach the local minimum
located near the Y axis; if you start near (0, -1) or (1, -1) you'll end up
in the X axis local minimum. And if you start at (2, 2) you're probably not
going to get to either; you're going to reach a "flat" place and stop
flowing downhill.

--
Steve Lord
slord@mathworks.com


Subject: Re: start point for the function

From: ophelia

Date: 03 Mar, 2008 15:35:27

Message: 6 of 7

"Steven Lord" <slord@mathworks.com> wrote in message
<fqbum1$ob0$1@fred.mathworks.com>...
>
> "John D'Errico" <woodchips@rochester.rr.com> wrote in message
> news:fqbh8e$7qi$1@fred.mathworks.com...
> > "ophelia " <joozooo@hotmail.com> wrote in message
> > <fqbeci$dem$1@fred.mathworks.com>...
>
> *snip*
>
> > I talk about the idea of a "basin of attraction"
> > in my optimization tips and tricks document.
> > You might find the topic interesting. A basin
> > of attraction is the set of all points that when
> > used as starting values for a given optimizer,
> > on a given objective function, the optimizer
> > will converge to a given local optimum. Many
> > problems have multiple local optima, so they
> > have multiple basins of attraction. Unfortunately,
> > a basin of attraction may have a strange shape.
> > It need not even be a connected set.
> >
> >
http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?
> > objectId=8553&objectType=FILE
>
> Indeed. One simply example is the PEAKS surface. Type
"peaks" without the
> quotes at the prompt to see it. If you start an
optimization that tries to
> "flow downhill" around (-1, 1) or (-1 0) then you reach
the local minimum
> located near the Y axis; if you start near (0, -1) or (1,
-1) you'll end up
> in the X axis local minimum. And if you start at (2, 2)
you're probably not
> going to get to either; you're going to reach a "flat"
place and stop
> flowing downhill.
>
> --
> Steve Lord
> slord@mathworks.com
>
>

thank you so much John and Steve. now I know better the
optimization. There are probably multiple local optima, but
how I can find the right optima from so many local optimas?

thank you for the help!!

Ophelia


Subject: Re: start point for the function

From: Marcus M. Edvall

Date: 04 Mar, 2008 06:10:47

Message: 7 of 7

Hi Ophelia,

A global solver, such as glcDirect can take care of this for you.

Feel free to send me the problem you are working on and I will take a
look.

Typically one wants to combine global and local search - I would do a
deep global search then fine-tune with a local solver to get better
precision (preferably with MAD to improve even further). glcCluster
automated this process. You can also try multiMin (subsolver required)
to obtain many local solutions and pick from the pool afterwards.

Best wishes, Marcus
Tomlab Optimization Inc.
http://tomopt.com/tomlab/

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
humor John D'Errico 01 Mar, 2008 07:30:22
rssFeed for this Thread

envelope graphic E-mail this page to a colleague

Public Submission Policy
NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Disclaimer prior to use.
Related Topics