The reformulation you show is the right idea, but I don't know why you would have g(x[i]). I think you would just have new variables g(i) independent of x and you would minimize over the combined parameter vector [x;g]. Also, it's not a linear program unless f(x) is linear, because otherwise the constraints are still nonlinear with respect to x. Are you saying that your f(x) is linear?
L1 minimisation for a specific function
10 次查看(过去 30 天)
显示 更早的评论
Hi, I'm trying to code up the following linear program:
min norm(f(x)-d,1)
So essentially, I'm just trying to minimise the 1-norm of a function, f(x) minus the actual data, y. I've seen online that this problem can be reduced to:
min sum(i=1 to n) g(x[i]) s.t g(x[i])>=f(x[i])-d[i] and -g(x[i])>=f(x[i])-d[i]
So it reduces to a linear program. I'm very new to matlab and I know how to write out the function f(x), I can load the data d vector. But I'm not sure how I would be able to write the linear program in matlab.
Is there a sample code that anyone could provide?
Thank you in advanced.
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!