資源簡介
非負矩陣分解的matlab代碼,內容全This functions compares two W'matrices from NMF
% by estimating the permutation and computing the
% normalized LS of the permuted matrix

代碼片段和文件信息
function?[in_permerror]=compare(W1W2)
%
%?This?functions?compares?two?W‘matrices?from?NMF
%?by?estimating?the?permutation?and?computing?the
%?normalized?LS?of?the?permuted?matrix
%
%?in_perm?is?the?permutation?of?W2?to?similar?it?with?W1
%?error?is?1-mean(correff);
[DK]=size(W1);
covar=zeros(K);
xW1=W1-repmat(mean(W11)D1);
xW2=W2-repmat(mean(W21)D1);
%
stds1=std(W1[]1);
stds2=std(W2[]1);
%????
for?k1=1:K
????%
????for?k2=1:K
????????covar(k1k2)=abs(sum((xW1(:k1).*xW2(:k2)))/D)/(stds1(k1)*stds2(k2));
???end
end
%
error=0;
inlist=logical(ones(K1));
arrayx=1:K;
for?k=1:K
???[dummyin]=max(covar(kinlist));
???xarrayx=arrayx(inlist);
???in_perm(k)=xarrayx(in);
???inlist(xarrayx(in))=0;
???error=error+dummy;
end
error=1-(error/K);
???
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????19989??2007-11-06?15:54??brain_demo\brainNMF.asv
?????文件????????4216??2007-11-06?15:34??brain_demo\brainNMF.fig
?????文件???????18855??2007-11-09?15:38??brain_demo\brainNMF.m
?????文件?????????714??2007-07-05?14:12??brain_demo\plotError.m
?????文件?????????822??2007-07-05?14:11??brain_demo\plotSlices.m
?????文件?????????791??2007-07-05?12:34??brain_demo\plotThresshold.m
?????文件????????5904??2005-04-26?00:00??brain_demo\ReadAnalyzeHdr.m
?????文件????????9716??2004-11-09?00:00??brain_demo\ReadAnalyzeImg.m
?????文件?????????450??2006-10-24?11:10??brain_demo\rescale.m
?????文件?????????795??2005-11-06?20:21??compare.m
?????文件????????2689??2006-12-18?14:18??nmf.m
?????文件????????1539??2006-12-18?14:13??nmf_als.m
?????文件????????3353??2006-11-16?14:14??nmf_alsobs.m
?????文件????????4096??2006-12-11?14:57??nmf_cjlin.m
?????文件??????????62??2006-08-08?08:24??nmf_euclidean_dist.m
?????文件????????1929??2007-10-30?12:02??nmf_mm.m
?????文件????????1822??2006-12-20?09:45??nmf_prob.m
?????文件?????????257??2005-11-06?19:11??order_comp.m
?????文件?????????509??2006-12-19?14:28??test_toolbox.m
?????文件???????89891??2006-10-10?13:43??text_demo\exp_data_cnn.mat
?????文件??????343171??2006-12-15?10:00??text_demo\exp_data_email.mat
?????文件???????33929??2006-12-13?14:35??text_demo\exp_data_med.mat
?????文件????????1251??2006-12-19?13:39??text_demo\run_nmf.m
?????文件????????6464??2006-12-15?10:13??text_demo\text_demo.fig
?????文件???????10349??2006-12-19?13:39??text_demo\text_demo.m
- 上一篇:自適應中值濾波算法matlab
- 下一篇:SUSAN算法的MATLAB實現
評論
共有 條評論