||
% VTISTA.m for Variant Thresholding Soft Iterative Thresholding Algorithm.
function x_output =VTISTA( y,A,lambda,Max_Iter)
% ITSTA is a simple algorithm based on Soft-thresholding and used to solve
% following Problem:
% min || y - A x ||_2^2 / 2 + u(x) || x ||_1
% s.t. || x ||_0 <= s
% Input:
% y :measure data;
% A: sensing matrix;
% lambda: parameter for (1/2)*(x-xk)' (A'A) (x-xk)=lambda^2 ||x-xk||_2^2;
% Sparsity_level : || x ||_0,that is the number of the nonzero entries of
% some vector in R^n;
% Output:
% x_shs: the iterative soft thresholding;
%%%%%%%%%%%%%%%
x0 = A'*y; % Initialization vector;
n = length(x0); % the dimension of signal;
if nargin <4
Max_Iter = n ;
end
if nargin <3
lambda = sqrt(2*log(n));
end
Iter = 0; % initializate iteration;
x_input = x0;
while Iter <= Max_Iter
% The important loop;
lambdax = lambda / ((sqrt(n) - 1)*norm(x_input,2));
Tx = lambdax/2;
zxk = x_input +A'*(y-A*x_input) ;
% This is soft thresholding;
x_input = wthresh(zxk,'s',Tx) ;
% x_input = zxk - sign(x_input).*Tx;
%the same with wthresh(which is inner function);
Iter = Iter+1;
end
x_output = x_input;
end
Archiver|手机版|科学网 ( 京ICP备07017567号-12 )
GMT+8, 2025-1-3 00:36
Powered by ScienceNet.cn
Copyright © 2007- 中国科学报社