plotRelevance {asmbPLS} | R Documentation |
Relevance plot for asmbPLS-DA
Description
Function to visualize the most relevant features (relevant to the outcome) in each block.
Usage
plotRelevance(fit.results, n.top = 10, ncomp = 1, block.name = NULL)
Arguments
fit.results |
The output of |
n.top |
A integer indicating the number of the most relevant features to
be displayed for each block. The default is 10. If the number of selected
features in the block is smaller than |
ncomp |
Which component to plot from each block. Should not be larger
than the number of PLS components used ( |
block.name |
A vector containing the named character for each block. It must be ordered and match each block. |
Details
The function returns a plot to show the most relevant features for each block.
Value
none
Examples
## Use the example dataset
data(asmbPLSDA.example)
X.matrix = asmbPLSDA.example$X.matrix
Y.matrix.binary = asmbPLSDA.example$Y.matrix.binary
Y.matrix.multiclass = asmbPLSDA.example$Y.matrix.morethan2levels
X.dim = asmbPLSDA.example$X.dim
PLS.comp = asmbPLSDA.example$PLS.comp
quantile.comb = asmbPLSDA.example$quantile.comb
## asmbPLSDA fit for binary outcome
asmbPLSDA.fit.binary <- asmbPLSDA.fit(X.matrix = X.matrix,
Y.matrix = Y.matrix.binary,
PLS.comp = PLS.comp,
X.dim = X.dim,
quantile.comb = quantile.comb,
outcome.type = "binary")
## asmbPLSDA fit for categorical outcome with more than 2 levels
asmbPLSDA.fit.multiclass <- asmbPLSDA.fit(X.matrix = X.matrix,
Y.matrix = Y.matrix.multiclass,
PLS.comp = PLS.comp,
X.dim = X.dim,
quantile.comb = quantile.comb,
outcome.type = "multiclass")
## visualization to show the most relevant features in each block
plotRelevance(asmbPLSDA.fit.binary)
plotRelevance(asmbPLSDA.fit.multiclass)
## custom n.top and block.name
plotRelevance(asmbPLSDA.fit.binary,
n.top = 5,
block.name = c("mRNA", "protein"))
plotRelevance(asmbPLSDA.fit.multiclass,
n.top = 7,
block.name = c("miRNA", "protein"))
[Package asmbPLS version 1.0.0 Index]