help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: minimum L1 norm


From: Kai Torben Ohlhus
Subject: Re: minimum L1 norm
Date: Sat, 12 Apr 2014 00:38:07 +0200

Hi,

You should work on your optimization problem before applying a solver. Your problem can be transformed into an linear program, see [1] for example. 

% A small example from the website [1] solved with Octave
m = 4;
n = 3;
A = [1 2 3; 4 5 6; 7 8 9; 10 11 12];
epsi = eye(m);
A = [A epsi];
b = [1; 2; 3; 4];
c = [zeros(1, n), sum(epsi)];
[x_opt, f_min] = glpk (c, A, b); % apply linear solved
x_opt(1:3) % cut off slack variables epsilon
f_min

----------------------------

ans = 0.00000   0.00000   0.33333
f_min = 0

HTH,
Kai

[1] https://reference.wolfram.com/mathematica/tutorial/ConstrainedOptimizationLinearProgramming.html#261990371


On Fri, Apr 11, 2014 at 10:43 PM, Juan Pablo Carbajal <address@hidden> wrote:
On Fri, Apr 11, 2014 at 8:05 PM, Ether Jones <address@hidden> wrote:
> Hello.
>
> I think my question is straightforward but I'm not finding the answer I need
> in the manual.
>
> I have a set of overdetermined linear equations A*x = b + epsilon.
>
> A is an MxN matrix where M>N.  A is known.
>
> b and epsilon are Mx1 column vectors.  b is known.  epsilon is unknown.
>
> x is an Nx1 column vector.  x is unknown.
>
> I want to find the value of x that minimizes the L1 norm of epsilon.
>
> What is the recommended way to do this in Octave?
>
>
> _______________________________________________
> Help-octave mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/help-octave
>

Get the YALL1 package
http://yall1.blogs.rice.edu/

_______________________________________________
Help-octave mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/help-octave


reply via email to

[Prev in Thread] Current Thread [Next in Thread]