フィルターのクリア

How to use quadprog for this multi-dimension problem?

2 ビュー (過去 30 日間)
dragoon
dragoon 2015 年 11 月 5 日
コメント済み: dragoon 2015 年 11 月 5 日

I am trying to use quadprog.m to solve the following 2 dimensional optimization problem.

where $(x_i,y_i)$ is the data point.

How may I implement this 2 dimensional problem in matlab by quadprog? I can do for 1 dimensional problem, i.e., only with $\alpha_i$. But now I have $\alpha_i$ and $\alpha_i'$, i.e., two sets of unknown.

採用された回答

Alan Weiss
Alan Weiss 2015 年 11 月 5 日
編集済み: Alan Weiss 2015 年 11 月 5 日
All Optimization Toolbox™ solvers require that you put your control variables into a single vector, typically called x. For your case, I suggest that you set the column vector x to be
x = [alpha;alphaprime];
In other words, just concatenate your two existing column vectors of unknowns into one longer column vector. Given this transformation, it is not too difficult to write matrices H and f to represent your problem in the requisite form
1/2*x'*H*x + f*x
Remember, quadprog minimizes, so if you are looking for a maximum, take the negative of your objective function.
If you cannot figure out how to do it with quadprog, you can always use fmincon.
Alan Weiss
MATLAB mathematical toolbox documentation
  3 件のコメント
Matt J
Matt J 2015 年 11 月 5 日
You say you can write the Hessian H0 for the single unknown vector case. For this case, they will be related by
H = [I,-I].' * H0 * [I,-I]
where I=eye(n);
dragoon
dragoon 2015 年 11 月 5 日
Yes, I see! Thank you!

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

その他の回答 (0 件)

カテゴリ

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