WaveletsExt.jl: Extending the boundaries of wavelets in Julia

Whether it is seismic surveys, ECG signals, stock market trends, or sensor data, the wavelet and wavelet packet transforms are powerful tools for signal analysis and classification with many advantages over the conventional Fourier methods. Primary among them is the ability to extract information localized in both time and frequency domains, enabling multiresolution analysis (Daubechies, 1992; Mallat, 2009). As such, wavelets and wavelet packets have become popular tools for computational harmonic analysis. WaveletsExt.jl was developed to augment Wavelets.jl (the existing wavelet toolbox for Julia) by providing routines for wavelet analysis, wavelet packet analysis, and associated utilities.


Statement of Need
Julia's principal package for wavelets is Wavelets.jl (JuliaDSP/Wavelets.jl, 2021), which provides the essential building blocks for data analysis using wavelets. These include 1-D, 2-D, and 3-D wavelet transforms via filter banks or lifting, a range of thresholding functions, and other utilities. However, as a general-purpose package for wavelets, Wavelets.jl does not include many targeted and sophisticated methods present in the literature.
One of the most distinguishing features of WaveletsExt.jl is the presence of algorithms for handling an ensemble of input signals. Currently, Wavelets.jl implements best basis selection utilities for wavelet packets for a single input. However, it does not include methods for selecting a single best basis for a set of inputs with similar properties (e.g., signals or images belonging to the same class), which is valuable for feature extraction and data compression. To address this, WaveletsExt.jl implements the Joint Best Basis (JBB) (Wickerhauser, 1996) and the Least Statistically Dependent Basis (LSDB) (Saito, 2001), which provide approximations of the Principal Component Analysis (PCA) and Independent Component Analysis (ICA), respectively, in a computationally fast manner through a dictionary of orthonormal bases.

Redundant Wavelet Transforms
WaveletsExt.jl implements several redundant wavelet transforms including Autocorrelation Wavelet Transform (Saito & Beylkin, 1993) and Stationary Wavelet Transform (SWT) (Nason & Silverman, 1995). These transformations can be performed using the acdwt and sdwt functions, and the resulting decomposition can be visualized with the wiggle function included in WaveletsExt.jl.

Best Basis Algorithms
WaveletsExt.jl can select a best basis for a multiple signal input (i.e., an array of signals) through the Joint Best Basis (JBB) (Wickerhauser, 1996) or Least Statistically Dependent Basis (LSDB) (Saito, 2001) algorithms. The resulting best basis tree can be visualized using plot_tfbdry also included in WaveletsExt.jl.
using Plots, Wavelets, WaveletsExt   (Buckheit & Donoho, 1995;Donoho & Johnstone, 1995) selected by the JBB and LSDB algorithms. Each row represents a decomposition level, where level 0 is the original input signal, and each cell represents a frequency subband (low to high frequency from left to right). The colored cells indicate those subbands selected by the JBB (left) and the LSDB (right) algorithms.

Denoising Algorithms
WaveletsExt.jl contains two functions for denoising: denoise and denoiseall. The former denoises a single signal input whereas the latter denoises multiple signal input. For more examples of denoising algorithms in WaveletsExt.jl, see .

Feature Extraction
For signal classification problems, users can extract distinguishing features localized in both the time and frequency domains using the Local Discriminant Basis (LDB) algorithm. Further details can be found in the original papers by Saito and his collaborators (Saito et al., 2002;Saito & Coifman, 1995) as well as the interactive tutorial .

Reproducible Research
WaveletsExt.jl was partially inspired by the WaveLab library in MATLAB, which was developed to enable reproducible wavelet research (Buckheit & Donoho, 1995). In this spirit, we wrote a series of tutorials, examples, and experiments using Pluto.jl Liew et al., 2021), a platform with which Julia users can create and share reactive documents (Van der Plas, 2021). By downloading and running these so-called Pluto notebooks, researchers and students alike can reproduce the results of our research and interactively adjust parameters to see the changes in experiment outcomes.