mc.roc: Generate ROC curves from several classifiers

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/mcfct.r

Description

Convenience function to generate a ROC curve from several runs and iterations for one model or a selection of models contained in a mc.acc object (see details mc.agg). This function allows the averaging of several ROC curves produced on each data partitioning of the resampling strategy (i.e cross-validation runs repeated or not several times). Three methods are available to perform the averaging: "horiz" (horizontal), "vert" (vertical) and "thres" (thresholding). (see reference for further details). The default value ("all") means that each data points from individual ROC curves are strictly concatenated into a single ROC curve.

Usage

1
2
3
mc.roc(mc.obj, lmod = 1, method = "all")
## Default S3 method:
mc.roc(mc.obj, lmod = 1, method = "all")

Arguments

mc.obj

mc.agg object - See details mc.agg

lmod

List of models to be considered - Default: all of them

method

Aggregation method ("all", "thres", "vert", "horiz")

Value

roc.list object is a list of two components:

roc

List of ROC curves of length equal to the number of models. For each curve true positive (tpr), false positive rate (fpr), decision boundary threshold (thres) and type (type) of ROC aggregation are given.

cldef

Identical to cldef in mc.agg.

Author(s)

David Enot [email protected]

References

Fawcett, T. (2004). ROC graphs: notes and practical considerations for researchers. Technical Report HPL-2003-4

See Also

plot.mc.roc,mc.agg

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
data(iris)
dat=as.matrix(iris[,1:4])
cl=as.factor(iris[,5])
lrnd=sample(1:150)[1:50]
cl[lrnd]=sample(cl[lrnd])
pars   <- valipars(sampling = "cv",niter = 2, nreps=10)
dat1=dat.sel1(dat,cl,pwise="virginica",mclass=NULL,pars=pars)

res1=lapply(dat1,function(x) accest(x,clmeth="lda"))
res2=lapply(dat1,function(x) accest(x,clmeth="randomForest",ntree=50))
mc=mc.agg(res1,res2)

roc.sv=mc.roc(mc,lmod=1:4,method="thres")
print(roc.sv)

wilsontom/FIEmspro documentation built on Feb. 19, 2018, 9:03 a.m.