SWAP.GetKTSP.PredictionStats: Function for computing various performance measures related...

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

View source: R/exportedFuncs.R

Description

Given a list of predicted labels and true labels, provides accuracy, sensitivity, specificity, balanced accuracy (i.e. (sensitivity+specificity)/2 ), and AUC if decision values are given.

Usage

1
2
SWAP.GetKTSP.PredictionStats(predictions, truth, classes=NULL, 
  decision_values=NULL)

Arguments

predictions

is a vector or factor of predicted classes.

truth

is a vector or factor of the true class labels.

classes

is a character vector of length 2 providing the phenotype class labels (case followed by control). If NULL, the levels of phenoGroup will be taken as the labels.

decision_values

is a vector providing the decision values (such as sum of votes from a k-TSP classifier). Will be used to compute AUC if provided.

Value

A vector providing accuracy, sensitivity, specificity, and balanced accuracy , and if decision_values is prodvided, area under the ROC curve (AUC).

Author(s)

Bahman Afsari bahman.afsari@gmail.com, Luigi Marchionni marchion@jhu.edu, Wikum Dinalankara wdinala1@jhmi.edu

References

See switchBox for the references.

See Also

SWAP.KTSP.Classify

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
### Load gene expression data
data(trainingData)
data(testingData)

### train 1-TSP
classifier = SWAP.Train.1TSP(matTraining, trainingGroup)
predictions = SWAP.KTSP.Classify(matTesting, classifier)

### get performance results
SWAP.GetKTSP.PredictionStats(predictions, testingGroup)

switchBox documentation built on Nov. 8, 2020, 5:43 p.m.