⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rigorthresh.m

📁 老外写的小波变换的工具箱
💻 M
字号:
function xhat = RigorThresh(y)
% RigorThresh -- Adaptive Threshold Selection using SURE
% Usage
%   xhat = RigorThresh(y)
% Inputs
%   y     Noisy Data with Std. Deviation = 1
% Outputs
%   xhat  Estimate of mean vector
% Notes
%   Using Principle of Stein's Unbiased Risk Estimate
%   Variant with Rigorous Proof
%
% See: Donoho, D.L. and Johnstone, I.M. ``Adapting
%   to Unknown Smoothness by Wavelet Shrinkage''

	[n,J] = dyadlength(y);
	magic = sqrt(2*log(n));

	% pretest statistic
	eta = (norm(y).^2 - n)/n;
	crit = J^(1.5)/sqrt(n);

	if eta < crit,

		% failed pretest -- use sqrt(2 log(n))
		xhat = SoftThresh(y,magic);

	else
		
		% Construct random subsets of size n/2 each
		xhat = rand(size(y)); v = sort(xhat);
		I = xhat > v(n/2); Ip = ~I;

		% Apply SURE to each half
		T  = min(ValSUREThresh(y(I)), magic);
		Tp = min(ValSUREThresh(y(Ip)),magic);
		xhat = y;
		
		% Threshold from one half is applied to other
		xhat(I)  = SoftThresh(y(I) ,Tp);
		xhat(Ip) = SoftThresh(y(Ip),T);

	end

    
    
  %%  Part of Wavelab Version 850%  Built Tue Jan  3 13:20:41 EST 2006%  This is Copyrighted Material%  For Copying permissions see COPYING.m%  Comments? e-mail wavelab@stat.stanford.edu 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -