Diff of /frames/franagrouplasso.m [e6709d] .. [2f5a82] Maximize Restore

  Switch to unified view

a/frames/franagrouplasso.m b/frames/franagrouplasso.m
...
...
74
%   The relationship between the output coefficients is given by ::
74
%   The relationship between the output coefficients is given by ::
75
%
75
%
76
%     xrec = frsyn(F,tc);
76
%     xrec = frsyn(F,tc);
77
%
77
%
78
%   See also: franalasso, framebounds
78
%   See also: franalasso, framebounds
79
%
80
%   References: Kowalski08sparsity kowalski2009mixed
79
81
80
if nargin<2
82
if nargin<2
81
  error('%s: Too few input parameters.',upper(mfilename));
83
  error('%s: Too few input parameters.',upper(mfilename));
82
end;
84
end;
83
85
...
...
100
L=framelength(F,length(insig));
102
L=framelength(F,length(insig));
101
103
102
F=frameaccel(F,L);
104
F=frameaccel(F,L);
103
105
104
if isempty(kv.C)
106
if isempty(kv.C)
105
  [A_dummy,kv.C] = framebounds(F,L);
107
  [~,kv.C] = framebounds(F,L);
106
end;
108
end;
107
109
108
% Initialization of thresholded coefficients
110
% Initialization of thresholded coefficients
109
c0 = frana(F,insig);
111
c0 = frana(F,insig);
110
112
...
...
112
% discover their size
114
% discover their size
113
tc = framecoef2tf(F,c0);
115
tc = framecoef2tf(F,c0);
114
[M,N]=size(tc);
116
[M,N]=size(tc);
115
117
116
% Normalization to turn lambda to a value comparable to lasso
118
% Normalization to turn lambda to a value comparable to lasso
117
if flags.do_time
119
%if flags.do_time
118
  lambda = lambda*sqrt(N);
120
%  lambda = lambda*sqrt(N);
119
else
121
%else
120
  lambda = lambda*sqrt(M);
122
%  lambda = lambda*sqrt(M);
121
end
123
%end
122
124
123
% Various parameter initializations
125
% Various parameter initializations
124
threshold = lambda/kv.C;
126
threshold = lambda/kv.C;
125
127
126
128
...
...
133
if flags.do_freq
135
if flags.do_freq
134
  kv.dim=2;
136
  kv.dim=2;
135
else
137
else
136
  kv.dim=1;
138
  kv.dim=1;
137
end;
139
end;
138
  
139
kv.dim
140
140
141
if F.red==1
141
if F.red==1
142
    
142
        
143
    %  ------------ Convert to TF-plane ---------
144
    tc = groupthresh(tc,threshold,'argimport',flags,kv);
143
    tc=groupthresh(tc,threshold,kv.dim,flags.iofun);
145
144
146
    % Convert back from TF-plane
145
    % Convert back from TF-plane
147
    tc=frametf2coef(F,tc);
146
    tc=frametf2coef(F,tc);        
148
147
149
else
148
else
150
149
151
    % Main loop
150
    % Main loop
152
    while ((iter < kv.maxit)&&(relres >= kv.tol))
151
    while ((iter < kv.maxit)&&(relres >= kv.tol))