CVX: quickstart 3 Other norms and functions

CVX: quickstart 3 Other norms and functions

Chebyshevノルム(L∞ノルム)やL1ノルムの計算をMatLabのOptimization toolboxで行うにはlinprog関数を使うのだが,関数の引数がややこしい.それに比べると,CVXはnorm関数の引数を変更するだけなので,記述が簡単.
  1. Chebyshevノルム
    >> cvx_begin
    >> variable x_inf(n);
    >> minimize(norm(A*x_inf-b,Inf));
    >> cvx_end
  2. L1ノルム
    >> cvx_begin
    >> variable x_1(n);
    >> minimize(norm(A*x_1-b,1));
    >> cvx_end
  3. k Largestノルム
    Ax-bの中で絶対値が大きいk個の値を考慮するノルム.
    |Ax-b|lgst,k = |Ax-b|1+|Ax-b|2+ ・・・ + +|Ax-b|k
    >> k=5;
    >> cvx_begin
    >> variable x_k(n);
    >> minimize(norm_largest(A*x_k-b,k));
    >> cvx_end
  4. Huber罰則項
    φ(z)=|z|^2 |z|1
    >> cvx_begin
    >> variable x_huber(n);
    >> minimize(sum(huber(A*x_huber-b)));
    >> cvx_end
と,こんな感じでObjective functionやconstraintが複雑になってもCVXを使えば簡単に…という話のようだ.
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s