ROCDataAccessors {kebabs} | R Documentation

## ROCData Accessors

### Description

ROCData Accessors

### Usage

    ## 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

    ## 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)

[Package kebabs version 1.26.1 Index]