clique.census(sna)
clique.census()所属R语言包:sna
Compute Cycle Census Information
计算周期人口普查资料
译者:生物统计家园网 机器人LoveR
描述----------Description----------
clique.census computes clique census statistics on one or more input graphs. In addition to aggregate counts of maximal cliques, results may be disaggregated by vertex and co-membership information may be computed.
clique.census计算集团人口普查统计,在一个或多个输入图。除了总数量的最大派系,结果可能被分解的顶点和合作成员的信息,可以计算。
用法----------Usage----------
clique.census(dat, mode = "digraph", tabulate.by.vertex = TRUE,
clique.comembership = c("none", "sum", "bysize"), enumerate = TRUE)
参数----------Arguments----------
参数:dat
one or more input graphs.
一个或多个输入图表。
参数:mode
"digraph" for directed graphs, or "graph" for undirected graphs.
"digraph"对于有向图,或"graph"无向图。
参数:tabulate.by.vertex
logical; should maximal clique counts be tabulated by vertex?
逻辑,最大团数列的顶点吗?
参数:clique.comembership
the type of clique co-membership information to be tabulated, if any. "sum" returns a vertex by vertex matrix of clique co-membership counts; these are disaggregated by clique size if "bysize" is used. If "none" is given, no co-membership information is computed.
集团合作成员的信息的类型,制成表格,如果有的话。 "sum"返回一个顶点顶点矩阵的集团合作成员的计数,这些团大小分类"bysize"如果使用。 "none"如果,没有合作成员的信息计算。
参数:enumerate
logical; should an enumeration of all maximal cliques be returned?
逻辑,一个枚举的最大派系回来了吗?
Details
详细信息----------Details----------
A (maximal) clique is a maximal set of mutually adjacenct vertices. Cliques are important for their role as cohesive subgroups, but show up in many other contexts as well.
A(最大)集团是一个极大的一套相互adjacenct的顶点。派系是重要的,他们的亚组作为凝聚力的作用,但在许多其他情况下,以及。
A subgraph census statistic is a function which, for any given graph and subgraph, gives the number of copies of the latter contained in the former. A collection of subgraph census statistics is referred to as a subgraph census; widely used examples include the dyad and triad censuses, implemented in sna by the dyad.census and triad.census functions (respectively). Likewise, kpath.census and kcycle.census compute a range of census statistics related to k-paths and k-cycles. clique.census provides similar functionality for the census of maximal cliques, including:
甲的子图人口普查统计是一个函数,其中,对于任何给定的图和子图,给出后者包含在前者的副本的数目。被称为集合的子人口普查统计作为子普查;广泛使用的例子包括对子和黑社会普查,实施的snadyad.census和triad.census函数(分别)。同样,kpath.census和kcycle.census计算范围的普查统计k路径和k周期。 clique.census的最大派系的普查提供了类似的功能,包括:
Aggregate counts of maximal cliques by size.
总数的最大派系的大小。
Counts of cliques to which each vertex belongs (when tabulate.byvertex==TRUE).
计数的派系,每个顶点属于(当tabulate.byvertex==TRUE)。
Counts of clique co-memberships, potentially disaggregated by size (when the appropriate co-membership argument is set to bylength). </ul>
计数集团合作成员身份,可能会分列的大小(当适当的合作成员的参数设置为bylength)。 </ ul>
These calculations are intrinsically expensive (clique enumeration is NP hard in the general case), and users should be aware that computing the census can be impractical on large graphs (unless they are very sparse). On the other hand, the algorithm employed here (a variant of Makino and Uno (2004)) is generally fast enough to suport enumeration for even dense graphs of several hundred vertices on a typical desktop computer.
这些计算本质上是昂贵的(集团枚举在一般情况下是NP难),和用户应该知道,计算人口普查是不切实际的大图(除非他们是很稀少)。另一方面,在这里采用的算法(的变体,牧野和Uno(2004))一般是足够快,以服务支援甚至密集图的一个典型的台式计算机上的几百个顶点的枚举。
Calling this function with mode=="digraph", forces and initial symmetrization step, which can be avoided with mode=="graph". While incorrectly employing the default is harmless (except for the relatively small cost of verifying symmetry), setting mode=="graph" incorrectly may result in problematic behavior. When in doubt, stick with the default.
mode=="digraph",力量和的初始对称步骤,可避免与mode=="graph"调用此函数。虽然错误地采用默认情况下是无害的(除了核实对称的相对较小的成本),设置mode=="graph"不当,可能会导致错误的行为。当有疑问时,坚持使用默认。
值----------Value----------
A list with the following elements: <table summary="R valueblock"> <tr valign="top"><td>clique.count </td> <td> If tabulate.byvertex==FALSE, a vector of aggregate counts by clique size. Otherwise, a matrix whose first column is a vector of aggregate clique counts, and whose succeeding columns contain vectors of clique counts for each vertex.</td></tr> <tr valign="top"><td>clique.comemb </td> <td> If clique.comembership!="none", a matrix or array containing co-membership in cliques by vertex pairs. If clique.comembership=="sum", only a matrix of co-memberships is returned; if bysize is used, however, co-memberships are returned in a maxsize by n by n array whose i,j,kth cell is the number of cliques of size i containing j and k (with maxsize being the size of the largest maximal clique).</td></tr> <tr valign="top"><td>cliques </td> <td> If enumerate=TRUE, a list of length equal to the maximum clique size, each element of which is in turn a list of all cliques of corresponding size (given as vectors of vertices).</td></tr> </table>
列表包含下列元素:<table summary="R valueblock"> <tr valign="top"> <TD> clique.count </ TD> <TD>如果tabulate.byvertex==FALSE的向量,总集团规模的计数。否则,一个矩阵,它的第一列是一个向量总团数,和其随后的列的每个顶点包含集团的计数的向量。</ TD> </ TR> <tr valign="top"> <TD><X > </ TD> <TD>如果clique.comemb ,矩阵或数组,包含顶点对派系的合作成员。如果如果clique.comembership!="none",只有一个矩阵返回的合作会籍; clique.comembership=="sum"使用,但是,合作成员身份返回在一个bysize的maxsize<X >数组,其nTh单元派系的大小是多少n包含i,j,k和i(j最大的集团的规模最大的)</ TD> </ TR> <tr valign="top"> <TD> k </ TD> <TD>如果maxsize,长度等于最大团大小的列表其中的每个元素是在打开列表中的所有派系相应的尺寸为向量的顶点。</ TD> </ TR> </ TABLE>
警告----------Warning ----------
The computational cost of calculating cliques grows very sharply in size and network density. It is possible that the expected completion time for your calculation may exceed your life expectancy (and those of subsequent generations).
计算拉帮结派的计算成本,大小和网络密度的生长速度非常急剧。它可以为你计算的预计竣工时间可能会超过你的预期寿命(后代)。
(作者)----------Author(s)----------
Carter T. Butts <a href="mailto:buttsc@uci.edu">buttsc@uci.edu</a>
参考文献----------References----------
Wasserman, S. and Faust, K. (1994). Social Network Analysis: Methods and Applications. Cambridge: Cambridge University Press.
Makino, K. and Uno, T. (2004.) “New Algorithms for Enumerating All Maximal Cliques.” In T. Hagerup and J. Katajainen (eds.), SWAT 2004, LNCS 3111, 260-272. Berlin: Springer-Verlag.
参见----------See Also----------
dyad.census, triad.census, kcycle.census, kpath.census
dyad.census,triad.census,kcycle.census,kpath.census
实例----------Examples----------
#Generate a fairly dense random graph[生成一个相当密集的随机图]
g<-rgraph(25)
#Obtain cliques by vertex, with co-membership by size[获取派系的顶点,合作成员的大小]
cc<-clique.census(g,clique.comembership="bysize")
cc$clique.count #Examine clique counts[检查集团计数]
cc$clique.comemb[1,,] #Isolate co-membership is trivial[隔离会员是微不足道的]
cc$clique.comemb[2,,] #Co-membership for 2-cliques[2派系的成员]
cc$clique.comemb[3,,] #Co-membership for 3-cliques[-3-团的成员]
cc$cliques #Enumerate the cliques[枚举拉帮结派]
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|