SWAP.KTSP.LOO: Performs leave one out cross validation.

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

View source: R/exportedFuncs.R

Description

Performs leave one out cross validation; then it combines prediction votes by dividing the vote sums by the number of TSPs in each fold to produce an overall cross-validation result.

Usage

1
SWAP.KTSP.LOO(inputMat, Groups, classes = NULL, ...)

Arguments

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.

...

any further arguments to be passed on for k-TSP training.

Value

A list with items:

loo

A list containing the classifier, training performance and testing performance for each fold.

decision_values

Decision values obtained for each left-out sample.

predictions

Predicted classes for each left-out sample.

stats

Overall peformance results.

roc

ROC curve object for overall performance.

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.CV

Examples

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

require(pROC)

### perform leave one out cross-validation
result = SWAP.KTSP.LOO(matTraining, trainingGroup, featureNo=100)

### print results
result$stats

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