View source: R/multiscaleSVDxpts.R
orthogonalizeAndQSparsify | R Documentation |
This function implements a quantile-based sparsification operation.
orthogonalizeAndQSparsify(
v,
sparsenessQuantile = 0.5,
positivity = "either",
orthogonalize = TRUE,
softThresholding = FALSE,
unitNorm = FALSE,
sparsenessAlg = NA
)
v |
Input matrix |
sparsenessQuantile |
Quantile to control sparseness - higher is sparser |
positivity |
Restrict to positive or negative solution (beta) weights. Choices are "positive", "negative", or "either". |
orthogonalize |
Run Gram-Schmidt if TRUE. |
softThresholding |
Use soft thresholding if TRUE. |
unitNorm |
Normalize each vector to unit norm if TRUE. |
sparsenessAlg |
If specified, use a matrix partition algorithm ("orthorank", "spmp", "sum_preserving_matrix_partition" or "basic"). |
A sparsified and optionally orthogonalized matrix.
mat <- replicate(100, rnorm(20))
mat <- orthogonalizeAndQSparsify(mat)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.