lambda in fmincon returns multiple values

9 views (last 30 days)
Rini
Rini on 9 Dec 2014
Edited: Matt J on 10 Dec 2014
Hello,
I am using 'fmincon' for an optimization problem. I am interested in lambda.lower as I have a lower bound constraint. However, in the 'lambda' structure, which is obtained as one of the outputs, I can see multiple values of lambda.lower, all of which are positive. I have used 'lasso' and 'lassoglm' which have a 'LambdaMinSSE' parameter,(lambda value for the minimum error) but I do not see any such information in fmincon. Could someone please tell me how to select the lambda in fmincon?
Thanks so much!

Answers (1)

Matt J
Matt J on 10 Dec 2014
Edited: Matt J on 10 Dec 2014
So, for example, when I run as follows I get a vector of values for lambda.lower
>> [x,fval,exitflag,output,lambda] = fmincon(@(x)norm(x)^2,[10,10],[],[],[],[],[1;1]);
>> lambda.lower
ans =
2
2
Is this what you're talking about? If so, it's normal. My problem is two dimensional, and so the lower bound input argument lb specifies 2 bounds, both of which need associated Lagrange multipliers.
  2 Comments
Rini
Rini on 10 Dec 2014
Thanks so much, you are right. My objective function is |y-Ax|^2+lambda*norm(x,1), x>0 and I want to get the value of this lambda in the objective function. Instead I was looking for the Lagrange multiplier of the upper bound constraint on x. Can I get the lambda value in the objective function from fmincon output?
Matt J
Matt J on 10 Dec 2014
Edited: Matt J on 10 Dec 2014
I don't understand what "this lambda in the objective function" is and how it got there. The only way a variable can be in the workspace of the objective function is if you put it there, so I don't see what the problem is recovering it. It is also making the conversation confusing using the label "lambda" both for a variable inside your objective function and the lambda output by fmincon. You should change notation to make things clearer.
As a side note, your objective function is not differentiable because of the norm(x,1) term, and therefore not legal for use with fmincon. You should replace that term by sum(x), which is equivalent to norm(x,1) when x>=0, but is differentiable.

Sign in to comment.

Tags

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!