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

R语言 ROCR包 plot-methods()函数中文帮助文档(中英文对照)

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

                                        Plot method for performance objects
                                         为表现对象的绘制方法

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

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

This is the method to plot all objects of class
这是绘制所有类的对象的方法


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


## S4 method for signature 'performance,missing':
plot(x, y, ..., avg="none", spread.estimate="none",
  spread.scale=1, show.spread.at=c(), colorize=FALSE,
  colorize.palette=rev(rainbow(256,start=0, end=4/6)),
  colorkey=colorize, colorkey.relwidth=0.25, colorkey.pos="right",
  print.cutoffs.at=c(), cutoff.label.function=function(x) { round(x,2) },
  downsampling=0, add=FALSE )



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

参数:x
an object of class performance
一个对象的类performance


参数:y
not used
不使用


参数:...
Optional graphical parameters to adjust different components of the performance plot. Parameters are directed to their target component by prefixing them with the name of the component (component.parameter, e.g. text.cex). The following components are available: xaxis, yaxis, coloraxis, box (around the plotting region), points, text, plotCI (error bars), boxplot. The names of these components are influenced by the R functions that are used to create them. Thus, par(component) can be used to see which parameters are available for a given component (with the expection of the three axes; use par(axis) here). To adjust the canvas or the performance curve(s), the standard plot parameters can be used without any prefix.
可选的图形参数调整不同的组件的性能图。参数被定向到目标组件的组件的名称(前缀component.parameter,例如text.cex)。以下部件:xaxis,yaxis,coloraxis,box(约绘图区),points,text,plotCI(误差线),boxplot。这些组件的名称是由R的函数,用于创建它们的影响。因此,par(component)可以用来查看哪些参数可用于一个给定的组分(与在三个轴的可望使用par(axis)这里)。要调整画布或性能曲线(S),标准plot参数可以使用不带任何前缀。


参数:avg
If the performance object describes several curves (from cross-validation runs or bootstrap evaluations of one particular method), the curves from each of the runs can be averaged. Allowed values are none (plot all curves separately), horizontal (horizontal averaging), vertical (vertical averaging), and threshold (threshold (=cutoff) averaging). Note that while threshold averaging is always feasible, vertical and horizontal averaging are not well-defined if the graph cannot be represented as a function x->y and y->x, respectively.
如果性能对象介绍了几种曲线(交叉验证运行评估一个特定的方法或引导),可以平均运行曲线。允许的值是none(积所有的曲线分别),horizontal(水平平均),vertical(垂直平均),和threshold(阈值(截止)平均)。请注意,虽然阈值平均总是可行的,纵向和横向的平均不能很好定义的作为的函数的X> y和y->的x,如果该图不能表示。


参数:spread.estimate
When curve averaging is enabled, the variation around the average curve can be visualized as standard error bars (stderror), standard deviation bars (stddev), or by using box plots (boxplot). Note that the function plotCI, which is used internally by ROCR to draw error bars, might raise a warning if the spread of the curves at certain positions is 0.
当启用时,各地的平均曲线的变化曲线平均可以可视化的标准误差线(stderror),的标准偏差条形(stddev),或通过使用箱线图(boxplot) 。注意的功能plotCI,内部使用ROCR得出错误的条形,可能会引发一个警告,如果在某些位置的曲线的传播为0。


参数:spread.scale
For stderror or stddev, this is a scalar factor to be multiplied with the length of the standard error/deviation bar. For example, under normal assumptions, spread.scale=2 can be used to get approximate 95% confidence intervals.
对于stderror或stddev,这是一个标量系数的标准误差/偏差栏的长度乘以。例如,在正常的假设,spread.scale=2可以用来获得约95%的置信区间。


参数:show.spread.at
For vertical averaging, this vector determines the x positions for which the spread estimates should be visualized. In contrast, for horizontal and threshold averaging, the y positions and cutoffs are determined, respectively. By default, spread estimates are shown at 11 equally spaced positions.
对于垂直平均,这个向量确定的价差估计值应该是可视化的x位置。相反,对于水平和阈值平均,确定的y位置和截断,分别。默认情况下,价差估计值显示,在11个等距的位置。


参数:colorize
This logical determines whether the curve(s) should be colorized according to cutoff.
此逻辑决定的彩色曲线(S)应根据截止。


