Procedure: Haar wavelet expansion¶
This procedure is used to find the eigenvalues and the eigenfunctions of the covariance kernel when the analytical solution is not available. The othonoromal basis function \(\strut{\{\psi_i\}}\) is used to solve the problem. This procedure uses Haar wavelet basis functions as the set of orthonormal basis functions.
The eigenfunction \(\phi_{i}(t)\) is expressed as a linear combination of Haar orthonormal basis functions
The Haar wavelet, the simplest wavelet basis function, is defined as
Inputs¶
The covariance function , see AltCorrelationFunction, and the estimates of its parameters.
\(p\) the number of eigenvalues and eigenfunctions required to truncate the Karhunen Loeve Expansion at.
\(M=2^n\) orthogonal basis functions on \([0,1]\) constructed in the following way
\[\begin{split}\psi_1 &= 1 \\ \psi_i &= \psi_{j,k}(x) \\ i &= 2^j+k+1 \\ j &= 0,1, \cdots, n-1 \\ k &= 0,1, \cdots, 2^j-1\end{split}\]where
\[\begin{split}\psi(x)=\left\{ \begin{array}{cc} 1 & k2^{-j}<x<2^{-j-1}+k2^{-j} \\ -1 & 2^{-j-1}+k2^{-j} \leq x <2^{-j}+k2^{-j} \\ 0 & \mbox{otherwise} \end{array}\right.\end{split}\]
Output¶
- The eigenvalues \(\lambda_i\) , \(i=1\cdots p\).
- The matrix of unknown coefficients \(D\).
- An approximated covariance function; \(R(s,t)=\Psi(s)^T D^T \Lambda D \Psi(t)\).
Procedure¶
- Write the eigenfunction as \(\phi_i(t)=\sum_{k=1}^M d_{ik} \psi_{k}(t)=\Psi^T(t) D_i\) so that, \(R(s,t)=\sum_{m=1}^M \sum_{n=1}^M a_{mn}\psi_m(s) \psi_n(t)=\Psi(s)^T A \Psi(t)\).
- Choose \(\strut{M}\) time points such that \(t_j=\frac{2i-1}{2M}, 1 \leq i \leq M\).
- Compute the covariance function \(C\) for those \(M\) points.
- Apply the 2D wavelet transform (discrete wavelet transform) on \(C\) to obtain the matrix \(A\).
- Substitute \(R(s,t)=\Psi(s)^T A \Psi(t)\) in \(\lambda_i\phi_i(t)=\int_{0}^{1} R(s,t)\phi_i(s)\), then we have \(\lambda_i\Psi^T(t)D_i=\Psi^T(t)AHD_i\).
- Define \(H\) as a diagonal matrix with diagonal elements \(h_{11}=1\), \(h_{ii}=2^{-j}\) \(i=2^{j}+k+1, \quad j=0,1, \cdots, n-1\) and \(k=0,1, \cdots, 2^j-1\).
- Define the whole problem as \(\Lambda_{p \times p} D_{p \times M} \Psi(t)_{M \times 1}= D_{p \times M} H_{M \times M } A_{M \times M} \Psi(t)_{M \times 1}\).
- From (7), we have \(\Lambda D=D H A\).
- Multiply both sides of (8) by \(H^{\frac{1}{2}}\)
- Express the eigen-problem as \(\Lambda D H^{\frac{1}{2}}=D H^{\frac{1}{2}} H^{\frac{1}{2}} A H^{\frac{1}{2}}\) or \(\Lambda \hat{D}=\hat{D}. \hat{A}\) where \(\hat{D}=DH^{\frac{1}{2}}\) and \(\hat{A}=H^{\frac{1}{2}} A H^{\frac{1}{2}}\).
- Solve the eigen-problem in (10), then \(\Phi(t)=D\Psi(t)=\hat{D} H^{-\frac{1}{2}}\Psi(t)\).
Additional Comments, References, and Links¶
The application of the Haar wavelet procedure shows a better approximation and faster implementation than the Fourier procedure given in ProcFourierExpansionForKL. For one dimension implementation shows that \(2^5 = 32\) provides very accurate and quite fast approximations.