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

📄 wccvalues.m

📁 有监督自组织映射-偏最小二乘算法(A supervised self-organising map–partial least squares algorithm),可以用语多变量数据的回归分析
💻 M
字号:
function [WccValues]=WccValues(X,Map,MLKP);

[Nvar,Nunit]=size(Map);
% weighted autocorrelation of X
XX=X*X';
for i=1:MLKP.WccTriangleWidth-1
    XX=XX+2*X(1:Nvar-i)*X(i+1:end)'*MLKP.WccWeights(i+1);
end
% autocorrelation of Map and crosscorrelation of X and Map for shift 0
YY=sum(Map.*Map);
XY=X*Map;
% autocorrelation of Map and crosscorrelation of X and Map for all other shifts
for i=1:MLKP.WccTriangleWidth-1
    Z=MLKP.WccWeights(i+1);
    YY=YY+sum(2*Map(1:Nvar-i,:).*Map(i+1:end,:)*Z);
    XY=XY+X(1:Nvar-i)*Map(1+i:Nvar,:)*Z;
    XY=XY+X(i+1:Nvar)*Map(1:Nvar-i,:)*Z;
end
% calculate weighted crosscorrelation values
for iunit=1:Nunit
    WccValues(iunit)=XY(iunit)/sqrt(XX*YY(iunit));
end

⌨️ 快捷键说明

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