필터 지우기
필터 지우기

lambda in fmincon returns multiple values

조회 수: 4 (최근 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 CenterFile Exchange에서 Solver 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