powered by
The degree of the sparseness of vector is controlled by the lambda parameter.
softThr(y, lambda=1)
A numerical vector, whose length is the same as that of y.
A numerical vector.
Threshold value to convert a value 0. If the absolute value of an element of vector is less than lambda, the value is converted to 0 (Default: 1).
Koki Tsuyuzaki
y <- seq(-2, 2, 0.1) softThr(y)
Run the code above in your browser using DataLab