Description Usage Arguments Value Note Author(s) See Also Examples
Prior to selecting genes it may be desirable to calculate weights
for each genes so that some genes are more likely than others to be
included in the gene signature all other things being equal. This
function will calculate an N x M weight matrix for N genes in data
and M unique classes in class
. The weights are based on
mean expression of each gene in each class such that genes that are
highly expressed on average in a given class will be weighted more
highly when scoring genes for that class.
The resulting weight matrix can be bassed to dksTrain
as
the weights
argument.
1 |
eset |
An |
class |
A factor with two or more levels indicating which class each sample in the expression set belongs OR an integer indicating which column of pData(eset) contains this information. |
An N x M matrix containing the weights for each gene and each class.
There are many metrics the user might want to use for weighting. This
convenience function just implements one of the most obvious ones.
The user can provide his/her own N x M weight matrix to dksTrain
.
The weight matrix calculated by this function will be calculated on the fly
if the weights
is set to TRUE when calling dksTrain
.
However, it multiple calls to dksTrain are being made (for example when
performing some type of optimization or validation), it will save a lot of
time if the weight matrix is pre-calculated by a call to this function and the
resulting matrix supplied directly to dksTrain
rather than having
it re-calculate the weight matrix every time.
Eric J. Kort
dksTrain
, dksSelectGenes
,
dksClassify
, DKSGeneScores
,
DKSPredicted
,
DKSClassifier
1 2 3 | data("dks")
wt <- dksWeights(eset, 1)
str(wt)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.