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

R语言 verification包 roc.plot()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-10-1 15:23:26 | 显示全部楼层 |阅读模式
roc.plot(verification)
roc.plot()所属R语言包:verification

                                        Relative operating characteristic curve.
                                         相对的工作特性曲线。

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

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

This function creates Receiver Operating Characteristic (ROC) plots for one or more models.  A ROC curve plots the false alarm rate against the hit rate for a probablistic forecast for a range of thresholds. The area under the curve is viewed as a measure of a forecast's accuracy.  A measure of 1 would indicate a perfect model.  A measure of 0.5
这个函数创建了一个或多个模型的受试者工作特征(ROC)曲线。一个曲线图的误报率对命中率的机率性的阈值范围的预测。曲线下的面积被视为预测的准确度的量度。措施1表示一个完美的模型。措施0.5


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


    ## Default S3 method:
roc.plot(x, pred, thresholds = NULL, binormal =
FALSE,   legend = FALSE, leg.text = NULL,  plot = "emp", CI = FALSE,
n.boot = 1000, alpha = 0.05, tck = 0.01, plot.thres = seq(0.1,
0.9, 0.1), show.thres = TRUE, main = "ROC Curve", xlab = "False Alarm Rate", ylab = "Hit Rate", extra = FALSE,  ...)
## S3 method for class 'prob.bin'



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

参数:x
A binary observation (coded {0, 1 } ) or a verification object.
一个二进制观察(编码{0,1})或验证对象。


参数:pred
A probability prediction on the interval [0,1].  If multiple models are compared, this may be a matrix where each column represents a different prediction.
的概率预测在区间[0,1]。如果多个模型进行比较时,这可能是一个矩阵,其中每一列代表一个不同的预测。


参数:thresholds
Thresholds may be provided. These thresholds will be used to calculate the hit rate ($h$) and false alarm rate ($f$).  If thresholds is NULL, all unique thresholds are used as a threshold. Alternatively, if the number of bins is specified,  thresholds will be calculated using the specified numbers of quantiles.  
阈值可以被提供。这些阈值将被用来计算的命中率($ H $)和误报率($ F $)。如果阈值是NULL,独特的阈值作为一个阈值。另外,如果指定箱的数目,阈值将被使用指定数量的位数计算。


参数:binormal
If TRUE, in addition to the empirical ROC curve, the binormal ROC curve will be calculated.  To get a plot draw, plot must be either “binorm” or “both”.   
如果设置为TRUE,除了经验的ROC曲线,来计算副法线ROC曲线。要获得一个图抽奖,图必须或者“binorm”或“既”。


参数:legend
Binomial.  Defaults to FALSE indicating whether a legend should be displayed.
二项式。默认为false,指示是否应显示一个传奇。


参数:leg.text
Character vector for legend.  If NULL, models are labeled  “Model A", “Model B",...
字符向量传说。如果为NULL,模型被标记为“A型”,“B型”,...


参数:plot
Either “emp” (default), “binorm” or “both” to determine which plot is shown.  If set to NULL, a plot is not created
“EMP”(默认值)中,“binorm”或“既”确定的曲线图显示。如果设置为NULL,有一个图是没有创建


参数:CI
Confidence Intervals.  Calculated by bootstrapping the observations and prediction, then calculating PODy and PODn values.   
置信区间。通过引导的意见和预测,然后,的计算PODy和PODn值计算。


参数:n.boot
Number of bootstrap samples.
bootstrap样本数量。


参数:alpha
Confidence interval.  By default = 0.05
置信区间。默认情况下,= 0.05


参数:tck
Tick width on confidence interval whiskers.
勾选置信区间晶须的宽度。


参数:plot.thres
By default, displays the threshold levels on the ROC diagrams.  To surpress these values, set it equal to NULL.  If confidence intervals (CI) is set to TRUE, levels specified here will determine where confidence interval boxes are placed.  
默认情况下,显示的阈值水平的ROC图。对于光强调这些值,设置它等于为NULL。如果可信区间(CI)被设置为TRUE,在这里指定的水平确定的置信区间箱子放在那里。


参数:show.thres
Show thresholds for points indicated by plot.thres.  Defaults to TRUE.
显示阈值的点表示plot.thres。默认为true。


参数:main
Title for plot.
对图的标题。


参数:xlab, ylab
Plot axes labels.  Defaults to “Hit Rate” and “False Alarm Rate”, for the y and x axes respectively.  
图轴标签。默认的“命中率”和“虚警率”,分别为y和x轴。


参数:extra
Extra text describing binormal and empirical lines.  
额外的文字,描述副法线和经验线。


参数:...
Additional plotting options.
额外的打印选项。


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

If assigned to an object, the following values are reported.
如果分配到一个对象,以下值被报道。


参数:plot.data
The data used to generate the ROC plots.  This is a array. Column headers are thresholds, empirical hit and false alarm rates, and binormal hit and false alarm rates.  Each model is depicted on an array indexed by the third dimension.
所使用的数据生成的ROC图。这是一个数组。列标题的阈值,经验命中率和误报,以及副法线的命中率和误报。每个模型所描述的第三个维度索引的数组。


