91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

資源簡介

來自Duke大學官網的貝葉斯壓縮感知matlab函數包,親測可用。 居家旅行必備!研究壓縮感知必備!

資源截圖

代碼片段和文件信息

function?[weightsusedsigma2errbarsbasis]?=?BCS_fast_rvm(PHItsigma2etaadaptiveoptimalscale)
%------------------------------------------------------------------
%?The?BCS?algorithm?for?the?following?paper:
%?“Bayesian?Compressive?Sesning“?(Preprint?2007).?The?algorithm?
%?adopts?from?the?fast?RVM?algorithm?[Tipping?&?Faul?2003].
%?Coded?by:?Shihao?Ji?ECE?Duke?University
%?last?change:?Jan.?2?2007
%?You?are?suggested?to?use?mt_CS.m?for?improved?robustness
%------------------------------------------------------------------
%?Input?for?BCS:
%???PHI:?projection?matrix
%???t:???CS?measurements
%???sigma2:?initial?noise?variance
%??????If?measurement?noise?exists?and/or?w?is?not?truely?sparse?
%?????????????then?sigma2?=?std(t)^2/1e2?(suggested)
%??????If?no?measurement?noise?and?w?is?truely?sparse
%?????????????then?sigma2?=?std(t)^2/1e6?(suggested)
%??????This?term?is?in?fact?not?updated?in?the?implementation?to?allow?
%??????the?fast?algorithm.?For?this?reason?you?are?recommended?to?use
%??????mt_CS.m?in?which?the?noise?variance?is?marginalized.
%???eta:?threshold?for?stopping?the?algorithm?(suggested?value:?1e-8)
%?Input?for?Adaptive?CS:
%???adaptive:?generate?basis?for?adpative?CS??(default:?0)
%???optimal:?use?the?rigorous?implementation?of?adaptive?CS??(default:?1)
%???scale:?diagonal?loading?parameter?(default:?0.1)
%?Output:
%???weights:??sparse?weights
%???used:?????the?positions?of?sparse?weights
%???sigma2:???re-estimated?noise?variance
%???errbars:??one?standard?deviation?around?the?sparse?weights
%???basis:????if?adaptive==1?then?basis?=?the?next?projection?vector
%
if?nargin?????adaptive?=?0;
end
if?nargin?????optimal?=?1;
end
if?nargin?????scale?=?0.1;
end

%?find?initial?alpha
[NM]?=?size(PHI);
PHIt?=?PHI‘*t;
PHI2?=?sum(PHI.^2)‘;
ratio?=?(PHIt.^2)./PHI2;
[maxrindex]?=?max(ratio);
alpha?=?PHI2(index)/(maxr-sigma2);
%?compute?initial?mu?Sig?S?Q
phi?=?PHI(:index);
Hessian?=?alpha?+?phi‘*phi/sigma2;
Sig?=?1/Hessian;
mu?=?Sig*PHIt(index)/sigma2;
left?=?PHI‘*phi/sigma2;
S?=?PHI2/sigma2-Sig*left.^2;
Q?=?PHIt/sigma2-Sig*PHIt(index)/sigma2*left;
%
for?count?=?1:10000

????s?=?S;?q?=?Q;
????s(index)?=?alpha.*S(index)./(alpha-S(index));
????q(index)?=?alpha.*Q(index)./(alpha-S(index));
????theta?=?q.^2-s;

????%?choice?the?next?alpha?that?maximizes?marginal?likelihood
????ml?=?-inf*ones(1M);
????ig0?=?find(theta>0);
????%?index?for?re-estimate
????[irefoowhich]?=?intersect(ig0index);
????if?~isempty(ire)
????????Alpha?=?s(ire).^2./theta(ire);
????????delta?=?(alpha(which)-Alpha)./(Alpha.*alpha(which));
????????ml(ire)?=?Q(ire).^2.*delta./(S(ire).*delta+1)-log(1+S(ire).*delta);
????end
????%?index?for?adding
????iad?=?setdiff(ig0ire);
????if?~isempty(iad)
????????ml(iad)?=?(Q(iad).^2-S(iad))./S(iad)+log(S(iad)./(Q(iad).^2));
????end
????is0?=?setdiff([1:M]ig0);
????%?index?for?deleting
????[idefoowhich]?=?intersect(is0inde

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2007-07-12?13:23??bcs_ver0.1\BCS_demo\
?????文件???????60254??2007-07-11?10:44??bcs_ver0.1\BCS_demo\approx_results.mat
?????文件????????5463??2007-07-12?13:22??bcs_ver0.1\BCS_demo\BCS_fast_rvm.m
?????文件????????2096??2007-07-11?10:31??bcs_ver0.1\BCS_demo\Fig2.m
?????文件????????1259??2007-07-11?10:31??bcs_ver0.1\BCS_demo\Fig4_ab.m
?????文件????????1696??2007-07-11?10:31??bcs_ver0.1\BCS_demo\multi_approx_measures.m
?????文件????????1763??2007-07-11?10:31??bcs_ver0.1\BCS_demo\multi_optimized_measures.m
?????文件????????1514??2007-07-11?10:31??bcs_ver0.1\BCS_demo\multi_random_measures.m
?????文件???????60300??2007-07-11?10:48??bcs_ver0.1\BCS_demo\optimized_results.mat
?????文件???????60084??2007-07-11?10:49??bcs_ver0.1\BCS_demo\random_results.mat
?????目錄???????????0??2008-08-17?16:52??bcs_ver0.1\MT_CS_demo\
?????文件????????2662??2007-07-11?10:45??bcs_ver0.1\MT_CS_demo\Fig2.m
?????文件????????1899??2007-07-11?10:45??bcs_ver0.1\MT_CS_demo\Fig3.m
?????文件????????6377??2008-08-17?16:52??bcs_ver0.1\MT_CS_demo\mt_CS.m
?????文件??????299828??2007-07-11?13:02??bcs_ver0.1\MT_CS_demo\multi_results_25.mat
?????文件??????299942??2007-07-11?12:38??bcs_ver0.1\MT_CS_demo\multi_results_50.mat
?????文件??????300077??2007-07-11?12:20??bcs_ver0.1\MT_CS_demo\multi_results_75.mat
?????文件????????2569??2007-07-11?10:45??bcs_ver0.1\MT_CS_demo\multi_runs_25.m
?????文件????????2602??2007-07-11?10:45??bcs_ver0.1\MT_CS_demo\multi_runs_50.m
?????文件????????2602??2007-07-11?10:45??bcs_ver0.1\MT_CS_demo\multi_runs_75.m
?????文件????????2664??2008-08-17?16:50??bcs_ver0.1\README.txt
?????目錄???????????0??2008-08-17?16:16??bcs_ver0.1\

評論

共有 條評論