lambda in fmincon returns multiple values
6 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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!
0 Kommentare
Antworten (1)
Matt J
am 10 Dez. 2014
Bearbeitet: Matt J
am 10 Dez. 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 Kommentare
Matt J
am 10 Dez. 2014
Bearbeitet: Matt J
am 10 Dez. 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.
Siehe auch
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!