ROCDataAccessors: ROCData Accessors

Description Usage Arguments Value Accessor-like methods Author(s) References Examples

Description

ROCData Accessors

Usage

1
2
## S4 method for signature 'ROCData'
auc(object)

Arguments

object

an object of class ROCData

Value

auc: returns a numeric value
tpr: returns a numeric vector
fpr: returns a numeric vector

Accessor-like methods

auc: returns the area under the ROC curve.

tpr: returns the true positive rate values as numeric vector.

fpr: returns the false positive rate values as numeric vector.

Author(s)

Johannes Palme <kebabs@bioinf.jku.at>

References

http://www.bioinf.jku.at/software/kebabs

J. Palme, S. Hochreiter, and U. Bodenhofer (2015) KeBABS: an R package for kernel-based analysis of biological sequences. Bioinformatics, 31(15):2574-2576, 2015. DOI: 10.1093/bioinformatics/btv176.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
## create kernel object for normalized spectrum kernel
specK5 <- spectrumKernel(k=5)
## Not run: 
## load data
data(TFBS)

## select 70% of the samples for training and the rest for test
train <- sample(1:length(enhancerFB), length(enhancerFB) * 0.7)
test <- c(1:length(enhancerFB))[-train]

## perform training - feature weights are computed by default
model <- kbsvm(enhancerFB[train], yFB[train], specK5, pkg="LiblineaR",
               svm="C-svc", cost=15)
preddec <- predict(model, enhancerFB[test], predictionType="decision")
rocdata <- computeROCandAUC(preddec, yFB[test], allLabels=unique(yFB))

## accessor for auc
auc(rocdata)

## End(Not run)

kebabs documentation built on Nov. 8, 2020, 7:38 p.m.