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

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

[复制链接]
发表于 2012-9-27 22:46:23 | 显示全部楼层 |阅读模式
rocplus(rocplus)
rocplus()所属R语言包:rocplus

                                        ROC, Precision Recall, Convex Hull and other plots
                                         ROC,精密召回,凸包和其他图

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

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

Creates single and multiple ROC plots, precision-recall, Bayes plots and others. The plots may be either rough or smooth with confidence limits. Threshold values, optimum points and  other interesting points may be marked on the plots. The convex hull for multiple curves with blending fractions for interesting points may be obtained. The axes may have normal or lognormal scaling.
创建单个和多个号图,精确召回,贝氏图和其他人。上图可以是粗糙或光滑的置信限。阈值,最佳点和其他有趣的图,可能会被标记。与混合分数有趣的点对多条曲线的凸包可能获得。轴可能有正常的或对数正态分布的缩放。


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


        rocplus(control,treatment,title="",
        texture=c("smooth","rough","both"),
        plot.type=c("roc","senbayes","specbayes","threshbayes","precrecall"),
        axes.type=c("prob","norm","lognorm"),       
        points=FALSE,
        bands=FALSE,
        prevalence,
        skew,
        optimum.weight,
        markedPoints,
        convex.hull,
        conf.level=0.95)



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

参数:control
A vector, matrix, or list: see details.
一个向量,矩阵或列表:查看详细信息。


参数:treatment
A vector matrix or list: see details.
一个的向量矩阵或列表:查看详细信息。


参数:title
The title for the graph.
该图的标题。


参数:texture
A smooth plot or not.
光滑的曲线。


参数:plot.type
ROC or Bayes with Sensitivity or Bayes with Specificity or Bayes with thresholds or precision-recall
中华民国或贝叶斯灵敏度或特异性或贝叶斯的阈值精度召回贝叶斯


参数:axes.type
Probability, Normal, Lognormal.
概率,正常,对数正态分布。


参数:points
If TRUE, then threshold values will be marked on the curve.
如果TRUE,然后阈值曲线上的标记。


参数:bands
Show confidence bands on plot.
显示置信区间图。


参数:prevalence
Used by Bayes plots: the default is 0.5 if it is not specified. If it is specified  the optimum point will appear on the plots.
使用贝叶斯图:如果未指定,默认值是0.5。如果指定了最佳点上会出现的图。


