| decompose | R Documentation |
Decompose input in waveST object with wavelet transformation and threshold
decompose(
waveST,
wavemethod = c("raw", "wave"),
decom_method = c("SVD", "EBMF"),
K = NULL,
bar = 500,
wf = "d4",
J = 5,
thresholdMethod = "manual",
tau = 0
)
waveST |
an |
wavemethod |
a vector showing whether whether we use wavelet transformation, "raw" means we decompose directly without wavelet technique, "wave" means we apply wavelet transformation and shrinkage technique |
decom_method |
Matrix decomposition method, "SVD" or "EBMF" |
K |
The estimated number of factors, use "elbow" method to estimate it if not given |
bar |
threshold for selecting number of factors, |
wf |
name of the wavelet filter to use |
J |
depth of the wavelet basis decomposition, must be a number less than or equal to log(min(M,N),2) |
thresholdMethod |
wavelet shrinkage method used "hybrid" thresholding or "manual" thresholding, see "details" |
tau |
constant threshold when using manual thresholding |
If the number of factors K is not given, the use bar to select K, it
conduct SVD first,only keep the singular values larger than bar, the number of
kept values are selected K.
The "hybrid" thresholding or "manual" thresholding, see \code{\link{WaveTransCoefs}}.
The output contains:
\enumerate{
\item \code{f} factor matrix, representing factor genes
\item \code{D} middle diagonal matrix
\item \code{l} loading matrix
\item \code{recon} The fitted reconstruction matrix, estimated data
}
If wavelet method is used, \code{f}, \code{D}, \code{l} cooresponding to the decomposition
result for coefficient matrix. \code{recon} is still the fitted matrix of original input.
a waveST object with output updated, see "details"
res = kOverA_ST(k = 3, A = 7)
viz = res$viz
df = res$df
wave = waveST(data = df[, 1:5], spatial = viz)
wave = decompose(wave, "raw", "SVD", K = 5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.