Description Usage Arguments Value Author(s) References See Also Examples
View source: R/forBackwardCompatibility.R
KTSP.Train
trains a K-TSP classifier
for the specific phenotype of interest.
The classifiers resulting from using this function can be
passed to KTSP.Classify
for samples classification.
This function was used in Marchionni et al, 2013, BMC Genomics,
and it is maintained only for backward compatibility.
It has been replaced by SWAP.KTSP.Train
.
1 | KTSP.Train(data, situation, n)
|
data |
the matrix of the values (usually gene expression) to be used to train the classifier. The columns represents samples and the rows represents the genes. |
situation |
an integer vector containing the training labels. Its elements should be one or zero. |
n |
The number of disjoint TSP used for classification. If before n pairs, the score drops to zero, the TSP with zero score are ignored. |
The KTSP classifier, a list containing the following elements:
TSPs |
a matrix containing TSPs indexes. |
score |
a vector containing TSPs scores. |
geneNames |
a matrix containing TSPs feature names. |
It should be passed to KTSP.Classify for classification of test samples.
Bahman Afsari bahman.afsari@gmail.com, Luigi Marchionni marchion@jhu.edu
See switchBox for the references.
KTSP.Classify
,
SWAP.KTSP.Train
,
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | ##################################################
### Load gene expression data for the training set
data(trainingData)
### Turn into a numeric vector with values equal to 0 and 1
trainingGroupNum <- as.numeric(trainingGroup) - 1
### Show group variable for the TRAINING set
table(trainingGroupNum)
##################################################
### Train a classifier using default filtering function based on the Wilcoxon test
classifier <- KTSP.Train(matTraining, trainingGroupNum, n=8)
### Show the classifier
classifier
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.