KTSP.Train: Funtion for training the K-TSP classifier.

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

View source: R/forBackwardCompatibility.R

Description

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.

Usage

1
KTSP.Train(data, situation, n)

Arguments

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.

Value

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.

Author(s)

Bahman Afsari bahman.afsari@gmail.com, Luigi Marchionni marchion@jhu.edu

References

See switchBox for the references.

See Also

KTSP.Classify, SWAP.KTSP.Train,

Examples

 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

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