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

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

[复制链接]
发表于 2012-9-30 14:43:48 | 显示全部楼层 |阅读模式
prunecost(spdep)
prunecost()所属R语言包:spdep

                                        Compute cost of prune each edge
                                         计算成本修剪边缘

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

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

If any edge are dropped, the MST are pruned. This generate a two subgraphs. So, it makes a tree graphs and tree dissimilarity values are computed, one for each graph. The dissimilarity is the sum over sqared differences between the observactions in the nodes and mean vector of observations in the graph. The dissimilarity of original graph and the sum of dissimilarity of subgraphs are returned.
如果有任何边缘被丢弃,MST被删减。这产生两个子。因此,它使一个树图和计算树相异的值,为每个图形之一。的相异的总和超过sqared差异在图中的节点和观测值的平均矢量之间的observactions。返回相异原始图和子图的相异的总和。


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


prunecost(edges, data, method = c("euclidean", "maximum", "manhattan",
    "canberra", "binary", "minkowski", "mahalanobis"),
    p = 2, cov, inverted = FALSE)



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

参数:edges
A matrix with 2 colums with each row is one edge
用2 colums与每一行的矩阵是一个边缘


参数:data
A data.frame with observations in the nodes.
节点的观测数据框。


参数:method
Character or function to declare distance method. If method is character, method must be "mahalanobis" or "euclidean", "maximum", "manhattan", "canberra", "binary" or "minkowisk". If method is one of "euclidean", "maximum", "manhattan", "canberra", "binary" or "minkowisk", see dist for details, because this function as used to compute the distance. If method="mahalanobis", the mahalanobis distance is computed between neighbour areas. If method is a function, this function is used to compute the distance.
字符或函数的声明距离的方法。如果method是字符,方法必须是“马氏”或“欧氏”,“最大”,“曼哈顿”,“堪培拉”,“二”或“minkowisk”。如果method是一个“欧几里得”,“最大”,“曼哈顿”,“堪培拉”,“二”或“minkowisk”,dist的详细信息,因为这充当用于计算距离。如果method="mahalanobis",邻区之间的马氏距离计算。如果method是function,这个函数是用来计算距离。


参数:p
The power of the Minkowski distance.
闵可夫斯基距离的力量。


参数:cov
The covariance matrix used to compute the mahalanobis distance.
的协方差矩阵来计算马哈拉诺比斯距离。


参数:inverted
logical.  If 'TRUE', 'cov' is supposed to contain the inverse of the covariance matrix.
逻辑。如果“TRUE”,覆盖应该包含的协方差矩阵的逆。


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

A vector with the differences between the dissimilarity of all nodes and the dissimilarity sum of all subgraphs obtained by pruning one edge each time.
与相异的所有节点之间的差异和相异总和所有通过修剪获得的子图的一个边缘每次的向量。


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


Elias T. Krainski and Renato M. Assuncao



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

See Also as prunemst
此外,prunemst


实例----------Examples----------


d <- data.frame(a=-2:2, b=runif(5))
e <- matrix(c(1,2, 2,3, 3,4, 4,5), ncol=2, byrow=TRUE)

sum(sweep(d, 2, colMeans(d))^2)

prunecost(e, d)

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-6-18 02:26 , Processed in 0.024931 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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