59f62c0d5424d7f73adddf37ae9ca1dc.png

2014-04-22

怎样用matlab求相关系数矩阵

我们是用corr来计算的:

[RHO,PVAL] = corr(X,Y,'name',value)

其中name可以是type,rows,tail,而value分别如下:

type: 'Pearson' (the default) computes Pearson's linear correlation coefficient

'Kendall' computes Kendall's tau

'Spearman' computes Spearman's rho

rows 'all' (the default) uses all rows regardless of missing va...全部

我们是用corr来计算的:

[RHO,PVAL] = corr(X,Y,'name',value)

其中name可以是type,rows,tail,而value分别如下:

type: 'Pearson' (the default) computes Pearson's linear correlation coefficient

'Kendall' computes Kendall's tau

'Spearman' computes Spearman's rho

rows 'all' (the default) uses all rows regardless of missing values (NaNs)

'complete' uses only rows with no missing values

'pairwise'computes RHO(i,j) using rows with no missing values in column i or j

tail 'both' — Correlation is not zero (the default)

'right' — Correlation is greater than zero

'left' — Correlation is less than zero。

收起

Logo

魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。

更多推荐