Description Usage Arguments Value
This function filters an input matrix, by ranking the data in each row from largest to smallest, and setting any element whose rank is greater than the input threshold to 0. In other words, if the treshold is X, only the X greatest values in each row will be kept, and the rest will be set to 0. WARNING: the input matrix is modified in-place.
1 | filter_matrix_by_rank(m, threshold)
|
m |
The input matrix |
threshold |
The threshold rank. Values with rank greater than the threhsold will be set to 0. Note that the rank is 1-based (i.e. the largest observation has rank 1) |
This function does not return any value. The input matrix is modified in-place.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.