correlation.m.svn-base

来自「a function inside machine learning」· SVN-BASE 代码 · 共 10 行

SVN-BASE
10
字号
function corr = correlation(X, Y, ranking) 
%Compute the correlations between columns of matrices 

if (nargin < 2)
    fprintf('%s\n', help(sprintf('%s', mfilename)));
    error('Incorrect number of inputs - see above usage instructions.');
end

corr = sum(X.*Y, 1) ./ (sqrt(sum(X.^2, 1)) .* sqrt(sum(Y.^2, 1)));

⌨️ 快捷键说明

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