A routine that calls a C code function to do thresholding. This is really a test routine to call a C thresholding function (Cthreshold) and the user is advised to use the R based generic thresholding function
threshold
and/or its methods as they contain a wider range of thresholding options.
Cthreshold(wd, thresh.type = "soft", value = 0, levels = 3:(nlevelsWT(wd) - 1))
A wd.object
class object, but containing thresholded coefficients.
The wavelet object that you wish to threshold.
The type of thresholding. This can be "soft" or "hard". See threshold
and methods for further details.
The threshold value that you want to be used (e.g. for hard thresholding wavelet coefficients whose absolute value is less than
The resolution levels that you wish to compute the threshold on and apply the threshold to.
G P Nason
For general use it is recommended to use the
threshold
functions as they have a wider variety of options
and also work for more complex varieties of wavelet transforms
(i.e. non-decimated, complex-valued, etc).
However, in the right, limited, situation this function can be useful.
This function directly calls the C thresholding function Cthreshold().
The C function is used by routines that operate on behalf of the function
that carries out two-fold cross validation in C (CWCV
) which
is also accessible using the policy="cv"
option too
threshold.wd
This function can be used by the user. It might be a bit faster than
threshold.wd
but mostly because it is simpler and does less checking than
threshold.wd
.
threshold
#
# See copious examples in the help to threshold.wd
#
Run the code above in your browser using DataLab