Package smile.wavelet

Wavelet analysis.

A wavelet is a wave-like oscillation with an amplitude that starts out at zero, increases, and then decreases back to zero. Like the fast Fourier transform (FFT), the discrete wavelet transform (DWT) is a fast, linear operation that operates on a data vector whose length is an integer power of 2, transforming it into a numerically different vector of the same length. The wavelet transform is invertible and in fact orthogonal. Both FFT and DWT can be viewed as a rotation in function space.

Functions

dwt
Link copied to clipboard
fun dwt(t: DoubleArray, filter: String)

Discrete wavelet transform.

idwt
Link copied to clipboard
fun idwt(wt: DoubleArray, filter: String)

Inverse discrete wavelet transform.

wavelet
Link copied to clipboard
fun wavelet(filter: String): Wavelet

Crerates a wavelet filter. The filter name is derived from one of four classes of wavelet transform filters: Daubechies, Least Asymetric, Best Localized and Coiflet. The prefixes for filters of these classes are d, la, bl and c, respectively. Following the prefix, the filter name consists of an integer indicating length. Supported lengths are as follows:

wsdenoise
Link copied to clipboard
fun wsdenoise(t: DoubleArray, filter: String, soft: Boolean = false)

The wavelet shrinkage is a signal denoising technique based on the idea of thresholding the wavelet coefficients. Wavelet coefficients having small absolute value are considered to encode mostly noise and very fine details of the signal. In contrast, the important information is encoded by the coefficients having large absolute value. Removing the small absolute value coefficients and then reconstructing the signal should produce signal with lesser amount of noise. The wavelet shrinkage approach can be summarized as follows: