计算两个数据向量之间的相关度的大小
Correlations
01 Syntax
02 Methods
| Name | Overloads | Summary |
|---|---|---|
| JaccardIndex | 1 | The Jaccard index, also known as Intersection over Union and the Jaccard similarity coefficient (originally coined coefficient de communauté by Paul Jaccard), is a statistic used… |
| JaccardIndex | 2 | |
| SW | 1 | Sandelin-Wasserman similarity function. |
| JSD | 1 | Jensen–Shannon divergence(J-S散度) is a method of measuring the similarity between two probability distributions. |
| KLD | 1 | Kullback-Leibler divergence, (KL散度/相对熵) |
| rankKendallTauBeta | 1 | Provides rank correlation coefficient metrics Kendall tau |
| kendallTauBeta | 1 | Provides rank correlation coefficient metrics Kendall tau |
| GetPearson | 2 | |
| TestStats | 1 | |
| Spearman | 1 | This method should not be used in cases where the data set is truncated; that is, when the Spearman correlation coefficient is desired for the top X records (whether by pre-chang… |
| CorrelationMatrix | 1 | 输入的数据为一个对象属性的集合,默认的compute计算方法为Correlations.GetPearson()) |
03 Properties
| Name | Overloads | Summary |
|---|---|---|
| PearsonDefault | 1 | 默认使用Pearson相似度 |
04 Fields
| Name | Overloads | Summary |
|---|---|---|
| TINY | 2 | will regularize the unusual case of complete correlation |
05 Members
IEnumerable(Of ``0), IEnumerable(Of ``0), Func(Of Object, Object, Boolean))The Jaccard index, also known as Intersection over Union and the Jaccard similarity coefficient (originally coined coefficient de communauté by Paul Jaccard), is a statistic used for comparing the similarity and diversity of sample sets. The Jaccard coefficient measures similarity between finite sample sets, and is defined as the size of the intersection divided by the size of the union of the sample sets.
| Name | Description |
|---|---|
T |
| Name | Type | Description |
|---|---|---|
a | IEnumerable(Of ``0) | - |
b | IEnumerable(Of ``0) | - |
equal | Func(Of Object, Object, Boolean) | - |
IReadOnlyCollection(Of String), IReadOnlyCollection(Of String))The Jaccard index, also known as Intersection over Union and the Jaccard similarity coefficient (originally coined coefficient de communauté by Paul Jaccard), is a statistic used for comparing the similarity and diversity of sample sets. The Jaccard coefficient measures similarity between finite sample sets, and is defined as the size of the intersection divided by the size of the union of the sample sets.
| Name | Type | Description |
|---|---|---|
a | IReadOnlyCollection(Of String) | - |
b | IReadOnlyCollection(Of String) | - |
Double(), Double())Sandelin-Wasserman similarity function. (假若所有的元素都是0-1之间的话,结果除以2可以得到相似度)
| Name | Type | Description |
|---|---|---|
x | Double() | - |
y | Double() | - |
Double(), Double())Jensen–Shannon divergence(J-S散度) is a method of measuring the similarity between two probability distributions. It is based on the Kullback–Leibler divergence(K-L散度), with some notable (and useful) differences, including that it is symmetric and it is always a finite value.
| Name | Type | Description |
|---|---|---|
P | Double() | - |
Q | Double() | - |
jsd value is not in range [0,1], value maybe in any real number.
Double(), Double())Kullback-Leibler divergence, (KL散度/相对熵)
计算 D_KL(P || Q) = Σ P(i) * ln(P(i) / Q(i))
| Name | Type | Description |
|---|---|---|
x | Double() | x和y必须是等长的 |
y | Double() | - |
Double(), Double())Provides rank correlation coefficient metrics Kendall tau
| Name | Type | Description |
|---|---|---|
x | Double() | - |
y | Double() | - |
Double(), Double())Provides rank correlation coefficient metrics Kendall tau
| Name | Type | Description |
|---|---|---|
x | Double() | - |
y | Double() | - |
Double(), Double(), Double, Double, Double, Double, Double, Boolean)checked by Excel
| Name | Type | Description |
|---|---|---|
x | Double() | - |
y | Double() | - |
prob | Double | p-value in R |
prob2 | Double | - |
z | Double | fisher's z trasnformation |
df | Double | degree of freedom |
t | Double | student's t probability |
Double(), Double())Pearson correlations
计算 Pearson 相关系数
| Name | Type | Description |
|---|---|---|
x# | Double() | - |
y# | Double() | - |
Double, Int32, Double, Double, Double, Double, Double, Boolean)Fisher's z 变换,主要用于皮尔逊相关系数的非线性修正上面。因为普通皮尔逊相关系数 在0-1上并不服从正态分布,相关系数的绝对值越趋近1时,概率变得非常非常小。相关系数 的分布非常像断了两头的正态分布。所以需要通过Fisherz-transformation对皮尔逊相 关系数进行修正,使得满足正态分布。
| Name | Type | Description |
|---|---|---|
cor | Double | - |
n | Int32 | should be the length of x or y vector |
z | Double | - |
pvalue | Double | - |
prob2 | Double | - |
t | Double | - |
df | Double | - |
throwMaxIterError | Boolean | - |
Double(), Double())This method should not be used in cases where the data set is truncated; that is, when the Spearman correlation coefficient is desired for the top X records (whether by pre-change rank or post-change rank, or both), the user should use the Pearson correlation coefficient formula given above. (斯皮尔曼相关性)
https://en.wikipedia.org/wiki/Spearman%27s_rank_correlation_coefficient spearman rho checked!
| Name | Type | Description |
|---|---|---|
X | Double() | - |
Y | Double() | - |
IEnumerable(Of NamedValue(Of Double())), ICorrelation)输入的数据为一个对象属性的集合,默认的compute计算方法为Correlations.GetPearson()
| Name | Type | Description |
|---|---|---|
data | IEnumerable(Of NamedValue(Of Double())) |
|
compute | ICorrelation | Using pearson method as default if this parameter is nothing. (默认的计算形式为Correlations.GetPearson()) |
默认使用Pearson相似度
will regularize the unusual case of complete correlation
A this tiny value for avoid divid ZERO
IEnumerable(Of T), IEnumerable(Of T), Func(Of Object, Object, Boolean))