lambda in fmincon returns multiple values

9 ビュー (過去 30 日間)
Rini
Rini 2014 年 12 月 9 日
編集済み: Matt J 2014 年 12 月 10 日
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!

回答 (1 件)

Matt J
Matt J 2014 年 12 月 10 日
編集済み: Matt J 2014 年 12 月 10 日
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 件のコメント
Rini
Rini 2014 年 12 月 10 日
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 2014 年 12 月 10 日
編集済み: Matt J 2014 年 12 月 10 日
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.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeSolver Outputs and Iterative Display についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by