Replies: 1 comment
-
Hi @WiedenWei, assuming you're using a for col in matrix.col_iter_mut() {
// Number of non-zero entries in column
let col_nnz = col.nnz();
for entry in col.values_mut() {
*entry = // divide by col_nnz, multiply, log-transform and so on
}
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, all
I have large sparse matrix (single cell rna count matrix, typically 40000*10000) in hand, and I am new to nalgrebra, the doc is hard to read for me, how do I normalize data in large sparse matrix effectively. For example, counts for each column are divided by the total counts for that column and multiplied by a scale factor, then natural-log transformed. Are there any buildin routines for that, instead of iteration. Or anyone has a clue? Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions