Learn R Programming

RGCCA (version 2.1.2)

soft.threshold: The function soft.threshold() soft-thresholds a vector such that the L1-norm constraint is satisfied.

Description

The function soft.threshold() soft-thresholds a vector such that the L1-norm constraint is satisfied.

Usage

soft.threshold(x, sumabs = 1)

Arguments

x
A numeric vector.
sumabs
A numeric constraint on x's L1 norm.

Value

Returns a vector resulting from the soft thresholding of \(x\) given sumabs

Examples

Run this code
x <- rnorm(10)
soft.threshold(x,0.5)

Run the code above in your browser using DataLab