Description Usage Arguments Value Accessor-like methods Author(s) References Examples
ROCData Accessors
1 2 | ## S4 method for signature 'ROCData'
auc(object)
|
object |
an object of class |
auc
: returns a numeric value
tpr
: returns a numeric vector
fpr
: returns a numeric vector
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.
Johannes Palme <kebabs@bioinf.jku.at>
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.
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.