decompose: waveST decomposition

decomposeR Documentation

waveST decomposition

Description

Decompose input in waveST object with wavelet transformation and threshold

Usage

decompose(
  waveST,
  wavemethod = c("raw", "wave"),
  decom_method = c("SVD", "EBMF"),
  K = NULL,
  bar = 500,
  wf = "d4",
  J = 5,
  thresholdMethod = "manual",
  tau = 0
)

Arguments

waveST

an waveST class

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, K, useless if is already given, see "details"

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

Details

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.

Value

a waveST object with output updated, see "details"

Examples

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)

OliverXUZY/waveST documentation built on June 9, 2024, 6:18 a.m.