softThr {guidedPLS} | R Documentation |
Soft-thresholding to make a sparse vector sparse
Description
The degree of the sparseness of vector is controlled by the lambda parameter.
Usage
softThr(y, lambda=1)
Arguments
y |
A numerical vector. |
lambda |
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). |
Value
A numerical vector, whose length is the same as that of y.
Author(s)
Koki Tsuyuzaki
Examples
y <- seq(-2, 2, 0.1)
softThr(y)
[Package guidedPLS version 1.0.0 Index]