This function carries out the joint thresholding algorithm described in
section 5 of Evers and Heaton (2009). Though the function, in principle,
can work any sequence of arrays, it is designed to work with blocks of
wavelet coefficients. These can be extracted from an
wd
or imwd
object
using the function extract.coefficients
.
wtthresh(data, beta, weights, control=list())
A list containing the arrays to be thresholded. The elements
of the array have to be arrays of the same number of dimensions. The
arrays can be of different sizes, however the ratio of their side
lengths has to be the same. Can be a list of wavelet coefficients
extracted using extract.coefficients
. The
data is assumed to have noise of unit variance, thus the data needs to
be rescaled a priori (e.g. in the case of wavelet coefficients using function estimate.sdev
).
Instead of using the original data
, one can call
wtthresh
using the \(\beta_i\) instead of the observed
data. These can be computed using beta.laplace
.
The different elements of the list can be weighted. This allows for giving greater weight to certain arrays. By default, no weights are used.
A list that allows the user to tweak the behaviour of
wtthresh
. It can contain the following elements:
The maximum depth of the tree. Defaults to 10
.
The minimum width of a region of the partitioning
of the largest array. This setting avoids creating too small regions. Defaults to 4
.
If the minimum width of the largest array
of size \(l_0^d\) is minimum.width
, then the minimum width
for an array of the size \(l^2\) is \(\texttt{minimum.width}
\cdot \left(\frac{l}{l_0}\right)^{d\cdot
\texttt{minimum.width.scale.factor}}\). Defaults to 1
.
Do not allow the minimum width of a region to
become less
than min.minimum.width
at any level. Defaults to 1
.
The minimum size of a region of the partitioning of the largest array. This setting avoids creating too small regions. Defaults to \(8^d\), where \(d\) is the dimension of the arrays.
If the minimum size of the largest array
of size \(l_0^d\) is minimum.size
, then the minimum size
for an array of the size \(l^2\) is \(\texttt{minimum.size}
\cdot
\left(\frac{l}{l_0}\right)^{\texttt{minimum.size.scale.factor}}
\). Defaults to 1
.
Do not allow the minimum size of a region to
become less than min.minimum.size
at any level. Defaults to \(4^d\), where \(d\) is the dimension of the arrays.
In order to correct for different depths of the
splits (due to minimum size and width requirements) the score statistic \(s\) is rescaled: \((s-q_{\alpha}(df)) / q_{\alpha}(df)\), where \(q_{\alpha}(df)\) is the
\(\alpha\) quantile of a \(\chi^2\)
distribution with \(df\) degrees of freedom, and \(\alpha\)
is set to rescale.quantile
. Defaults to 0.5
.
If the p-value of the corresponding likelihood
ratio test is larger than 1-lr.signif
a split will be
discarded. Defaults to 0.5
.
The minimum absolute improvement of the
above criterion necessary such that a split is retained. Defaults to -Inf
, i.e. deactivated.
The minimum relative improvement of the
above criterion necessary such that a split is retained. Defaults to -Inf
, i.e. deactivated.
The parameter \(a\) of the Laplace distribution
\(\gamma(\mu)\propto \exp(-a|\mu|) \)
corresponding to the signal. Defaults to 0.5
.
The maximum value of \(\beta\). Defaults to 1e5
.
The maximum number of iterations when computing the
estimate of the weight \(w\) in a certain region. Defaults to 30
.
The estimate of the weight \(w\) in a certain
region is considered having converged, if the gradient of the
likelihood is less than tolerance.grad
. Defaults to 1e-8
.
The estimate of the weight \(w\) in a certain
region is considered having converged, if the estimates of the weight
\(w\) change less than tolerance
. Defaults to 1e-6
.
wtthresh
returns an object of the class c("wtthresh")
,
which is a list containing the following elements:
A table describing the structure of the fitted tree together with the local loglikelihoods required for the pruning.
A table giving the details about where the split was carried out for each of the arrays (i.e. for each block of coefficients).
The weights \(w\) of the mixture component corresponding to
the signal for each region as described by the corresponding row of splits
.
The corresponding hard threshold \(t\) for each region as described by the corresponding row of splits
.
A list of the same length as data
indicating
to which region each entry of the arrays of data belongs.
The values of \(\beta\) for each coefficient (as a list).
The data used (as a list).
The weights used for each array of observations/coefficients.
The control list of tuning options used. (see argument control
).
Evers, L. and Heaton T. (2009) Locally Adaptive Tree-Based Thresholding, Journal of Computational and Graphical Statistics 18 (4), 961-977. Evers, L. and Heaton T. (2017) Locally Adaptive Tree-Based Thresholding, Journal of Statistical Software, Code Snippets, 78(2), 1-22.