Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Quadratic Cost Function x^T Q x
Date: Thu, 20 May 2010 22:07:05 +0000 (UTC)
Organization: Imperial College London
Lines: 32
Message-ID: <ht4bq9$4t9$1@fred.mathworks.com>
References: <ht3lnt$92i$1@fred.mathworks.com> <ht3oj8$gpr$1@fred.mathworks.com> <ht3tl0$mbi$1@fred.mathworks.com> <ht3vtl$o1d$1@fred.mathworks.com> <ht41ak$at$1@fred.mathworks.com> <ht42pg$8he$1@fred.mathworks.com> <ht495s$eq2$1@fred.mathworks.com> <ht4al2$jcc$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1274393225 5033 172.30.248.38 (20 May 2010 22:07:05 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 20 May 2010 22:07:05 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1192337
Xref: news.mathworks.com comp.soft-sys.matlab:637828

"Matt J " <mattjacREMOVE@THISieee.spam> wrote in message <ht4al2$jcc$1@fred.mathworks.com>...
> "Jason" <jf203@ic.ac.uk> wrote in message <ht495s$eq2$1@fred.mathworks.com>...
> > "Roger Stafford" <ellieandrogerxyzzy@mindspring.com.invalid> wrote in message 
> 
> > Think of the vector x as a line in geometrical 2-D space. I want to estimate the parameters of this line, i.e. x(1)*x + x(2)*y + x(3).
> >
> > Pardon my ignorance, but even without placing any constraints on x you get a non-trivial solution (i.e. not x = 0).
> ===============
> 
> But the cost function for this estimation problem bears no resemblance to the one you posed.
> 
> 
> > 
> > My main question is if I can use something different than lsqnonlin which takes a very long time to run and is prone to fall into suboptimal minima.
> =================
> 
> You might try running lsqnonlin with the Algorithm option to 'levenberg-marquardt'. My intuition about the default trust-region method is that, even if you initialize in the correct capture basin, the algorithm can crawl out of it into something less optimal. Conversely, Levenberg-Marquardt is, according to my intuition, may be more basin-preserving. Also, if you supply an analytical gradient then, according to doc lsqnonlin, it could be more computationally cheap per iteration. 
> 
> All of this assumes that you have at least a reasonable guess of the initial solution, but there's no escaping that when it comes to non-convex minimization.

I will try the levenberg-marquardt option, thanks!

As for your inquiry, what do you mean?

The cost function is still the same.

As I said J = min x ( x' Q x).

I am following a principle from computer vision where Q is the matrix representation of a conic (an ellipse). If you set Q = adj(Q) (where adj means adjoint) then x' Q x = 0 means that if this equation is satisfied, then the line parametrized by x is tangent to the ellipse. The additional constraint i have gaven, namely that x(1) and x(2) lie on a unit circle only helps but is not necessary.

Regards,
Jason