Samples the distances in the input dimensions to get the maximum distance
样片在输入尺寸的距离,以获得最大的距离
译者:生物统计家园网 机器人LoveR
描述----------Description----------
The maxmium distance in the input dimensions is required to generate a value of the neighborhood radius. For datasets with >1000 observations an all pairs calculation is prohibitive. Instead probability sampling is used so that two points are randomly chosen and their distance is calculated. This is repeated for a user specified number of times and the maximum distance obtained is kept track of and returned at the end.
在输入尺寸的距离的maxmium需要生成一个周边的半径值。 > 1000个观测数据集,所有对计算是行不通的。相反概率抽样是用来使两个点是随机选择的,和它们之间的距离来计算。这是重复的次数为用户指定的,并得到的最大距离被保持跟踪的末尾返回。
参数:coord
The input data in matrix form. If present in a data.frame it will be coerced to a matrix
矩阵形式中的输入数据。如果数据框将被强制转换为矩阵
参数:nobs
The number of observations (rows of the input matrix should be the same as the rows of the embedding matrix) If it is not specified nobs will be taken as nrow(coord)
观测值的个数(应该是相同的为包埋矩阵的行的输入矩阵的行),如果未指定诺布斯将作为NROW采取(经纬度)
参数:ndim
The number of input dimensions. If not specified it will be taken as ncol(coord)
输入尺寸的数量。如果没有指定,将被视为NCOL(经纬度)
参数:samplesize
The number of iterations for probability sampling. For a dataset of 6070 observations there will be 6070x6069/2 pairwise distances. The default value gives a close approximation and runs fast. If you want a better approximation 1e7 is a good value. YMMV
迭代概率抽样的数量。对于6070的观测数据集会有6070x6069 / 2成对距离。从预设值非常接近,运行速度快。如果你想要一个更好的近似1E7是一个很好的价值。 YMMV
值----------Value----------
Returns the value of the maxmium distance found as a single number
返回值作为一个单一的数字的maxmium距离