Description Usage Arguments Value Author(s) References See Also Examples
View source: R/exportedFuncs.R
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.
1 2 | SWAP.GetKTSP.PredictionStats(predictions, truth, classes=NULL,
decision_values=NULL)
|
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. |
A vector providing accuracy, sensitivity, specificity, and balanced accuracy
, and if decision_values
is prodvided, area under the ROC curve (AUC).
Bahman Afsari bahman.afsari@gmail.com, Luigi Marchionni marchion@jhu.edu, Wikum Dinalankara wdinala1@jhmi.edu
See switchBox for the references.
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.