SWAP.GetKTSP.TrainTestResults {switchBox} | R Documentation |
Trains a kTSP on given training data and provides
getkTSPResult
output for both training and
testing data.
SWAP.GetKTSP.TrainTestResults(trainMat, trainGroup, testMat, testGroup, classes=NULL, predictions=FALSE, decision_values=FALSE, ...)
trainMat |
is a matrix of data for training with rows being the features (such as gene names, if the matrix if gene expression data) and columns being the samples. |
trainGroup |
is a factor or a vector providing the phenotype class
each training sample belongs to. It should correspond to the order of samples
given by the columns of |
testMat |
is a matrix of data for testing with rows being the features (such as gene names, if the matrix if gene expression data) and columns being the samples. |
testGroup |
is a factor or a vector providing the phenotype class
each testing sample belongs to. It should correspond to the order of samples
given by the columns of |
classes |
is a vetor of length 2 providing the two phenotype or class labels. |
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. |
... |
any further arguments to be passed on for k-TSP training. |
A list with items:
classifier |
The trained k-TSP classifier. |
train |
Training performance. |
train |
Testing performance. |
Bahman Afsari bahman.afsari@gmail.com, Luigi Marchionni marchion@jhu.edu, Wikum Dinalankara wdinala1@jhmi.edu
See switchBox for the references.
### Load gene expression data data(trainingData) data(testingData) require(pROC) ### perform training and testing result = SWAP.GetKTSP.TrainTestResults(matTraining, trainingGroup, matTesting, testingGroup, featureNo=100) ### view results result$train result$test