Description Usage Arguments Details Author(s) Examples
soft-thresholding a vector with possibility of using weight and non-negative constraint
1 |
x |
a vector |
k |
the number (if integer k>1) or proportion (if 0<k<1) of non-zero elements |
w |
the weight for each element, see "detail" section |
pos |
if only retain non-negative values |
round.digits |
the digits to be passed to round function. |
using weight w The vector x*w is used to determine which value to keep, but the values in x are kept. For example, the vector x is c(1, 2, 3, 4, 5), w is c(2.5, 2.5, 2.5, 1, 1), the weighted vector is c(2.5, 5, 7.5, 4, 5). If k = 3, value in x corresponding to 5, 7.5 and 5 (i.e. 2, 3, 5) will be selected, after thresholding, the values becomes 1, 2, 4.
Chen Meng
1 2 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.