rpuDist(rpud)
rpuDist()所属R语言包:rpud
Compute the distance matrix with GPU
与GPU计算距离矩阵
译者:生物统计家园网 机器人LoveR
描述----------Description----------
This function computes the distance between each vector of the 'points' argument using the metric specified by 'method'.
此函数计算每个向量之间的距离,使用的度量指定的方法的点的说法。
用法----------Usage----------
rpuDist(points, method = "euclidean", diag = FALSE, upper = FALSE, p = 2)
参数----------Arguments----------
参数:points
a matrix of floating point numbers in which each row is a vector in $R^n$ space where $n$ is ncol(points).
浮点数矩阵中的每一行是一个向量,$ R ^ N $其中$ n $为NCOL(点)的空间。
参数:method
a string representing the name of the metric to use to calculate the distance between the vectors of 'points'. Currently supported values are: "binary", "canberra", "euclidean", "manhattan", "maximum", and "minkowski".
一个字符串,表示使用的度量来计算距离向量之间的“点”的名称。当前支持的值是:"binary","canberra","euclidean","manhattan","maximum"和"minkowski"。
参数:diag
logical value indicating whether the diagonal of the distance matrix should be printed by print.dist.
逻辑值,该值指示是否应印有print.dist对角线的距离矩阵。
参数:upper
logical value indicating whether the upper triangle of the distance matrix should be printed by print.dist.
逻辑值,该值指示是否应印上三角的距离矩阵的print.dist。
参数:p
The power of the Minkowski distance.
闵可夫斯基距离的力量。
值----------Value----------
a class of type "dist" containing floating point numbers representing the distances between vectors from the 'points' argument.
一类类型“区”,包含浮点数代表之间的距离向量的点的说法。
参见----------See Also----------
dist, gpuDist
区,gpuDist
实例----------Examples----------
numVectors <- 5
dimension <- 10
Vectors <- matrix(runif(numVectors*dimension), numVectors, dimension)
rpuDist(Vectors, "euclidean")
rpuDist(Vectors, "maximum")
rpuDist(Vectors, "manhattan")
rpuDist(Vectors, "canberra")
rpuDist(Vectors, "binary")
rpuDist(Vectors, "minkowski")
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|