notablyDistant(yaImpute)
notablyDistant()所属R语言包:yaImpute
Find notably distant targets
尤其是遥远的目标
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Notably distant targets are those with relatively large distances from the closest reference observation. A suitable threshold is used to detect large distances.
值得注意的是遥远的目标是那些有比较大的距离最近的参考观察。一个合适的阈值用于检测大距离。
用法----------Usage----------
notablyDistant(object,kth=1,threshold=NULL,p=0.01,method="distribution")
参数----------Arguments----------
参数:object
an object of class yai.
对象类yai。
参数:kth
the kth neighbor is used.
第k个邻居使用。
参数:threshold
the thereshold distance that identifies notably large distances between observations.
thereshold的距离,标识特别大的观测值之间的距离。
参数:p
(1-p)*100 is the percentile point in the distribution of distances used to compute the threshold (only used when threshold is NULL).
(1-p)*100是分布的百分位点的距离来计算阈值(仅用于当阈值是NULL)。
参数:method
the method used to compute the threshold, see details.
所使用的方法来计算阈值,见详情。
Details
详细信息----------Details----------
When threshold is NULL, the function computes one using one of two methods. When method is "distribution", assumption is made that distances follow the lognormal distribution, unless the method used to find neighbors is randomForest, in which case the distances are assumed to follow the beta distribution. A specified p value is used to compute the threshold, which is the point in the distribution where a fraction, p, of the neighbors are larger than the threshold.
当threshold是NULL,函数计算使用以下两种方法之一。当method是“分配”,假设是的距离遵循对数正态分布,除非所使用的方法发现邻居randomForest,在这种情况下的距离分别假设为Beta分布。一个指定的p这个值是用来计算threshold,这是点的分布其中的一小部分,p,邻居们都大于threshold。
When method is "quantile", the function uses the quantile function with probs=1-p.
当method是“分量”,该函数使用quantile与probs=1-p函数。
值----------Value----------
List of two data frames that contain 1) the references that are notably distant from other references, 2) the targets that are notably distant from the references, 3) the threshold used, and 4) the method used.
两个数据框包含1)的引用,特别是远离其他参考文献,2)使用的目标,特别是远离的引用,3)所使用的阈值,和4)的方法的列表。
(作者)----------Author(s)----------
Nicholas L. Crookston <a href="mailto:ncrookston.fs@gmail.com">ncrookston.fs@gmail.com</a> <br>
Andrew O. Finley <a href="mailto:finleya@msu.edu">finleya@msu.edu</a>
参见----------See Also----------
notablyDifferent yai
notablyDifferentyai
实例----------Examples----------
data(iris)
set.seed(12345)
# form some test data[形成一些测试数据。]
refs=sample(rownames(iris),50)
x <- iris[,1:3] # Sepal.Length Sepal.Width Petal.Length[Sepal.Length Sepal.Width Petal.Length]
y <- iris[refs,4:5] # Petal.Width Species[Petal.Width物种]
# build an msn run, first build dummy variables for species.[建立一个MSN运行,首先建立虚拟变量的物种。]
sp1 <- as.integer(iris$Species=="setosa")
sp2 <- as.integer(iris$Species=="versicolor")
y2 <- data.frame(cbind(iris[,4],sp1,sp2),row.names=rownames(iris))
y2 <- y2[refs,]
names(y2) <- c("Petal.Width","Sp1","Sp2")
msn <- yai(x=x,y=y2,method="msn")
notablyDistant(msn)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|