NORM_L21 - L21 mixed norm

Usage

n21 = norm_l21(x);
n21 = norm_l21(x, g_d,g_t);
n21 = norm_l21(x, g_d,g_t, w2,w1);

Input parameters

x Input data
g_d group vector 1
g_t group vector 2
w2 weights for the two norm (default 1)
w1 weights for the one norm (default 1)

Output parameters

y Norm

Description

norm_l21(x, g_d,g_t, w2,w1) returns the norm L21 of x. If x is a matrix the 2 norm will be computed as follow:

\begin{equation*} \| x \|_{21} = \sum_j \left| \sum_i |x(i,j)|^2 \right|^{1/2} \end{equation*}

In this case, all other argument are not necessary.

'norm_l21(x)' with x a row vector is equivalent to norm(x,1) and 'norm_l21(x)' with x a line vector is equivalent to norm(x)

For fancy group, please provide the groups vectors.

g_d, g_t are the group vectors. g_d contain the indices of the element to be group and g_t the size of different groups.

Example:
x=[x1 x2 x3 x4 x5 x6] Group 1: [x1 x2 x4 x5] Group 2: [x3 x6]

Leads to

=> g_d=[1 2 4 5 3 6] and g_t=[4 2] Or this is also possible => g_d=[4 5 3 6 1 2] and g_t=[2 4]

This function works also for overlapping groups.