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

📄 spearmanrcollums.m

📁 用于文本语义分析的潜在语义分析算法LSA(Latent Semantic Analysis)
💻 M
字号:
function r=spearmanrcollums(x)
% function r=spearmanrcollums(x)
% return Spearman Rank Correlation matrix
% can only give the correlation of the collums!
% Requires the Spearman Rank matrix to be applied on collums,
% or the program will give absurd result.
% NEVER apply this program on rows!
[m n]=size(x);
r=zeros(m,n);
for j=1:n-1
    for k=j+1:n
        sum=0;
        for i=1:m
             temp=(x(i,j)-x(i,k))^2;
             sum=sum+temp;
        end
        r(k,j)=1-6*sum/(m^3-m);
    end
end

⌨️ 快捷键说明

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