SWAP.GetKTSP.PredictionStats {switchBox}R Documentation

Function for computing various performance measures related to prediction.

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

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


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


[Package switchBox version 1.22.0 Index]