User's manual for SLIM programs in Madagascar |
Methods available: - soft - hard - non-negative Garrote (nng) Written by: Gilles Hennenfent & Colin Russell, UBC Created: February 2006
string | fthr= | varying threshold level (positive number) (auxiliary input file name) | |
---|---|---|---|
string | mode= | 'soft', 'hard', 'nng' (default: soft) | |
float | thr= | threshold level (positive number) |
Consider the vector . Soft thresholding is defined as
data,soft,hard,nng
Figure 1. Thresholding example. Line whose range is symmetric about the origin (a) thresholded using soft (b), hard (c), and NNG (d) methods. |
---|
The extension to positive varying threshold level is straightforward by replacing by in Eq.'s (1),(2), and (3).
In Madagascar, to soft threshold a dataset with a constant, use e.g.
bash$ sfmath n1=100 n2=1 output='1' | sfnoise rep=y >data.rsf bash$ sfthr <data.rsf thr=2 >res1.rsfor replace the last command by
bash$ sfthr <data.rsf thr=2 method=soft >res2.rsfThis is also equivalent to soft thresholding data.rsf with a vector of same size mythr.rsf whose entries are all set to 2.
bash$ sfmath n1=100 n2=1 output='2' >mythr.rsf bash$ sfthr <data.rsf fthr=mythr.rsf method=soft >res3.rsfIf thr=.5 and fthr=mythr.rsf are specified at the same time, the effective threshold level is 1, obtained by multiplying mythr.rsf entries by 0.5
bash$ sfthr <data.rsf thr=.5 fthr=mythr.rsf method=soft >res4.rsf
data1,soft1,hard1,nng1
Figure 2. Random vector thresholding example. |
---|
Note that thresholding is an element-wise operation. sfthr can thus deal with arbitrarily large datasets.
User's manual for SLIM programs in Madagascar |