向量以及统计函数拓展
Extensions
01 Syntax
02 Methods
| Name | Overloads | Summary |
|---|---|---|
| Shadows | 1 | Create the vector model from target .NET object collection. |
| FlipCoin | 1 | |
| SSM | 1 | 计算两个离散信号之间的相似度 |
| SSM_SIMD | 1 | SIMD version of the modified cosine score |
| AsVector | 4 | Create a Vector from a given subset of the dynamics object property values. |
| FDR | 1 | FDR错误控制法是Benjamini于1995年提出一种方法,通过控制FDR(False Discovery Rate)来决定P值的域值. |
| BHCorrection | 1 | Benjamini-Hochberg FDR校正 控制错误发现率 (False Discovery Rate) |
| BonferroniCorrection | 1 | Bonferroni 多重检验校正:p_adj = min(1, n * p)。 |
| HolmCorrection | 1 | Holm 步降(step-down)多重检验校正。 |
| HochbergCorrection | 1 | Hochberg 步升(step-up)多重检验校正。 |
| BenjaminiHochbergCorrection | 1 | Benjamini-Hochberg FDR 校正(支持检验总数 n >= length(p))。 |
| BenjaminiYekutieliCorrection | 1 | Benjamini-Yekutieli FDR 校正(依赖条件下的 FDR 控制)。 |
| HommelCorrection | 1 | Hommel 多重检验校正。 |
| PValueAdjust | 1 | 通用的 p 值多重检验校正入口,对应 R 的 p.adjust。 |
| Iterates | 1 | Tuple range iterates |
| FirstDecrease | 1 | 返回数值序列之中的首次出现符合条件的减少的位置 |
| FirstIncrease | 1 | 只对单调递增的那一部分曲线有效 |
| Reach | 1 | |
| seq2 | 1 | [Sequence Generation] Generate regular sequences. |
| Sim | 1 | 余弦相似度 |
| Tanimoto | 1 | 这是x和y所共有的属性个数与x或y所具有的属性个数之间的比率。这个函数被称为Tanimoto系数或Tanimoto距离, 它经常用在信息检索和生物学分类中。(余弦度量的一个简单的变种) 当属性是二值属性时,余弦相似性函数可以用共享特征或属性解释。假设如果xi=1,则对象x具有第i个属性。于是, x·y是x和y共同具有的属性数,而xy是x具有的属性数与y… |
03 Members
IEnumerable(Of ``0))Create the vector model from target .NET object collection.
| Name | Description |
|---|---|
T |
| Name | Type | Description |
|---|---|---|
source | IEnumerable(Of ``0) | - |
Int32, Int32)| Name | Type | Description |
|---|---|---|
headsCutoff | Int32 | 这个参数用来调整事件的发生概率,这个参数值越小,事件越容易发生 |
ntimes% | Int32 | - |
计算两个离散信号之间的相似度
Double(), Double())SIMD version of the modified cosine score
| Name | Type | Description |
|---|---|---|
q | Double() | - |
s | Double() | - |
IEnumerable(Of Double))Construct the Vector class from a numeric collecton.
| Name | Type | Description |
|---|---|---|
data | IEnumerable(Of Double) | - |
Vector(Of Int32))Create a Vector from a specific Int32 abstract vector.
| Name | Type | Description |
|---|---|---|
v | Vector(Of Int32) | - |
Vector(Of Double))Create a Vector from a specific numeric collection.
| Name | Type | Description |
|---|---|---|
v | Vector(Of Double) | - |
DynamicPropertyBase(Of Double), String())Create a Vector from a given subset of the dynamics object property values.
| Name | Type | Description |
|---|---|---|
data | DynamicPropertyBase(Of Double) | - |
keys$ | String() | - |
IEnumerable(Of Double), Nullable(Of Int32))FDR错误控制法是Benjamini于1995年提出一种方法,通过控制FDR(False Discovery Rate)来决定P值的域值. 假设你挑选了R个差异表达的基因,其中有S个是真正有差异表达的,另外有V个其实是没有差异表达的,是假阳性的。 实践中希望错误比例Q=V/R平均而言不能超过某个预先设定的值(比如0.05),在统计学上, 这也就等价于控制FDR不能超过5%.
对所有候选基因的p值进行从小到大排序,则若想控制fdr不能超过q,则只需找到最大的正整数i,使得 p(i)<= (i*q)/m.然后,挑选对应p(1),p(2),...,p(i)的基因做为差异表达基因,这样就能从统计学上 保证fdr不超过q。因此,FDR的计算公式如下
FDR = length(pvalue)*pvalue/rank(pvalue)
| Name | Type | Description |
|---|---|---|
pvalue | IEnumerable(Of Double) | - |
IEnumerable(Of Double))Benjamini-Hochberg FDR校正
控制错误发现率 (False Discovery Rate)
| Name | Type | Description |
|---|---|---|
pValues | IEnumerable(Of Double) | 原始p值数组 |
校正后的q值数组 (与输入顺序一致)
IEnumerable(Of Double), Nullable(Of Int32))Bonferroni 多重检验校正:p_adj = min(1, n * p)。
| Name | Type | Description |
|---|---|---|
pValues | IEnumerable(Of Double) | 原始 p 值。 |
n | Nullable(Of Int32) | 检验总数;缺省为 p 值个数。 |
校正后的 p 值(保持输入顺序)。
IEnumerable(Of Double), Nullable(Of Int32))Holm 步降(step-down)多重检验校正。
对应 R p.adjust(method = "holm")。
| Name | Type | Description |
|---|---|---|
pValues | IEnumerable(Of Double) | 原始 p 值。 |
n | Nullable(Of Int32) | 检验总数;缺省为 p 值个数。 |
校正后的 p 值(保持输入顺序)。
IEnumerable(Of Double), Nullable(Of Int32))Hochberg 步升(step-up)多重检验校正。
对应 R p.adjust(method = "hochberg")。
| Name | Type | Description |
|---|---|---|
pValues | IEnumerable(Of Double) | 原始 p 值。 |
n | Nullable(Of Int32) | 检验总数;缺省为 p 值个数。 |
校正后的 p 值(保持输入顺序)。
IEnumerable(Of Double), Nullable(Of Int32))Benjamini-Hochberg FDR 校正(支持检验总数 n >= length(p))。
对应 R p.adjust(method = "BH")。
| Name | Type | Description |
|---|---|---|
pValues | IEnumerable(Of Double) | 原始 p 值。 |
n | Nullable(Of Int32) | 检验总数;缺省为 p 值个数。 |
校正后的 p 值(保持输入顺序)。
IEnumerable(Of Double), Nullable(Of Int32))Benjamini-Yekutieli FDR 校正(依赖条件下的 FDR 控制)。
对应 R p.adjust(method = "BY"),其中 q = Σ_{k=1..n} 1/k。
| Name | Type | Description |
|---|---|---|
pValues | IEnumerable(Of Double) | 原始 p 值。 |
n | Nullable(Of Int32) | 检验总数;缺省为 p 值个数。 |
校正后的 p 值(保持输入顺序)。
IEnumerable(Of Double), Nullable(Of Int32))Hommel 多重检验校正。
严格按照 R p.adjust(method = "hommel") 的实现移植 (Gordon Smyth 版本)。当 n == 2 时后退为 Hochberg 方法。
| Name | Type | Description |
|---|---|---|
pValues | IEnumerable(Of Double) | 原始 p 值。 |
n | Nullable(Of Int32) | 检验总数;缺省为 p 值个数。 |
校正后的 p 值(保持输入顺序)。
通用的 p 值多重检验校正入口,对应 R 的 p.adjust。
| Name | Type | Description |
|---|---|---|
pValues | IEnumerable(Of Double) | 原始 p 值。 |
method | PValueAdjustMethod | 校正方法。 |
n | Nullable(Of Int32) | 检验总数;缺省为 p 值个数。 |
校正后的 p 值(保持输入顺序)。
ValueTuple(Of Int32, Int32))Tuple range iterates
step 1 or -1 based on the to - from delta value its sign symbol.
| Name | Type | Description |
|---|---|---|
range | ValueTuple(Of Int32, Int32) | Number values iterates from value |
IEnumerable(Of Double), Double)返回数值序列之中的首次出现符合条件的减少的位置
| Name | Type | Description |
|---|---|---|
data | IEnumerable(Of Double) | - |
ratio | Double | - |
IEnumerable(Of Double), Double, Double)只对单调递增的那一部分曲线有效
| Name | Type | Description |
|---|---|---|
data | IEnumerable(Of Double) | y值 |
alpha | Double | - |
IEnumerable(Of Double), Double, Double)| Name | Type | Description |
|---|---|---|
data | IEnumerable(Of Double) | - |
n | Double | - |
offset | Double | 距离目标数据点n的正负偏移量 |
Double, Double, Double)[Sequence Generation] Generate regular sequences. seq is a standard generic with a default method.
| Name | Type | Description |
|---|---|---|
From | Double | the starting and (maximal) end values of the sequence. Of length 1 unless just from is supplied as an unnamed argument. |
To | Double | the starting and (maximal) end values of the sequence. Of length 1 unless just from is supplied as an unnamed argument. |
By | Double | number: increment of the sequence |
余弦相似度
这是x和y所共有的属性个数与x或y所具有的属性个数之间的比率。这个函数被称为Tanimoto系数或Tanimoto距离, 它经常用在信息检索和生物学分类中。(余弦度量的一个简单的变种) 当属性是二值属性时,余弦相似性函数可以用共享特征或属性解释。假设如果xi=1,则对象x具有第i个属性。于是, x·y是x和y共同具有的属性数,而xy是x具有的属性数与y具有的属性数的几何均值。于是,sim(x,y)是公共属性相 对拥有的一种度量。