参数:colorize.palette
If curve colorizing is enabled, this determines the color palette onto which the cutoff range is mapped.
如果启用了曲线着色,这决定了调色板映射到截止范围。


参数:colorkey
If true, a color key is drawn into the 4% border region (default of par(xaxs) and par(yaxs)) of the plot. The color key visualizes the mapping from cutoffs to colors.
如果为true,色键被抽入4%的边界区域(默认par(xaxs)和par(yaxs))的图。颜色键可视化映射从截断的颜色的。


参数:colorkey.relwidth
Scalar between 0 and 1 that determines the fraction of the 4% border region that is occupied by the colorkey.
标量介于0和1的确定的馏分colorkey的所占用的4%的边界区域。


参数:colorkey.pos
Determines if the colorkey is drawn vertically at the right side, or horizontally at the top of the plot.
确定了colorkey垂直right侧,或水平top的图。


参数:print.cutoffs.at
This vector specifies the cutoffs which should be printed as text along the curve at the corresponding curve positions.
向量指定的临界值应印有文字沿曲线在相应的曲线位置。


参数:cutoff.label.function
By default, cutoff annotations along the curve or at the color key are rounded to two decimal places before printing. Using a custom cutoff.label.function, any other  transformation can be performed on the cutoffs instead (e.g. rounding with different precision or taking the logarithm).
默认情况下,截止沿曲线或注释的颜色键四舍五入到小数点后两位在打印前。使用自定义cutoff.label.function,任何其他的变换可以进行的截断,而不是(例如,具有不同精度的舍入或取对数)。


参数:downsampling
ROCR can efficiently compute most performance measures even for data sets with millions of elements. However, plotting of large data sets can be slow and lead to PS/PDF documents of considerable size. In that case, performance curves that are indistinguishable from the original can be obtained by using only a fraction of the computed performance values. Values for downsampling between 0 and 1 indicate the fraction of the original data set size to which the performance object should be downsampled, integers above 1 are interpreted as the actual number of performance values to which the curve(s) should be downsampled.
ROCR可以有效地计算最佳性能的措施,即使数据集数以百万计的元素。但是,策划大型数据集可能是缓慢的,具有相当规模的PS / PDF文件。在这种情况下,从原来的是无法区分的性能曲线仅使用所计算的性能值的一小部分,可以通过以下方式获得。下采样在0和1之间的值表示该性能对象应下采样的原始数据集的大小的馏分,性能值,以该曲线(s)应该被下采样的实际数目被解释为1以上的整数。


参数:add
If TRUE, the curve(s) is/are added to an already existing plot; otherwise a new plot is drawn.
如果TRUE,曲线(S)/被添加到一个已经存在的图,否则一个新的绘图绘制。


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


Tobias Sing <a href="mailto:tobias.sing@mpi-sb.mpg.de">tobias.sing@mpi-sb.mpg.de</a>,
Oliver Sander <a href="mailtosander@mpi-sb.mpg.de">osander@mpi-sb.mpg.de</a>



参考文献----------References----------



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

prediction, performance,
prediction,performance,


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


# plotting a ROC curve:[绘制ROC曲线:]
library(ROCR)
data(ROCR.simple)
pred <- prediction( ROCR.simple$predictions, ROCR.simple$labels )
perf <- performance( pred, "tpr", "fpr" )
plot( perf )

# To entertain your children, make your plots nicer[要招待你的孩子,让你的图更好]
# using ROCR's flexible parameter passing mechanisms[使用ROCR灵活的参数传递机制]
# (much cheaper than a finger painting set)[(便宜得多的手指画设定)]
par(bg="lightblue", mai=c(1.2,1.5,1,1))
plot(perf, main="ROCR fingerpainting toolkit", colorize=TRUE,
  xlab="Mary's axis", ylab="", box.lty=7, box.lwd=5,
  box.col="gold", lwd=17, colorkey.relwidth=0.5, xaxis.cex.axis=2,
  xaxis.col='blue', xaxis.col.axis="blue", yaxis.col='green', yaxis.cex.axis=2,
  yaxis.at=c(0,0.5,0.8,0.85,0.9,1), yaxis.las=1, xaxis.lwd=2, yaxis.lwd=3,
  yaxis.col.axis="orange", cex.lab=2, cex.main=2)

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-11-25 16:53 , Processed in 0.022476 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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