参数:roc.vol
The areas under the ROC curves.  By default,this is printed on the plots.  Areas and p-values are calculated with and without adjustments for ties along with the p-value for the area.  These values are calculated using roc.area.  The fifth column contains the area under the binormal curve, if binormal is selected.
ROC曲线下面积。默认情况下,这是印刷上的图。区和p-值计算带和不带一起为区域的p-值的关系的调整。这些值的计算使用roc.area。第五列中包含的副法线曲线下的面积,如果选择了副法线。


参数:A.boot
If confidence intervals are calculated, the area under the ROC curve are returned.  
如果计算的置信区间,返回的ROC曲线下的面积。


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

Other packages in R provide functions to create ROC diagrams and different diagnostics.  The ROCR package provides excellent functions to generate ROC diagrams with lines coded by threshold.  Large datasets are handled by a sampling routine and the user may plot a number of threshold dependent, contingency table scores.  Arguably, this is a superior package with respect to ROC plotting.
R中的其他软件包提供的功能来创建ROC图和不同的诊断。 ROCR包提供了出色的功能,产生ROC图线编码的阈值。大型数据集的处理由采样例程,并且用户可以绘制数阈值依赖,应变表分数。可以说,这是一种高级的包中华民国绘制。

There is not a minimum size required to create confidence limits or show thresholds.  When there are few data points, it is possilbe to make some pretty unattractive graphs.
没有建立信任限制或显示阈值所需的最小尺寸。当有几个数据点,它是possilbe的做一些非常没有吸引力的图形。

The roc.plot method can be used to summarize a "verify, prob.bin" class object created with the verify command.  It is appropriate to use the roc plot for forecast which are not probabilities, but rather forecasts made on a continuous scale.  The roc plot function can be used to summarize such forecasts but it is not possible to use the verify function to summarize such forecasts.  An example is shown below.
roc.plot方法可以用来总结“验证,prob.bin”级的验证命令创建的对象。这是适当的使用ROC曲线的预测,是不是概率,而是预测,在一个连续的规模。 ROC曲线函数可以用来概括这样的预测,但它使用的验证功能来概括这种预测是不可能的。的一个例子如下所示。


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


Matt Pocernich <pocernic@rap.ucar.edu>



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

Aust. Met. Mag 30 (1982) 291-303.  
relative operating characteristics (ROC) and relative operating levels (ROL) curves: Statistical significance and interpretation, ” Q. J. R. Meteorol. Soc. 128 pp. 2145-2166.  
in Psychology and Diagnostics, Lawrence Erlbaum Associates, Inc.

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

pop   and lines.roc
pop 和lines.roc


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


# Data from Mason and Graham article.[数据从梅森和格雷厄姆文章。]

a<- c(0,0,0,1,1,1,0,1,1,0,0,0,0,1,1)
b<- c(.8, .8, 0, 1,1,.6, .4, .8, 0, 0, .2, 0, 0, 1,1)
c<- c(.928,.576, .008, .944, .832, .816, .136, .584, .032, .016, .28, .024, 0, .984, .952)

A<- data.frame(a,b,c)
names(A)<- c("event", "p1", "p2")

## for model with ties[关系模型#]
roc.plot(A$event, A$p1)

## for model without ties[#为模型,没有打领带]
roc.plot(A$event, A$p2)

### show binormal curve fit.[##展示双正态曲线拟合。]

roc.plot(A$event, A$p2, binormal = TRUE)

# icing forecast[结冰预测]

data(prob.frcs.dat)
A <- verify(prob.frcs.dat$obs, prob.frcs.dat$frcst/100)
roc.plot(A, main = "AWG Forecast")


# plotting a ``prob.bin'' class object.[绘制一个prob.bin“类对象。]
obs<- round(runif(100))
pred<- runif(100)

A<- verify(obs, pred, frcst.type = "prob", obs.type = "binary")

roc.plot(A, main = "Test 1", binormal = TRUE, plot = "both")

## show confidence intervals.  MAY BE SLOW[#显示的置信区间。可能是缓慢的]
roc.plot(A, threshold = seq(0.1,0.9, 0.1), main = "Test 1", CI = TRUE,
alpha = 0.1)

###   example from forecast verification website. [##例如从预测验证的网站。]
data(pop)
pop.convert() ## internal function used to make binary observations for the pop figure.[#内部功能的使用,使二进制的意见,在弹出的数字。]
### note the use of bins = FALSE !![##注意使用的箱= FALSE!]
mod24 <- verify(d$obs_norain, d$p24_norain, bins = FALSE)

mod48 <- verify(d$obs_norain, d$p48_norain, bins = FALSE)

roc.plot(mod24, plot.thres = NULL)
lines.roc(mod48, col = 2, lwd = 2)
leg.txt <- c("24 hour forecast", "48 hour forecast")
legend( 0.6, 0.4, leg.txt, col = c(1,2), lwd = 2)


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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-11-26 22:45 , Processed in 0.022505 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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