文件名称:correlate
介绍说明--下载内容均来自于网络,请自行研究使用
功能:编写的计算皮亚诺相关系数
开发语言:ruby
调用:correlate(x,y)
其中,x,y为需要计算相关度的向量
调用示例:
a = [3, 6, 9, 12, 15, 18, 21]
b = [1.1, 2.1, 3.4, 4.8, 5.6]
c = [1.9, 1.0, 3.9, 3.1, 6.9]
c1 = correlate(a,a) # 1.0
c2 = correlate(a,a.reverse) # -1.0
c3 = correlate(b,c) # 0.8221970228
puts c1#,c2,c3
-Function: to prepare the calculation of correlation coefficient piano development language: ruby call: correlate (x, y) which, x, y for the need to calculate correlation vector call example: a = [3, 6, 9, 12, 15, 18, 21] b = [1.1, 2.1, 3.4, 4.8, 5.6] c = [1.9, 1.0, 3.9, 3.1, 6.9] c1 = correlate (a, a)# 1.0c2 = correlate (a, a.reverse )#-1.0c3 = correlate (b, c)# 0.8221970228puts c1#, c2, c3
开发语言:ruby
调用:correlate(x,y)
其中,x,y为需要计算相关度的向量
调用示例:
a = [3, 6, 9, 12, 15, 18, 21]
b = [1.1, 2.1, 3.4, 4.8, 5.6]
c = [1.9, 1.0, 3.9, 3.1, 6.9]
c1 = correlate(a,a) # 1.0
c2 = correlate(a,a.reverse) # -1.0
c3 = correlate(b,c) # 0.8221970228
puts c1#,c2,c3
-Function: to prepare the calculation of correlation coefficient piano development language: ruby call: correlate (x, y) which, x, y for the need to calculate correlation vector call example: a = [3, 6, 9, 12, 15, 18, 21] b = [1.1, 2.1, 3.4, 4.8, 5.6] c = [1.9, 1.0, 3.9, 3.1, 6.9] c1 = correlate (a, a)# 1.0c2 = correlate (a, a.reverse )#-1.0c3 = correlate (b, c)# 0.8221970228puts c1#, c2, c3
相关搜索: 相关系数
(系统自动生成,下载前可以参看下载内容)
下载文件列表
correlate.rb