Thread Subject: Least squares- infinity anf first norm minimization

Subject: Least squares- infinity anf first norm minimization

From: Balwinder Singh

Date: 24 Nov, 2009 21:26:18

Message: 1 of 8

Hi all,
I have an overdetermined system. I know how to solve it using L2 norm minimization but I am not sure how to use L-infinity (or L-1) norm minimization to get the solution. Does MATLAB has any function which can solve least square problem with L1 or L-infinity norm minimization?

Thanks!

Subject: Least squares- infinity anf first norm minimization

From: Bruno Luong

Date: 24 Nov, 2009 22:04:04

Message: 2 of 8

> Does MATLAB has any function which can solve least square problem with L1 or L-infinity norm minimization?

Yes: LINPROG from optimization toolbox. You need to work out a little bit with slacks variables to transform your problem into linear programming problem.

PS: "least squares" means "L2", no more no less no fantasy...

Bruno

Subject: Least squares- infinity anf first norm minimization

From: Balwinder Singh

Date: 24 Nov, 2009 22:37:06

Message: 3 of 8

Thanks for your response.
I am not sure what would be the best way to solve the problem I have. Right now, I am using PINV function of MATLAB to solve my problem, which I assume is a least square approach (hence minimizes norm 2). I want a solution where norm "infinity" or "1" is minimized. Is that possible in MATLAB?

Following is an example of what I am trying to do:

I break my matrix into a product of phi and alpha using decomposition and get the following equation:

F=phi*alpha

F is a rectangular matrix (nxm), phi is also rectangular matrix of same size(nxm) and alpha is a square matrix (mxm)

e.g.
F=[1 2;
     3 6;
     4 5];

Now I create a new column for F_new (e.g [8;7]). and try to find corresponding values for alpha for this new column of F using PINV as follows,

alpha_new = pinv(phi) * F_new

If F and phi are square matrices, I recover the exact solution but if they are rectangular matrices, then I get a overdetermined system therefore the values are approximate.

My problem is to solve this overdetermined system using L infinity and L1 norm minimization to see if the results differ from L2 norm minimization.

Thanks a lot for ur help!

Subject: Least squares- infinity anf first norm minimization

From: Balwinder Singh

Date: 25 Nov, 2009 01:48:19

Message: 4 of 8

Sorry for top-posting, but if anybody can give me some pointers, I will really appreciate!!

Thanks.

Subject: Least squares- infinity anf first norm minimization

From: Bruno Luong

Date: 25 Nov, 2009 07:38:03

Message: 5 of 8

"Balwinder Singh" <balwindersingh@gmail.com> wrote in message <hei2d3$ls9$1@fred.mathworks.com>...
> Sorry for top-posting, but if anybody can give me some pointers, I will really appreciate!!

I think I understood your question correctly, so my suggestion stands: LINPROG is the right pointer, and may be the only option to solve such "flat-norm" minimization with a built-in Matlab function.

Bruno

Subject: Least squares- infinity anf first norm minimization

From: Balwinder Singh

Date: 25 Nov, 2009 14:36:04

Message: 6 of 8

Thanks Bruno.

I found scripts online for solving a linear system for infinity and one norm. I am not sure whether the script is alright as I can't cross check it. Following are the scripts:

% input
m = 16; n = 8;
A = randn(m,n);
b = randn(m,1);

% infinity norm
f = [ zeros(n,1); 1 ];
Ane = [ +A, -ones(m,1) ; ...
             -A, -ones(m,1) ];
bne = [ +b; -b ];
xt = linprog(f,Ane,bne);
x_lp = xt(1:n,:);

%One Norm
f = [ zeros(n,1); ones(m,1); ones(m,1) ];
Aeq = [ A, -eye(m), +eye(m) ];
lb = [ -Inf*ones(n,1); zeros(m,1); zeros(m,1) ];
xzz = linprog(f,[],[], Aeq,b,lb,[]);
x_lp = xzz(1:n,:);


Do they look alright?


Thanks!!

Subject: Least squares- infinity anf first norm minimization

From: Bruno Luong

Date: 25 Nov, 2009 14:46:23

Message: 7 of 8

"Balwinder Singh" <balwindersingh@gmail.com> wrote in message <hejfck$rkd$1@fred.mathworks.com>...
> Thanks Bruno.
>
> I found scripts online for solving a linear system for infinity and one norm. I am not sure whether the script is alright as I can't cross check it. Following are the scripts:
>
> % input
> m = 16; n = 8;
> A = randn(m,n);
> b = randn(m,1);
>
> % infinity norm
> f = [ zeros(n,1); 1 ];
> Ane = [ +A, -ones(m,1) ; ...
> -A, -ones(m,1) ];
> bne = [ +b; -b ];
> xt = linprog(f,Ane,bne);
> x_lp = xt(1:n,:);
>
> %One Norm
> f = [ zeros(n,1); ones(m,1); ones(m,1) ];
> Aeq = [ A, -eye(m), +eye(m) ];
> lb = [ -Inf*ones(n,1); zeros(m,1); zeros(m,1) ];
> xzz = linprog(f,[],[], Aeq,b,lb,[]);
> x_lp = xzz(1:n,:);
>
>
> Do they look alright?
>

Very quick look yes, they look alright.

Bruno

Subject: Least squares- infinity anf first norm minimization

From: Balwinder Singh

Date: 25 Nov, 2009 14:55:18

Message: 8 of 8

Thanks a lot Bruno!! I really appreciate your help!

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
linprog pipa 25 Nov, 2009 09:39:44
l1 pipa 24 Nov, 2009 16:29:17
linfinity pipa 24 Nov, 2009 16:29:17
least squares pipa 24 Nov, 2009 16:29:17
norm pipa 24 Nov, 2009 16:29:17
overdetermined ... pipa 24 Nov, 2009 16:29:17
least square pipa 24 Nov, 2009 16:29:17
rssFeed for this Thread

Contact us at files@mathworks.com