Description Usage Arguments Value Author(s) References See Also Examples
SWAP.CalculateScores
calculates the pair-wise scores
between features pairs. The user may pass a filtering function
to reduce the number of starting features, or provide a restricted
set of pairs to limit the reported scores to this list. The user
can also pass a score-calculating function by either passing one of the
scoring functions available in the package(i.e.
SWAP.Calculate.SignedTSPScores
and SWAP.Calculate.BasicTSPScores
)
or a custom function.
1 2 3 | SWAP.CalculateScores(inputMat, phenoGroup, classes = NULL, FilterFunc = SWAP.Filter.Wilcoxon,
RestrictedPairs = NULL, handleTies = FALSE, verbose = FALSE,
score_fn = signedTSPScores, score_opts = list(), ...)
|
inputMat |
is a numerical matrix containing the
measurements (e.g., gene expression data)
to be used to build the K-TSP classifier.
The columns represent samples and the
rows represent the features (e.g., genes).
The number of columns must agree
with the length of |
phenoGroup |
is a factor containing the training phenotypes with two levels. |
classes |
is a character vector of length 2 providing the phenotype class labels (case followed by control). If NULL, the levels of phenoGroup will be taken as the labels. |
FilterFunc |
is a filtering function to reduce the
starting number of features to be used to identify the
Top Scoring Pairs (TSPs). The default filter is based on
the Wilcoxon rank-sum test
and alternative filtering functions can be passed too
(see |
RestrictedPairs |
is a character matrix with two columns
containing the feature pairs to be considered for score calculations.
Each row should contain a pair of feature names matching the
|
handleTies |
is a logical value indicating whether tie handling should be enabled or not. FALSE by default. |
verbose |
is a logical value indicating whether status messages will be printed or not throughout the function. FALSE by default. |
score_fn |
is a function for calculating TSP scores.
By default, the signed TSP scores as calculated by
|
score_opts |
is a list of additional variables that
will be passed on to the scoring function as the |
... |
Additional argument passed to the filtering
function |
The output is a list containing the following items:
labels |
the levels (phenotypes) in |
score |
is a vector containing the pair-wise scores. |
Bahman Afsari bahman.afsari@gmail.com, Luigi Marchionni marchion@jhu.edu, Wikum Dinalankara wdinala1@jhmi.edu
See switchBox for the references.
See SWAP.KTSP.Train
,
SWAP.Filter.Wilcoxon
,
SWAP.Calculate.BasicTSPScores
,
SWAP.Calculate.SignedTSPScores
,
and SWAP.KTSP.Statistics
.
1 2 3 4 5 6 7 8 | ### Load gene expression data for the training set
data(trainingData)
### Show group variable for the TRAINING set
table(trainingGroup)
### Compute the scores using all features (a matrix will be returned)
scores <- SWAP.CalculateScores(matTraining, trainingGroup, FilterFunc=NULL)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.