KpNormDual: Difference between revisions

From QETLAB
Jump to navigation Jump to search
Created page with "{{Function |name=kpNormDual |desc=Computes the dual of the (k,p)-norm of an operator |req=kpNorm |rel=KyFanNorm<br />SchattenNorm<br />TraceNorm |upd=Decem..."
 
m typo
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{Function
{{Function
|name=kpNormDual
|name=kpNormDual
|desc=Computes the [[dual of the (k,p)-norm]] of an operator
|desc=Computes the dual of the (k,p)-norm of a vector or matrix
|req=[[kpNorm]]
|rel=[[kpNorm]]<br />[[KyFanNorm]]<br />[[SchattenNorm]]<br />[[TraceNorm]]
|rel=[[KyFanNorm]]<br />[[SchattenNorm]]<br />[[TraceNorm]]
|cat=[[List of functions#Norms|Norms]]
|upd=December 3, 2012
|upd=June 24, 2015
|v=1.00}}
|cvx=yes (convex)}}
<tt>'''kpNormDual'''</tt> is a [[List of functions|function]] that computes the [[dual of the (k,p)-norm]]<ref>G.S. Mudholkar and M. Freimer. A structure theorem for the polars of unitarily invariant norms. ''Proc. Amer. Math. Soc.'', 95:331&ndash;337, 1985.</ref>. It works with both full and sparse matrices.
<tt>'''kpNormDual'''</tt> is a [[List of functions|function]] that computes the dual of the [[kpNorm|(k,p)-norm]] of a vector or matrix. More explicitly, the (k,p)-norm of a vector $x = (x_1,x_2,\ldots,x_n)$ is
: <math>\|x\|_{(k,p)} := \left(\sum_{j=1}^k \big|x_i^\downarrow\big|^p \right)^{1/p},</math>
where $(x_1^\downarrow,x_2^\downarrow,\ldots,x_n^\downarrow)$ is a rearrangement of the vector $x$ with the property that $|x_1^\downarrow| \geq |x_2^\downarrow| \geq \cdots \geq |x_n^\downarrow|$. Similarly, the (k,p)-norm of a matrix is the (k,p)-norm of its vector of singular values. This function computes the dual of this norm, which is fairly complicated and was derived in<ref>G.S. Mudholkar and M. Freimer. A structure theorem for the polars of unitarily invariant norms. ''Proc. Amer. Math. Soc.'', 95:331&ndash;337, 1985.</ref>. This function works with both full and sparse vectors and matrices.


==Syntax==
==Syntax==
Line 12: Line 14:


==Argument descriptions==
==Argument descriptions==
* <tt>X</tt>: An operator to have its norm computed.
* <tt>X</tt>: A vector or matrix to have its norm computed.
* <tt>K</tt>: A positive integer.
* <tt>K</tt>: A positive integer.
* <tt>P</tt>: A real number &ge; 1, or <tt>Inf</tt>.
* <tt>P</tt>: A real number &ge; 1, or <tt>Inf</tt>.
Line 18: Line 20:
==Examples==
==Examples==
===A simple 4-by-4 example===
===A simple 4-by-4 example===
The (k,p)-norm when k = 1 is simply the operator norm. The dual of the operator norm is the trace norm, so when k = 1 this function just returns the trace norm (regardless of p):
The (k,p)-norm of a matrix when k = 1 is simply the operator norm. The dual of the operator norm is the trace norm, so when k = 1 this function just returns the trace norm (regardless of p):
<pre<noinclude></noinclude>>
<syntaxhighlight>
>> X = [1 1 1 1;1 2 3 4;1 4 9 16;1 8 27 64];
>> X = [1 1 1 1;1 2 3 4;1 4 9 16;1 8 27 64];
>> [kpNormDual(X,1,1), [[TraceNorm|TraceNorm(X)]]]
>> [kpNormDual(X,1,1), TraceNorm(X)]


ans =
ans =


   77.0015  77.0015
   77.0015  77.0015
</pre<noinclude></noinclude>>
</syntaxhighlight>


Similarly, if <tt>K = min(size(X))</tt> and <tt>P = 2</tt> then <tt>kpNorm(X,K,P)</tt> is the Frobenius norm, which is its own dual. Thus <tt>kpNormDual(X,K,2)</tt> decreases from the trace norm of <tt>X</tt> to its Frobenius norm as <tt>K</tt> increases:
Similarly, if <tt>K = min(size(X))</tt> and <tt>P = 2</tt> then <tt>kpNorm(X,K,P)</tt> is the Frobenius norm, which is its own dual. Thus <tt>kpNormDual(X,K,2)</tt> decreases from the trace norm of <tt>X</tt> to its Frobenius norm as <tt>K</tt> increases:
<pre<noinclude></noinclude>>
<syntaxhighlight>
>> [kpNormDual(X,1,2), TraceNorm(X)]
>> [kpNormDual(X,1,2), TraceNorm(X)]


Line 53: Line 55:


   72.6498  72.6498
   72.6498  72.6498
</pre<noinclude></noinclude>>
</syntaxhighlight>
 
{{SourceCode|name=kpNormDual}}


==References==
==References==
<references />
<references />

Latest revision as of 14:45, 25 May 2016

kpNormDual
Computes the dual of the (k,p)-norm of a vector or matrix

Other toolboxes required none
Related functions kpNorm
KyFanNorm
SchattenNorm
TraceNorm
Function category Norms
Usable within CVX? yes (convex)

kpNormDual is a function that computes the dual of the (k,p)-norm of a vector or matrix. More explicitly, the (k,p)-norm of a vector $x = (x_1,x_2,\ldots,x_n)$ is

<math>\|x\|_{(k,p)} := \left(\sum_{j=1}^k \big|x_i^\downarrow\big|^p \right)^{1/p},</math>

where $(x_1^\downarrow,x_2^\downarrow,\ldots,x_n^\downarrow)$ is a rearrangement of the vector $x$ with the property that $|x_1^\downarrow| \geq |x_2^\downarrow| \geq \cdots \geq |x_n^\downarrow|$. Similarly, the (k,p)-norm of a matrix is the (k,p)-norm of its vector of singular values. This function computes the dual of this norm, which is fairly complicated and was derived in[1]. This function works with both full and sparse vectors and matrices.

Syntax

  • NRM = kpNormDual(X,K,P)

Argument descriptions

  • X: A vector or matrix to have its norm computed.
  • K: A positive integer.
  • P: A real number ≥ 1, or Inf.

Examples

A simple 4-by-4 example

The (k,p)-norm of a matrix when k = 1 is simply the operator norm. The dual of the operator norm is the trace norm, so when k = 1 this function just returns the trace norm (regardless of p):

>> X = [1 1 1 1;1 2 3 4;1 4 9 16;1 8 27 64];
>> [kpNormDual(X,1,1), TraceNorm(X)]

ans =

   77.0015   77.0015

Similarly, if K = min(size(X)) and P = 2 then kpNorm(X,K,P) is the Frobenius norm, which is its own dual. Thus kpNormDual(X,K,2) decreases from the trace norm of X to its Frobenius norm as K increases:

>> [kpNormDual(X,1,2), TraceNorm(X)]

ans =

   77.0015   77.0015

>> kpNormDual(X,2,2)

ans =

   72.6903

>> kpNormDual(X,3,2)

ans =

   72.6505

>> [kpNormDual(X,4,2), norm(X,'fro')]

ans =

   72.6498   72.6498

Source code

Click here to view this function's source code on github.

References

  1. G.S. Mudholkar and M. Freimer. A structure theorem for the polars of unitarily invariant norms. Proc. Amer. Math. Soc., 95:331–337, 1985.