Skip to content

Commit

Permalink
DOC: names of sparseness algorithms
Browse files Browse the repository at this point in the history
  • Loading branch information
stnava committed Sep 12, 2024
1 parent 9b189e5 commit 0dc2580
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions R/multiscaleSVDxpts.R
Original file line number Diff line number Diff line change
Expand Up @@ -1713,7 +1713,7 @@ orthogonalizeAndQSparsifyOld <- function(
#' @param orthogonalize Run Gram-Schmidt if TRUE.
#' @param softThresholding Use soft thresholding if TRUE.
#' @param unitNorm Normalize each vector to unit norm if TRUE.
#' @param sparsenessAlg If specified, use rank-based matrix segmentation algorithm ("orthorank" or "basic").
#' @param sparsenessAlg If specified, use a matrix partition algorithm ("orthorank", "spmp", "sum_preserving_matrix_partition" or "basic").
#' @return A sparsified and optionally orthogonalized matrix.
#' @examples
#' mat <- replicate(100, rnorm(20))
Expand All @@ -1725,7 +1725,7 @@ orthogonalizeAndQSparsify <- function(
orthogonalize = TRUE, softThresholding = FALSE, unitNorm = FALSE, sparsenessAlg = NA
) {
if (!is.na(sparsenessAlg)) {
if ( sparsenessAlg == "spmp" ) return( t(sum_preserving_matrix_partition( t(v) )) )
if ( sparsenessAlg %in% c("spmp","sum_preserving_matrix_partition") ) return( t(sum_preserving_matrix_partition( t(v) )) )
basic <- sparsenessAlg != "orthorank"
return(rankBasedMatrixSegmentation(v, sparsenessQuantile, basic = basic, positivity = positivity, transpose = TRUE))
}
Expand Down
2 changes: 1 addition & 1 deletion man/orthogonalizeAndQSparsify.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 0dc2580

Please sign in to comment.