calcSumProb(graph)
calcSumProb()所属R语言包:graph
Calculate the probability that a subgraph has an unusual number
子,有一个不寻常的数字,计算概率
译者:生物统计家园网 机器人LoveR
描述----------Description----------
For any graph a set of nodes can be used to obtain an induced subgraph (see subGraph). An interesting question is whether that subgraph has an unusually large number of edges. This function computes the probability that a random subgraph with the same number of nodes has more edges than the number observed in the presented subgraph. The appropriate probability distribution is the hypergeometric.
对于任何图一组节点可以被用来获取诱导子(见subGraph)。一个有趣的问题是,子是否有不寻常的大量的边缘。此函数计算的概率,与相同数量的节点随机子有比在子观察到的数量更多的边缘。相应的概率分布是超几何。
用法----------Usage----------
calcSumProb(sg, g)
参数----------Arguments----------
参数:sg
subgraph made from the original graph
子制成的原始图
参数:g
original graph object from which the subgraph was made
从该子了原来的图形对象
Details
详情----------Details----------
The computation is based on the following argument. In the original graph there are n nodes and hence N=n*(n-1)/2 edges in the complete graph. If we consider these N nodes to be of two types, corresponding to those that are either in our graph, g, or not in it. Then we think of the subgraph which has say m nodes and M=m*(m-1)/2 possible edges as representing M draws from an urn containing N balls of which some are white (those in g) and some are black. We count the number of edges in the subgraph and use a Hypergeomtric distribution to ask whether our subgraph is particularly dense.
计算是基于以下的论点。在原始图有n节点,从而在完整的图N=n*(n-1)/2边。如果我们考虑两种类型,相应的,那些在我们的图,N,或不这些g节点。然后,我们认为其中有说m节点M=m*(m-1)/2可能边缘为代表的“子图M吸引了来自金塔包含N球,其中有些是白色的(那些在 g),有些是黑色的。我们期望在子图边数和使用Hypergeomtric分布询问是否我们的子是特别密集。
值----------Value----------
The probability of having greater than or equal to the subgraph's number of edges is returned.
返回大于或等于子图的边数的概率。
作者(S)----------Author(s)----------
Elizabeth Whalen
参见----------See Also----------
calcProb
calcProb
举例----------Examples----------
set.seed(123)
V <- letters[14:22]
g1 <- randomEGraph(V, .2)
sg1 <- subGraph(letters[c(15,17,20,21,22)], g1)
calcSumProb(sg1, g1)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|