找回密码
 注册
查看: 683|回复: 0

R语言 qpgraph包 qpAnyGraph()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-2-26 11:38:30 | 显示全部楼层 |阅读模式
qpAnyGraph(qpgraph)
qpAnyGraph()所属R语言包:qpgraph

                                         A graph
                                         一个图

                                         译者:生物统计家园网 机器人LoveR

描述----------Description----------

Obtains an undirected graph from a matrix of pairwise measurements
获得成对测量矩阵的无向图


用法----------Usage----------


qpAnyGraph(measurementsMatrix, threshold=NULL, remove=c("below", "above"),
           topPairs=NULL, decreasing=TRUE, pairup.i=NULL, pairup.j=NULL,
           return.type=c("adjacency.matrix", "edge.list", "graphNEL", "graphAM"))



参数----------Arguments----------

参数:measurementsMatrix
matrix of pairwise measurements.
矩阵成对测量。


参数:threshold
threshold on the measurements below or above which pairs of variables are assumed to be disconnected in the resulting graph.
低于或高于测量阈值对变量被假定为在图断开。


参数:remove
direction of the removal with the threshold. It should be either "below" (default) or "above".
拆除阈值的方向。它应该是"below"(默认)或"above"。


参数:topPairs
number of edges from the top of the ranking, defined by the pairwise measurements in measurementsMatrix, to use to form the resulting graph. This parameter is incompatible with a value different from NULL in threshold.
从排名的顶部边缘,定义由measurementsMatrix,成对的测量使用形成的结果图的数目。此参数是不同的值从NULLthreshold不相容。


参数:decreasing
logical, only applies when topPairs is set; if TRUE then the ranking is made in decreasing order; if FALSE then is made in increasing order.
逻辑,只适用于设置topPairs时;如果TRUE然后递减顺序排名;如果FALSE然后在递增顺序。


参数:pairup.i
subset of vertices to pair up with subset pairup.j
顶点子集,子集pairup.j配对


参数:pairup.j
subset of vertices to pair up with subset pairup.i
顶点子集,子集pairup.i配对


参数:return.type
type of data structure on which the resulting undirected graph should be returned. Either a logical adjacency matrix with cells set to TRUE when the two indexing variables are connected in the graph (default), or a list of edges in a matrix where each row corresponds to one edge and the two columns contain the two vertices defining each edge, or a graphNEL-class object, or a graphAM-class object.
类型的数据结构造成的无向图上应退还。无论是与单元时图中的(默认),或边矩阵中的每一行对应一个边缘和两列包含定义每条边的两个顶点列表连接两个索引变量设置为TRUE的逻辑邻接矩阵或graphNEL-class对象,或graphAM-class对象。


Details

详情----------Details----------

This function requires the graph package when return.type=graphNEL or return.type=graphAM.
此功能需要包graph时return.type=graphNEL或return.type=graphAM。


值----------Value----------

The resulting undirected graph as either an adjacency matrix, a graphNEL object or a graphAM object, depending on the value of the return.type parameter. Note that when some gold-standard graph is available for comparison, a value for the parameter threshold can be found by calculating a precision-recall curve with qpPrecisionRecall with respect to this gold-standard, and then using qpPRscoreThreshold. Parameters threshold and topPairs are mutually exclusive, that is, when we specify with topPairs=n that we want a graph with n edges then threshold cannot be used.
由此产生的无向图的邻接矩阵graphNEL对象或graphAM对象的,这取决于上return.type参数值。请注意,一些黄金标准图进行比较时,参数threshold值可以计算qpPrecisionRecall就这个黄金标准,然后使用精密召回曲线qpPRscoreThreshold。参数threshold和topPairs是相互排斥的,也就是说,当我们用topPairs=n指定我们想要一个图n边缘,然后threshold不能使用。


作者(S)----------Author(s)----------


R. Castelo and A. Roverato



参考文献----------References----------

Gaussian graphical model search from microarray data with p larger than n, J. Mach. Learn. Res., 7:2621-2650, 2006.

参见----------See Also----------

qpNrr qpAvgNrr qpEdgeNrr qpGraph qpGraphDensity qpClique qpPrecisionRecall qpPRscoreThreshold
qpNrrqpAvgNrrqpEdgeNrrqpGraphqpGraphDensityqpCliqueqpPrecisionRecallqpPRscoreThreshold


举例----------Examples----------


require(mvtnorm)

nVar <- 50  ## number of variables[#变量]
maxCon <- 5 ## maximum connectivity per variable[#最大连接每个变量]
nObs <- 30  ## number of observations to simulate[#号观测到模拟]

set.seed(123)

A <- qpRndGraph(p=nVar, d=maxCon)
Sigma <- qpG2Sigma(A, rho=0.5)
X <- rmvnorm(nObs, sigma=as.matrix(Sigma))

## estimate Pearson correlations[#估计皮尔逊相关]
pcc.estimates <- qpPCC(X)

## the higher the threshold[#较高的阈值]
g <- qpAnyGraph(abs(pcc.estimates$R), threshold=0.9,
                remove="below")

## the sparser the qp-graph[#稀疏的QP图]
(sum(g)/2) / (nVar*(nVar-1)/2)

## the lower the threshold[#阈值较低]
g <- qpAnyGraph(abs(pcc.estimates$R), threshold=0.5,
                remove="below")

# the denser the graph[密集图]
(sum(g)/2) / (nVar*(nVar-1)/2)

转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。


注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|小黑屋|生物统计家园 网站价格

GMT+8, 2025-2-1 01:52 , Processed in 0.022927 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表