参数:skew
is the ratio of population sizes for treatment over control. It sets prevalence to skew/(1+skew), and is available only for precision-recall calculations. If missing, prevalence  will be set to length(control)/(length(control)+length(treatment) for precision-recall calculations.
是治疗超过控制人口规模的比例。设置倾斜/(1 +偏移)的患病率,并仅适用于精密召回计算。如果缺少,患病率将被设置为长度(对照组)/(长度(对照)+长度(治疗),用于精确召回计算。


参数:optimum.weight
This will multiply treatment values when calculating the optimum point.  If prevalence is not set, setting  optimum.weight will make an optimum point appear on the plots.
这将成倍增加治疗的值时,计算最佳点。如果患病率不设置,设置optimum.weight的将作出的最佳点出现的图。


参数:markedPoints
(1) a vector or scalar of threshold values to be marked on the curve; or  (2) When convex.hull is TRUE, a vector of 1-Specificity values marking points on a convex hull
(1)阈值的矢量或标量曲线上的标记,或(2)当convex.hull为TRUE,一个向量的凸包上的标记点的1-特异性值


参数:convex.hull
When TRUE, a convex hull will be drawn for multiple plots.
TRUE时,将绘制多条曲线的凸包。


参数:conf.level
A probability for significance tests and confidence intervals.
的显着性检验和置信区间的概率。


Details

详细信息----------Details----------

control and treatment may be vectors of differing lengths. A single  curve will be drawn on the plot.
control和treatment可能是不同长度的向量。一个单一的曲线将被绘制在图上。

control and treatment may be matrices with the same number of columns, but the row lengths of the two may be different. Multiple curves will be drawn on the plot, one for  each column. If the control columns, have names, these will be drawn to mark the curves.
control和treatment可能是矩阵的列数相同,但可能是不同的两个行长度。多条曲线将被绘制的图,其中的每一列。如果控制列,有名字,将被吸引到这些标记的曲线。

control and treatment may be lists with the same number of elements in each: for example control = list(a=1:3,b=c(2.7,8,3,9.1,10.5). The elements from each list will be successively processed as control and treatment to produce multiple curves on the plot. The curves will be labeled with the names from the  control list. Lists allow multiple curves to be draw when control and treatment have do not have the same number of values.
control和treatment可能是在每个相同数目的元素:例如control = list(a=1:3,b=c(2.7,8,3,9.1,10.5)列表。从每个列表中的元素将陆续control和treatment产生多条曲线上的图处理。曲线会被标记的名称从control名单。列表允许多条曲线绘制,当control和treatment有没有相同数量的值。

The Bayes plots, show a Bayesian estimate on the vertical axis and a sensitivity,  1-Specificity or threshold value on the horizontal. For sensitivity, A, 1-specificity, B, and  prevalence, p, the Bayesian estimate is (Ap)/((Ap)+B(1-p). This is the “precision”  part of a precision-recall plot. The recall is of course 1-specificity. If p is the  prevalence of a disease in a population, then the Bayes estimate is an estimate of  the probability that an        an individual who exceeds the the corresponding threshold,  will have the disease.
的Bayes图,显示在垂直轴上的贝叶斯估计和灵敏度,1  - 特异性或阈值的水平上。灵敏度,特异性,B,和患病率,P,贝叶斯估计是(AP)/((鸭)+ B(1-P),这是“精确”的一部分,一个精密召回图此次召回是1特异性当然,如果p是一种疾病,在人群中的患病率,然后贝叶斯估计是个人超过相应的阈值,将有疾病的概率的估计。

The optimum point is the point on the curve whose likelihood, L, is equal to or greater than (1-prevalence)/prevalence which makes the optimum point the point at which the sum of the two errors, (1-sensitivity and 1-specificity), are minimized. See the vignette for  details. If an optimum.weight, w, is present, this will be taken as a weight on the treatment errors  making them worth w times the control errors. In this case the optimum point will be the  point at which the sum of (1-sensitivity)*optimum.weight and  (1-specificity) is minimized.
的最佳点是在该曲线上的点的可能性,L,是等于或大于(1发病率)/患病率这使得最佳点的点的两个错误的总和,(1-灵敏度和1  - 特异性),被最小化。有关详细信息,请参阅的小插曲。如果的optimum.weight,w,是本,这将被当作治疗上的重量的错误,这使它们值得w次控制误差。在这种情况下的最佳点,将在该点的总和(1  - 灵敏度)* optimum.weight和(1  - 特异性)被最小化。

Precision-recall sets prevalence to skew/(1+skew). It is in fact a relabeling of a Bayes-sensitivity plot. Users may find it convenient to extract random samples from the treatment and  control populations, and then uses skew to adjust the plots so that they are similar to those that use all data from both populations. If skew is not specified for a  precision-recall plot, it will be set, as given above, using the lengths of the two input vectors, which makes the plot the same as one in which precision is calculated in the usual way.
精密召回设置患病歪斜/(1 +偏移)。它其实是一个重新贴标签的一个贝叶斯敏感性图。用户可能会发现它方便地提取从治疗组和对照人群的随机样本,然后使用歪斜调整图,使它们是相似的那些使用的所有数据从两个群体。如果歪斜的没有指定一个精密召回图,,它会被设置,如上面给出的,使用的长度的两个输入向量,这使得在其中之一计算精度,在通常的方式的相同的图。

Multiple plots with a convex hull and marked points will output a table with six columns. The row labels show the names of the curves blended for each marked point. The values alpha and 1-alpha are the blending proportions. The resulting Sensitivity and 1-Specificity are shown as well as the threshold values for the two curves. To achieve the blended  value in practice, one may sample the two curves, using the blending values as frequencies and the appropriate threshold values as cut-off criteria.       
多条曲线的凸包和标记点,将输出一个表有六列。行标签显示的名称对每个标记点的曲线混合。的值α和1-α的配合比例。所得的灵敏度和1  - 特异性,以及示出两条曲线的阈值。要实现混合值在实践中,人们可以品尝两条曲线,作为频率和切断的标准的适当的阈值,作为使用的混合值。


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

Either a ROC, a Bayes or a precision-recall plot will be drawn. In addition, a list will be  ouput with elements depending on which parameters are set. The elements of the list are:
无论是中华民国,贝氏或一个精密召回图的绘制。此外,将输出功率和一个列表的元素,这取决于参数设置。的列表中的元素是:

(1) AUC – the AUC with a p-value and confidence limits.
(1)的AUC  - 的AUC与p值和置信限。

(2) optimum – The optimum point with its location and a confidence interval on the vertical axis value.
(2)最适 - 与它的位置上的垂直轴的值的置信区间的最佳点。

(3) TIES – The percentage of ties in the combined control-treatment set.
(3)关系 - 在合并控制治疗组的比例关系。

(4) Marked.points – If there are threshold values, the list will contain a table of these,  their locations and confidence intervals on the vertical axis values.
(4)Marked.points  - 如果有阈值,该列表将包含这些的表,它们的位置和在垂直轴的值的置信区间。

(5) Marked.points – When doing multiple plots and when        convex.hull is true, the list will contain a table indicating the way curves are blended to obtain the points.
(5)Marked.points的 - 执行多条曲线和当convex.hull是真实的,该列表将包含一个表指示的方式是混合曲线获得。


注意----------Note----------

There is a vignette with more details and an example. To access it, type
详细信息和实例有一个小插曲。要访问它,

vignette("rocplus")
小插曲(rocplus“)


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



Bob Wheeler <a href="mailto:bwheelerg@gmail.com">bwheelerg@gmail.com</a>


Please cite this program as follows:


Wheeler, R.E. (2011). rocplus <EM>rocplus</EM>. The R project for statistical computing <a href="http://www.r-project.org/">http://www.r-project.org/</a>




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



        aA<-c(0,1,7,8,10,14,16,17,20,31)
        aB<-c(6,13,15,18,19,21,22,25,28,34)

        # A bare bones ROC plot[一个光秃秃的骨头ROC曲线]
        rocplus(aA,aB)
        # A simple ROC plot with threshold values[一个简单的ROC曲线与阈值]
        rocplus(aA,aB,points=TRUE)
        # The same with 95% confidence bands[同95%的置信区间]
        rocplus(aA,aB,points=TRUE,bands=TRUE)
        # or[或]
        rocplus(aA,aB,po=TRUE,ban=TRUE)
        # The same plot, but rough not smooth[同样的图,但粗糙不光滑]
        rocplus(aA,aB,points=TRUE,bands=TRUE,texture="rough")
        # A plot with an optimum point[一个图的最佳点]
        rocplus(aA,aB,points=TRUE,bands=TRUE,prevalence=0.3)
        # And one with treatment errors weighted by four[和一个加权四个治疗误区]
        # Note: because prevalence is not specified, it is take as 0.5.[注:因为没有被指定,患病率是0.5。]
        rocplus(aA,aB,points=TRUE,bands=TRUE,optimum.weight=4)
        # Here it is again with prevalence specified[在这里,它是指定的发生率]
        rocplus(aA,aB,points=TRUE,bands=TRUE,prevalence=0.3,optimum.weight=4)


        # A Bayes plot with sensitivity on the x-axis. By default[一个贝氏曲线在x轴的灵敏度。默认情况下,]
        # prevalence is taken as 0.5[患病率取0.5]
        rocplus(aA,aB,points=TRUE,bands=TRUE,plot.type="senbayes")
        # The same with a realistic prevalence[同一个现实的患病率]
        rocplus(aA,aB,points=TRUE,bands=TRUE,plot.type="senbayes",prevalence=0.03)
        # One with 1-specificity on the x-axis[在x-轴与1  - 特异性之一]
        rocplus(aA,aB,points=TRUE,bands=TRUE,plot.type="specbayes",prevalence=0.03)
        # A Bayes probability plot with thresholds on the x-axis.[一个贝叶斯概率曲线与x轴的阈值。]
        rocplus(aA,aB,points=TRUE,bands=TRUE,plot.type="threshbayes")

        # A Precision-Recall plot: aA and aB are the same length so skew=1[一个精密召回图:AA和AB的长度是相同歪斜= 1]
        rocplus(aA,aB,points=TRUE,bands=TRUE,plot.type="precrecall")
        # The same for skewed populations[同为倾斜的人口]
        rocplus(aA,aB,points=TRUE,bands=TRUE,plot.type="precrecall",skew=4)
       


        # Changing the axes to normal[更改轴正常]
        rocplus(aA,aB,points=TRUE,bands=TRUE,plot.type="senbayes",axes.type="norm")

        # With two marked ponts[有两个显着的蓬]
        rocplus(aA,aB,points=TRUE,bands=TRUE,markedPoints=c(10,22))

        # Compare a smooth plot with a rough plot[用粗糙的图比较光滑的图]
        rocplus(aA,aB,texture="both")

        # A multiple plot. [一个多图。]
        ym<-matrix(c(102,59,61,90,55,18,46,35,69,49,136,71,25,66,125,74,95,55,100,51,67,147,28,130),12,2)
        xm<-2*(ym[1:10,]-10)
        colnames(xm)<-c("One","Two")
        rocplus(xm,ym,"A multiple plot",points=FALSE)

        # A multiple plot with a convex hull and marked points[一个多图的凸包和标记点]
        rocplus(xm,ym,"A multiple plot with a convex hull",convex.hull=TRUE,markedPoints=c(.2,.5,.05))

        # Using lists[使用列表]
        ym<-list(alpha=ym[,1],beta=ym[,2])
        xm<-list(alpha=xm[,1],beta=xm[,2])
        rocplus(xm,ym,"A multiple plot using lists")

        # Distributions with different variances: Note the upward bend at the right.[不同的方差分布:注意在右边的向上弯曲。]
        ym<-rnorm(100,2,4)
        xm<-rnorm(100)
        rocplus(xm,ym,"Differing variances",points=TRUE,bands=TRUE)


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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-11-25 14:58 , Processed in 0.023626 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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