.. _ProcHaarWaveletExpansionForKL: 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 :math:`\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 :math:`\phi_{i}(t)` is expressed as a linear combination of Haar orthonormal basis functions .. math:: \phi_{i}(t)=\sum_{k=1}^M d_{ik} \psi_k(t)=\theta(t)^T D_i=D_i^T\psi(t). The Haar wavelet, the simplest wavelet basis function, is defined as .. math:: \psi(x)=\left\{ \begin{array}{cc} 1 & 0`, and the estimates of its parameters. #. :math:`p` the number of eigenvalues and eigenfunctions required to truncate the Karhunen Loeve Expansion at. #. :math:`M=2^n` orthogonal basis functions on :math:`[0,1]` constructed in the following way .. math:: \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 where .. math:: \psi(x)=\left\{ \begin{array}{cc} 1 & k2^{-j}`. For one dimension implementation shows that :math:`2^5 = 32` provides very accurate and quite fast approximations.