Skip to content

Commit

Permalink
BUG: need interpret to work with signed vec
Browse files Browse the repository at this point in the history
  • Loading branch information
stnava committed Feb 14, 2025
1 parent c83d76d commit 5fb52b1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/multiscaleSVDxpts.R
Original file line number Diff line number Diff line change
Expand Up @@ -5595,7 +5595,7 @@ interpret_simlr_vector2 <- function( simlrResult, simlrVariable, n2show = 5, sho
# If 'n2show' is NULL or greater than the length of t1vec, use the length of t1vec
n_items_to_show <- if (is.null(n2show)) length(t1vec) else min(c(n2show, length(t1vec)))
t1vec_sorted <- head(t1vec[order(abs(t1vec), decreasing = TRUE)], n_items_to_show)
# if ( all(t1vec_sorted < 0 ) ) t1vec_sorted=abs(t1vec_sorted)
if ( all(t1vec <= 0 ) ) t1vec_sorted=abs(t1vec_sorted)
# Filter out non-significant values (absolute value > 0)
t1vec_filtered <- t1vec_sorted[abs(t1vec_sorted) > 0]
if ( return_dataframe ) {
Expand Down

0 comments on commit 5fb52b1

Please sign in to comment.