Description Usage Arguments Value Author(s) References See Also Examples
View source: R/exportedFuncs.R
Trains a kTSP on given training data and provides
getkTSPResult
output for both training and
testing data.
1 2 3 | 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.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ### 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
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.