Re: Least squares optimization with sum-to-one constraint



Hi,
what you wrote is well known and OK except for one sentence
so don't waste time solving for it numerically
There is NO way to compute an SVD non-numerically. I would have
thought you knew that. Actually, there is a way if the dimension of
the matrix is not larger than 3 or 4....


On May 27, 2:09 pm, ~Glynne <glynnec2...@xxxxxxxxx> wrote:
On May 26, 11:33 am, I Gerg <isaac-dot-gerg-AtatAt@ate-adelphia|

dot|.basketballnet> wrote:
Hi,
I am looking for a clear derivation of this problem or maybe some Matlab code
to help me understand it. I understand their is a closed for solution for this
problem and have tried several algorithm from journals with no luck in getting
the results to sum to one or nearly one.

Any help would be greatly appreciated.

Regards,
Isaac

Okay, I think I understand your problem....you want to solve a linear
system:
A.x = b

in a least-squares sense, but you also want the solution to satisfy
the linear constraint:
E.x = f

in an exact sense. If so, then read on.

First, find the general solution of the E-system.
Let's use {E} to denote the pseudoinverse of E, then we can write:
x = {E}.f + (I-{E}.E).w

where w is an (as yet) undetermined vector.

Next, substitute this expression for x in the A-system:
A.{E}.f + A.(I-{E}.E).w = b
(A-A.{E}.E).w = b - A.{E}.f

And solve for w:
w = {A-A.{E}.E}.(b-A.{E}.f)

Now that w has been determined, we know that x is:
x = {E}.f + (I-{E}.E).{A-A.{E}.E}.(b-A.{E}.f)

In your particular case, E is a matrix of all 1s, and f is a vector of
all 1s.
Actually, E would be a row vector, and f a scalar....details, details.
Anyway, {E} has an exact expression, so don't waste time solving for
it numerically.
The only system for which you'll need to compute an SVD is {A-A.
{E}.E}, so the overall solution is quite stable.

~Glynne
PS If E is an mxn matrix of 1s, then {E} = E'/mn


.