SWAP.GetKTSP.Result: Function for prediction followed by computing various...

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

View source: R/exportedFuncs.R

Description

Given a kTSP classifier and data matrix and class labels, calculates the predictions and vote sums and then applies SWAP.GetKTSP.PredictionStats.

Usage

1
2
SWAP.GetKTSP.Result(classifier, inputMat, Groups, 
  classes=NULL, predictions=FALSE, decision_values=FALSE)

Arguments

classifier

a k-TSP classifier computed using SWAP.KTSP.Train or SWAP.Train.1TSP.

inputMat

is a matrix of data with rows being the features (such as gene names, if the matrix if gene expression data) and columns being the samples.

Groups

is a factor or a vector providing the phenotype class each sample belongs to. It should correspond to the order of samples given by the columns of inputMat.

classes

is a vetor of length 2 providing the two phenotype or class labels of Groups.

predictions

is a logical indicating whether to return the predictions or not.

decision_values

is a logical indicating whether to return the decision values or not.

Value

A list with items:

stats

A vector providing accuracy, sensitivity, specificity, balanced accuracy, and AUC.

roc

An ROC curve object produced by the pROC package.

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.GetKTSP.PredictionStats

Examples

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

require(pROC)

### train 1-TSP
classifier = SWAP.Train.1TSP(matTraining, trainingGroup)

### get performance results
SWAP.GetKTSP.Result(classifier, matTesting, testingGroup)$stats

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