# WavTransf1D: Forward AI wavelet transform for curve of HPD matrices In pdSpecEst: An Analysis Toolbox for Hermitian Positive Definite Matrices

## Description

`WavTransf1D` computes a forward intrinsic average-interpolating (AI) wavelet transform for a curve in the manifold of HPD matrices equipped with a metric specified by the user, such as the affine-invariant Riemannian metric, as described in \insertCiteCvS17pdSpecEst and Chapter 3 of \insertCiteC18pdSpecEst.

## Usage

 ```1 2``` ```WavTransf1D(P, order = 5, jmax, periodic = FALSE, metric = "Riemannian", ...) ```

## Arguments

 `P` a (d,d,m)-dimensional array of HPD matrices, corresponding to a sequence of (d,d)-dimensional HPD matrices of length m, with m = 2^J for some J > 0. `order` an odd integer larger or equal to 1 corresponding to the order of the intrinsic AI refinement scheme, defaults to `order = 5`. Note that if `order > 9`, the computational cost significantly increases as the wavelet transform no longer uses a fast wavelet refinement scheme based on pre-determined weights. `jmax` the maximum scale up to which the wavelet coefficients are computed. If `jmax` is not specified, it is set equal to the maximum possible scale `jmax = J-1`, where `J = log2(m)`. `periodic` a logical value determining whether the curve of HPD matrices can be reflected at the boundary for improved wavelet refinement schemes near the boundaries of the domain. This is useful for spectral matrix estimation, in which case the spectral matrix is a symmetric and periodic curve in the frequency domain. Defaults to `periodic = FALSE`. `metric` the metric that the space of HPD matrices is equipped with. The default choice is `"Riemannian"`, but this can also be one of: `"logEuclidean"`, `"Cholesky"`, `"rootEuclidean"`, `"Euclidean"` or `"Riemannian-Rahman"`. See also the Details section below. `...` additional arguments for internal use.

## Details

The input array `P` corresponds to a discretized curve of (d,d)-dimensional HPD matrices of dyadic length. `WavTransf1D` then computes the intrinsic AI wavelet transform of `P` based on the given refinement order and the chosen metric. If the refinement order is an odd integer smaller or equal to 9, the function computes the wavelet transform using a fast wavelet refinement scheme based on weighted intrinsic averages with pre-determined weights as explained in \insertCiteCvS17pdSpecEst and Chapter 3 of \insertCiteC18pdSpecEst. If the refinement order is an odd integer larger than 9, the wavelet refinement scheme uses intrinsic polynomial prediction based on Neville's algorithm in the Riemannian manifold (via `pdNeville`).
The function computes the intrinsic AI wavelet transform in the space of HPD matrices equipped with one of the following metrics: (i) the affine-invariant Riemannian metric (default) as detailed in e.g., \insertCiteB09pdSpecEst[Chapter 6] or \insertCitePFA05pdSpecEst; (ii) the log-Euclidean metric, the Euclidean inner product between matrix logarithms; (iii) the Cholesky metric, the Euclidean inner product between Cholesky decompositions; (iv) the Euclidean metric; or (v) the root-Euclidean metric. The default choice of metric (affine-invariant Riemannian) satisfies several useful properties not shared by the other metrics, see \insertCiteCvS17pdSpecEst or \insertCiteC18pdSpecEst for more details. Note that this comes at the cost of increased computation time in comparison to one of the other metrics.

## Value

The function returns a list with three components:

 `D ` the pyramid of wavelet coefficients. This is a list of arrays, where each array contains the (d,d)-dimensional Hermitian wavelet coefficients from the coarsest wavelet scale `j = 0` up to the finest wavelet scale `j = jmax`

.

 `D.white ` the pyramid of whitened wavelet coefficients. The structure of `D.white` is the same as `D`, but with the wavelet coefficients replaced by their whitened counterparts as explained in \insertCiteCvS17pdSpecEst. `M0 ` a numeric array containing the midpoint(s) at the coarsest scale `j = 0` in the midpoint pyramid.

## Note

The function does not check for positive definiteness of the input matrices, and (depending on the specified metric) may fail if matrices are close to being singular.

## References

\insertAllCited

`InvWavTransf1D`, `pdSpecEst1D`, `pdNeville`
 ```1 2``` ```P <- rExamples1D(2^8, example = "bumps") P.wt <- WavTransf1D(P\$f, periodic = FALSE) ```